DNA and RNA length calculator
Sequence length, GC content, base composition and molecular weight. Plain text or FASTA.
Sequence length, GC content, base composition and molecular weight. Plain text or FASTA.
The calculator removes everything that is not a nucleotide before counting: spaces, line breaks, tabs and the position numbers found in GenBank-style listings. Any other character, such as a stray letter or a gap symbol, is skipped and reported in a notice above the result so it never silently changes the count. FASTA header lines are recognised and kept as record names, and each record is measured on its own.
nt (nucleotides) is the length of a single strand, which is what you get for an oligo, an mRNA or a single-stranded template. bp (base pairs) is the length of a double-stranded molecule such as a plasmid, a PCR product or a genomic fragment. The number is the same; the unit tells the reader whether one or two strands are meant. Choose dsDNA above for base pairs; it also doubles the molecular weight to include the complementary strand.
Each base adds the average mass of its nucleotide residue in the chain. For DNA the residues are A 313.21, C 289.18, G 329.21 and T 304.20 Da; for RNA they are A 329.21, C 305.18, G 345.21 and U 306.17 Da. Subtracting 61.96 Da accounts for the ends of a linear strand with a 5′-OH and 3′-OH, the form of a synthetic oligo without a terminal phosphate. For dsDNA the mass of the complementary strand is calculated from the same composition and added. Ambiguity codes such as N or R are counted in the length but left out of the mass.
For a dedicated report with AT content, base composition and a sliding-window plot, use the GC content calculator. GC content is the share of bases that are G or C. It affects melting temperature, PCR annealing and the stability of secondary structure. The value here counts G and C only; S, which stands for G or C, is included, while other ambiguity codes are not.
Paste a multi-record FASTA file and every record appears in the table with its length, GC content and molecular weight, while the headline shows the total across all records. This is a quick way to check a batch of primers, a set of amplicons or the inserts in a cloning plan.
Paste the sequence into the calculator. It strips spaces, line breaks and position numbers, then counts every remaining base. The length is shown in nt for single-stranded DNA and RNA and in bp for double-stranded DNA.
nt (nucleotides) counts bases along one strand. bp (base pairs) describes double-stranded DNA, where each position is a pair. A 500-base strand is 500 nt; the same sequence as a duplex is 500 bp.
Each base contributes its average nucleotide residue mass: A 313.21, C 289.18, G 329.21, T 304.20 Da for DNA, and A 329.21, C 305.18, G 345.21, U 306.17 Da for RNA. The sum is corrected by −61.96 Da for the terminal 5′-OH and 3′-OH of a linear strand. For dsDNA the complementary strand is added.
Yes. If a sequence contains U and no T it is treated as RNA and the RNA nucleotide masses are used. You can also switch the mode by hand.
Yes. Paste a multi-record FASTA file. Each record gets its own row with length, GC content and molecular weight, and the totals are shown above.