GC Content Calculator
GC content of a DNA or RNA sequence, with base counts, length, ambiguity codes counted separately and an estimated melting temperature (Tm) for primers and oligos.
Result…
How it's calculated
GC content = (G + C) ÷ (A + C + G + T/U) × 100 Under 14 nt (Wallace rule): Tm = 2 × (A + T) + 4 × (G + C) 14 nt or more: Tm = 64.9 + 41 × (G + C − 16.4) ÷ N Salt-adjusted, 14 nt or more: Tm = 100.5 + 41 × (G + C) ÷ N − 820 ÷ N + 16.6 × log₁₀([Na⁺]) Salt-adjusted, under 14 nt: Wallace − 16.6 × log₁₀(0.05) + 16.6 × log₁₀([Na⁺])
GC content is the share of a sequence made of guanine and cytosine. G–C pairs are held by three hydrogen bonds and stack more strongly than A–T pairs, so GC-rich DNA melts at a higher temperature; primer design usually aims for a moderate GC content. The calculator strips spaces, numbers and gaps, counts each base, and keeps IUPAC ambiguity codes (N, R, Y and so on) separate, since they could be either kind of base. The melting temperature uses the simple formulas given by OligoCalc: the Wallace rule below 14 nucleotides, the basic GC formula above, and a salt-adjusted version using the sodium concentration you enter. All are estimates for short oligos.
Your numbers, step by step
About the GC Content calculator
This GC content calculator reports what share of a DNA or RNA sequence is guanine and cytosine. Paste a sequence, even straight from a FASTA file with its header line, spaces and position numbers, and it counts A, C, G and T or U, reports the length and the AT or AU content, and keeps IUPAC ambiguity codes such as N, R or Y separate instead of guessing what they are. It also estimates the melting temperature: the Wallace rule for oligos shorter than 14 nucleotides, the basic GC formula for longer ones, and a salt-adjusted value using the sodium concentration you enter. Researchers and students use it to check PCR primers, probes and cloned fragments. The steps show the counts and each formula with your numbers.
How to use it
- Paste your DNA or RNA into “Sequence”. Spaces, line breaks, numbers, gaps and a header line starting with > are ignored.
- Set the “Sodium (Na⁺) concentration” in mM for your buffer; 50 mM is the standard assumption.
- Read the GC content, then the length, base counts and AT or AU content.
- Use the estimated Tm values as a starting point for an annealing temperature, not a final answer.
Worked example
The 24-base primer AGCTTGCATGCCTGCAGGTCGACT has A 4, C 7, G 7 and T 6. GC content = (7 + 7) ÷ 24 × 100 = 58.33%. As it is 14 bases or longer, the basic estimate is Tm = 64.9 + 41 × (14 − 16.4) ÷ 24 = 60.8 °C, and the salt-adjusted estimate at 50 mM Na⁺ is 68.7 °C. A 13-base oligo, GCATCGATCGGTA (A 3, C 3, G 4, T 3), uses the Wallace rule instead: 2 × 6 + 4 × 7 = 40 °C.
Updated
Questions people ask
How do I calculate GC content?
Count the G and C bases, divide by the total number of A, C, G and T (or U) bases, and multiply by 100. It is an ordinary percentage, which the percentage calculator can also do.
What is the Wallace rule for primer Tm?
For oligos under 14 nucleotides, Tm = 2 × (A + T) + 4 × (G + C) in °C. Longer ones use Tm = 64.9 + 41 × (G + C − 16.4) ÷ N, as given by OligoCalc, which assumes 50 nM primer, 50 mM Na⁺ and pH 7.
How are N and other ambiguity codes counted?
They are counted separately and left out of both the GC content and the Tm, because each could stand for more than one base.
Why does the salt-adjusted Tm differ from the basic one?
Sodium ions stabilise the double helix, so more salt raises the melting temperature. The salt-adjusted formula adds 16.6 × log₁₀ of the sodium concentration in mol/L.
How accurate are these melting temperatures?
They are rough estimates. They ignore the order of the bases, magnesium, dNTPs and primer concentration, so nearest-neighbour methods for your exact PCR conditions can differ by several degrees; confirm annealing temperatures with a gradient PCR.