PCR Primer Melting Temperature (Tm) Calculator

PCR Primer Melting Temperature (Tm) Calculator

Estimate a primer’s Tm by the Wallace rule or the GC/salt-adjusted formula from its base composition — two rules of thumb that are useful for a sanity check and are not what a design tool uses.

PCR Primer Melting Temperature (Tm)

Base counts → Tm
Number of A bases in the primer.
Number of T bases. For an RNA oligo, count uracil here.
Number of G bases.
Number of C bases. The total length N is the sum of all four.
The Wallace rule was derived for short oligonucleotide probes and becomes progressively less reliable beyond about 20 bases; the GC formula is the usual quick alternative for longer ones.
62.0°CExample

A 20-mer with 5 A, 4 T, 6 G and 5 C — 55% GC — by the Wallace rule

Two rules of thumb

Wallace rule (roughly 14–20 bases): Tm = 2 × (A + T) + 4 × (G + C)
GC / salt-adjusted (longer oligos): Tm = 64.9 + 41 × (G + C − 16.4) ÷ N
N = A + T + G + C
Wallace rule
assigns 2 °C to every A or T and 4 °C to every G or C, reflecting two hydrogen bonds against three. It was derived for short oligonucleotide hybridisation probes and holds reasonably for primers of about 14 to 20 bases. Beyond that it overestimates, and the overestimate grows with length
GC / salt-adjusted
a length-corrected estimate from GC content. The 16.4 and the division by N are an empirical correction that stops Tm growing without limit as the primer lengthens, which is the Wallace rule’s main failing
what both ignore
salt concentration, primer concentration, magnesium, dimethyl sulfoxide, and the identity of neighbouring bases. A GC pair flanked by other GC pairs is more stable than the same pair in an AT context, and neither formula can see that
nearest-neighbour
the thermodynamic model that design software actually uses. It sums experimentally measured enthalpy and entropy for each adjacent base pair and solves for the temperature at which half the duplex is dissociated, then corrects for salt and oligo concentration. Expect it to differ from either figure here by several degrees
annealing temperature
conventionally set a few degrees below the lower Tm of the pair, then optimised empirically — a gradient across a block settles in one run what no formula can predict

Worked example

A 20-mer with 5 A, 4 T, 6 G and 5 C — 55% GC — by the Wallace rule
N = 5 + 4 + 6 + 5 = 20 bases; A + T = 9; G + C = 11
Wallace: Tm = 2 × 9 + 4 × 11 = 18 + 44 = 62.0 °C
GC/salt-adjusted on the same primer: 64.9 + 41 × (11 − 16.4) ÷ 20 = 64.9 − 11.07 = 53.8 °C
The two rules differ by more than 8 °C on a perfectly ordinary 20-mer, and a nearest-neighbour calculation would typically land between them
That spread is the argument of the page: use either figure to check that a primer is roughly where you expect, and a nearest-neighbour design tool to choose between two candidates
If the partner primer came out at 58 °C, the pair is mismatched by 4 °C and one of them should be lengthened or shortened; with a matched pair, start the annealing temperature about 5 °C below the lower Tm and optimise on a gradient

The two rules on the same primers

PrimerLengthGCWallaceGC/salt-adjusted
4 A, 4 T, 5 G, 5 C1856%56.0 °C50.3 °C
5 A, 4 T, 6 G, 5 C2055%62.0 °C53.8 °C
6 A, 6 T, 7 G, 6 C2552%76.0 °C (invalid)59.3 °C
The Wallace figure climbs by 4 °C for every added G or C with no ceiling, which is why it becomes untenable beyond about 20 bases — 76 °C for an ordinary 25-mer is not a real melting temperature. The GC formula’s division by length is precisely the correction that failing calls for.

What each approach accounts for

FactorWallaceGC/salt-adjustedNearest-neighbour
Base compositionYesYesYes
LengthOnly through the countsYes, explicitlyYes
Sequence context (which base sits next to which)NoNoYes
Salt and magnesium concentrationNoThrough a fixed assumption onlyYes, as an input
Oligo concentrationNoNoYes
Secondary structure and primer-dimerNoNoAssessed separately by design software
Both formulas on this page are quick checks. Anything that has to work first time, or work at a marginal annealing temperature, belongs in a nearest-neighbour design tool.

