DNA GC Content Calculator
GC percent, base counts, and Wallace melting temp from a DNA sequence.
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
- Paste the sequence, FASTA headers allowed.
- Use A, T, G, C, U, N only.
- Read GC percent first, length beside it.
- Read Wallace Tm for short primer context.
- Aim 40 to 60% GC with pair Tm inside 5 C.
- Switch to nearest neighbor past 25 bases.
Formula
- 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.
- Counts: A1, T1, G2, C2.
- GC: (2 + 2) / 6 x 100 = 66.67%.
- AT: 100 minus 66.67 = 33.33%.
- Tm: 2 x 2 + 4 x 4 = 4 + 16 = 20 C.
- Design read: hot for its size; extend toward 18 to 22 bases.
- Tool shows 66.67%, 6 bases, 20 C Wallace.
Reference table
| Sequence | GC% | Wallace Tm |
|---|---|---|
| ATATAT | 0.00% | 12 C |
| GCGCGC | 100.00% | 24 C |
| ATGCGC | 66.67% | 20 C |
| 20-mer at 50% GC | 50.00% | 60 C |
| Primer ideal | 40 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.