DNA GC Content Calculator

GC percent, base counts, and Wallace melting temp from a DNA sequence.

Biology and LifeUpdated 2026-10-112 min read
DNA GC Content Calculator
Letters A, T, G, C, U, N. Spaces and line breaks allowed.
GC content
...
Length...
Melting temp...

What it does

GC content grades DNA stability: G-C pairs hold three hydrogen bonds against two for A-T, so GC rich stretches melt hotter and bind tighter. Primer designers watch it because binding strength sets annealing temperatures for the whole reaction.

The tool above takes a pasted sequence and returns GC percent with length and the Wallace melting temperature beside it. The default ATGCGC gives 66.67% across 6 bases with Tm 20 C, which also shows why real primers run 18 to 22 bases long.

Guidance matches NCBI primer tools with Cornell sequencing references: GC near 50%, inside 40 to 60%, and Tm 55 to 65 C inside the 50 to 70 span. LibreTexts ties the physics together, with GC share tracking melting temperature linearly through the extra hydrogen bond.

Wallace arithmetic suits short primers only. Longer designs move to nearest neighbor math with SantaLucia parameters, and N bases sit outside the denominator here so unknowns never fake the percent.

How to use

  1. Paste the sequence, FASTA headers allowed.
  2. Use A, T, G, C, U, N only.
  3. Read GC percent first, length beside it.
  4. Read Wallace Tm for short primer context.
  5. Aim 40 to 60% GC with pair Tm inside 5 C.
  6. Switch to nearest neighbor past 25 bases.

Formula

GC% = (G + C) / (A + T + G + C + U) x 100. Wallace Tm = 2x(A+T) + 4x(G+C). N excluded.
GC%
Share of G plus C across called bases.
Tm
Wallace dissociation estimate in C, short primers only.
N
Unknown base, counted apart and excluded.

Uracil counts with the called bases for RNA tolerant input. Case, spaces, digits, and FASTA headers strip before counting.

Worked example

Example: ATGCGC

Default sequence, 6 bases.

  1. Counts: A1, T1, G2, C2.
  2. GC: (2 + 2) / 6 x 100 = 66.67%.
  3. AT: 100 minus 66.67 = 33.33%.
  4. Tm: 2 x 2 + 4 x 4 = 4 + 16 = 20 C.
  5. Design read: hot for its size; extend toward 18 to 22 bases.
  6. Tool shows 66.67%, 6 bases, 20 C Wallace.

Reference table

Checked sequences and primer rules
SequenceGC%Wallace Tm
ATATAT0.00%12 C
GCGCGC100.00%24 C
ATGCGC66.67%20 C
20-mer at 50% GC50.00%60 C
Primer ideal40 to 60%55 to 65 C

Limits

  • Wallace suits short primers, not long duplexes.
  • Salt and mismatches ignored.
  • N bases excluded, shifting tiny sequences.
  • Design needs specificity checks beyond GC.

Common mistakes

  • Including N in the denominator.
  • Reading Wallace Tm on a 40-mer.
  • Chasing 50% exactly over pair matching.
  • Leaving 3 prime GC clamps unbalanced.
  • Pasting protein letters into a DNA box.

Try it yourself

Quick checks. Answers sit tucked under each question.

GC of ATATAT?

0.00% with Tm 12 C.

GC of GCGCGC?

100.00% with Tm 24 C.

20-mer at half GC?

50.00% with Tm 60 C, inside ideal.

Questions

What is the default GC?

66.67% for ATGCGC.

Ideal primer GC?

Near 50%, inside 40 to 60%.

Ideal Tm?

55 to 65 C with pairs inside 5 C.

Why does GC raise Tm?

Three hydrogen bonds per G-C pair versus two per A-T.

N handling?

Counted apart and excluded from the percent.

Long primers?

Use nearest neighbor math, not Wallace.

Sources

How this page was checked. The formula above was matched against the cited sources, and the worked example was run through the tool on this page before publishing. If you spot an error, contact us so we can fix it and note the correction.