We show that genomic-length DNA molecules imaged in nanochannels have an extension along the channel that scales linearly with the contour length of the polymer, in agreement with the scaling arguments developed by de Gennes for self-avoiding confined polymers. This fundamental relationship allows us to measure directly the contour length of single DNA molecules confined in the channels, and the statistical analysis of the dynamics of the polymer in the nanochannel allows us to compute the SD of the mean of the extension. This statistical analysis allows us to measure the extension of lambda DNA multimers with a 130-nm SD in 1 min.