Useful for a sanity check, not for designing a marginal assay

The melting temperature of a primer is the temperature at which half of it is annealed to its complement and half is free. It matters because the annealing temperature of a PCR is set relative to it: too far below and the primer binds at mismatched sites, too close or above and it barely binds at all. Both formulas here estimate Tm from base composition alone, and both are old, quick and deliberately crude.

The Wallace rule assigns 2 °C to each A or T and 4 °C to each G or C, which reflects the two hydrogen bonds of an A–T pair against the three of a G–C pair. It was derived for short oligonucleotide probes and works acceptably for primers of roughly 14 to 20 bases. Its weakness is structural: because it simply adds a fixed amount per base, Tm grows without limit as the primer lengthens, so a 30-mer is credited with a melting temperature that no duplex reaches. The GC formula corrects exactly that by dividing by length, which is why it is the one to use on longer oligos.

Neither formula knows anything about salt concentration, magnesium, primer concentration or the sequence context of each base — and all four move the real Tm. A G–C pair flanked by other G–C pairs is more stable than the same pair sitting between A–T pairs, and that stacking energy is precisely what a nearest-neighbour model captures. Nearest-neighbour calculations sum measured enthalpy and entropy across every adjacent pair of bases, then solve for the dissociation temperature at the salt and oligo concentrations you specify. That is what a design tool does, and the answer commonly differs from either figure on this page by several degrees.

Two design rules survive the imprecision because they are about differences rather than absolutes. The first is that the two primers of a pair should have Tm values within a couple of degrees of each other, since a single annealing temperature has to suit both; a mismatched pair means one primer is always working at the wrong temperature. The second is that the annealing temperature is conventionally set a few degrees below the lower Tm of the pair, and then optimised — a temperature gradient across a block settles in one run what no formula will tell you. Use these numbers to notice that a primer is unexpectedly cool or unexpectedly hot. Do not use them to choose between two candidates.

Frequently asked questions

How do you calculate primer Tm by the Wallace rule?

Tm = 2 × (number of A and T bases) + 4 × (number of G and C bases). A 20-mer with 9 A/T and 11 G/C gives 2 × 9 + 4 × 11 = 62 °C. The rule is only reliable for primers of roughly 14 to 20 bases.

Why do the two formulas give different answers?

Because the Wallace rule adds a fixed amount per base with no correction for length, while the GC formula divides by length. On a 20-mer they can differ by 8 °C or more, and the difference grows with length. Neither accounts for salt, primer concentration or sequence context.

What annealing temperature should I use?

Conventionally a few degrees below the lower Tm of the primer pair, then optimised empirically with a temperature gradient. Probe-based assays usually run a combined annealing and extension step at 60 °C and design the primers to suit it.

Should both primers have the same Tm?

They should be within about two degrees of each other, because one annealing temperature has to serve both. A mismatched pair leaves one primer either binding non-specifically or barely binding at all, whichever temperature you pick.

When should I use a nearest-neighbour calculation instead?

Whenever the result matters — designing a new assay, choosing between candidate primers, or working at a marginal annealing temperature. Nearest-neighbour models use measured thermodynamics for each adjacent base pair and take salt and oligo concentration as inputs, which neither rule of thumb can do.

Related calculators

References

  1. Wallace RB, Shaffer J, Murphy RF, et al. Hybridization of synthetic oligodeoxyribonucleotides to phi-X174 DNA: the effect of single base pair mismatch. Nucleic Acids Res. 1979;6(11):3543–3557.
  2. SantaLucia J Jr. A unified view of polymer, dumbbell, and oligonucleotide DNA nearest-neighbor thermodynamics. Proc Natl Acad Sci USA. 1998;95(4):1460–1465.
  3. Rychlik W, Spencer WJ, Rhoads RE. Optimization of the annealing temperature for DNA amplification in vitro. Nucleic Acids Res. 1990;18(21):6409–6412.

Medical Disclaimer: The tools and content provided here are for educational and reference purposes only. They are not intended to substitute for professional medical advice, diagnosis, or treatment. Clinical decisions should always be based on the comprehensive assessment of a qualified healthcare professional.