Skip to content

Primer Tm & Annealing Temperature Calculator

The melting temperature (Tm) of a primer is the temperature at which half of it is bound to its complement. This calculator gives it two ways: the SantaLucia 1998 nearest-neighbour method, which sums the stacking energy of every base-pair step and corrects for salt and primer concentration, and the quick Wallace rule (2·(A+T) + 4·(G+C)) for short oligos. It then turns Tm into the number you actually set on the thermal cycler — a recommended annealing temperature of Tm − 5 °C and a gradient window to optimise around it.

A PCR either works at the right annealing temperature or it does not, and the right temperature starts from the primer Tm. Too low and primers bind non-specifically and you get a smear; too high and they never bind and you get nothing. Most people never measure Tm directly — they predict it — which is why a calculator that shows its method matters. This tool is part of the PCR & qPCR calculator set and it pairs with the GC content calculator, because GC content is the single biggest driver of the number you get.

Two models are on offer and they answer slightly different questions. The nearest-neighbour method is the default and the one modern tools use: it treats the duplex as a stack of base-pair steps, because a G next to a C stabilises the helix differently depending on its neighbour, and it folds in salt concentration and primer concentration through published thermodynamics. The Wallace rule is the back-of-the-envelope shortcut — 2 °C per A/T and 4 °C per G/C — that is fine for a short primer and useless for a long one. Showing both, side by side, is the point: when they disagree a lot, the sequence is one where the shortcut is lying to you.

Tm is not annealing temperature. The annealing temperature (Ta) is what the cycler runs, and it sits a few degrees below Tm so the primer can actually find its target in the time the step allows. The standard starting point is Ta = Tm − 5 °C, and because every prediction has error, the honest workflow is a gradient PCR across a window around that value. This calculator reports the recommended Ta and a gradient window (Tm − 10 to Tm + 5) so you can go straight from a sequence to a cycler program. If you also need to prepare the reaction itself, the laboratory calculators cover the buffer and stock maths underneath.

One thing this tool deliberately does not do is pretend to know your exact buffer. Magnesium raises Tm substantially and different polymerase buffers contain different amounts of it, but divalent-ion corrections are model-dependent. Rather than ship an unverified Mg²⁺ formula, the calculator computes your free magnesium (Mg²⁺ minus dNTP, which chelates it) and reports it as guidance, leaving the Tm itself on the well-sourced monovalent (Na⁺) model. The how to calculate primer Tm guide walks through why, and how to reconcile the number with whatever your enzyme supplier recommends.

Primer Tm & Annealing Temperature Calculator

A, C, G, T only (a U is read as T). Spaces and digits are ignored. 2–100 bases.

Total oligo strand concentration. 250 nM is the common IDT/Primer3 default.

Monovalent salt; higher salt raises Tm.

Reported as free [Mg²⁺]; a divalent correction is NOT applied to Tm.

Chelates Mg²⁺: free [Mg²⁺] = Mg²⁺ − dNTP.

Melting temperature (Tm)56.7272 °C
Annealing temp (Tm − 5)51.7272 °C
Gradient range46.7272 – 61.7272 °C
GC content61.1111 %
Length18 nt
ΔH (enthalpy)−149.7 kcal/mol
ΔS (entropy, salt-corrected)−420.841 cal/(mol·K)
Free [Mg²⁺]— mM
MethodNearest-neighbour

How to use the primer tm calculator

Paste your primer into the Primer sequence box, 5′→3′. Only A, C, G and T are allowed (a U is read as T); spaces and the digit groupings some tools print are ignored. The nearest-neighbour method needs unambiguous bases, so degenerate IUPAC codes like N or R are rejected — run those through the GC content calculator instead.

Choose the Method. Leave it on nearest-neighbour for any real primer; switch to Wallace only to sanity-check a short oligo.

For nearest-neighbour, set the primer concentration (default 250 nM, the common IDT/Primer3 default) and the sodium concentration (default 50 mM). Higher salt stabilises the duplex and raises Tm.

Optionally enter magnesium and dNTP. The calculator reports free [Mg²⁺] = Mg²⁺ − dNTP but does not apply a divalent correction to Tm.

Press Calculate. The primary card is the Tm; the cards below give the recommended annealing temperature, the gradient window, GC%, length, the thermodynamic totals (ΔH and ΔS) and the method used.

Take the annealing temperature to a gradient PCR spanning the reported window, and let the gel — not the prediction — pick your final number.

Primer Tm & Annealing Temperature formula

Nearest-neighbour: Tm = (ΔH × 1000) / (ΔS + R·ln(Ct/4)) − 273.15
Salt correction: ΔS = ΔS(NN+init) + 0.368·(N − 1)·ln[Na⁺]
Wallace rule: Tm = 2·(A + T) + 4·(G + C)
Annealing temp: Ta = Tm − 5
ΔH in kcal/mol, ΔS in cal/(mol·K), R = 1.9872 cal/(mol·K), Ct = total primer strand concentration in M (Ct/4 for a non-self-complementary primer in excess), [Na⁺] in M, N = primer length in bases. Nearest-neighbour parameters from SantaLucia 1998.

Variables and units

SymbolMeaningUnit
TmMelting temperature°C
TaRecommended annealing temperature (Tm − 5)°C
ΔHEnthalpy of duplex formation (summed nearest-neighbour + initiation)kcal/mol
ΔSEntropy of duplex formation, salt-correctedcal/(mol·K)
RGas constant1.9872 cal/(mol·K)
CtTotal primer strand concentrationM
[Na⁺]Monovalent (sodium) salt concentrationM
NPrimer lengthbases

How primer tm is calculated

  1. Clean the sequence (uppercase, drop spaces/digits) and read any U as T. Reject degenerate codes for the nearest-neighbour method.
  2. Walk the sequence 5′→3′ and for each adjacent base pair look up its nearest-neighbour ΔH and ΔS, mapping each step to its canonical Watson-Crick pair (so AC and GT share one value).
  3. Add the initiation terms: a terminal G·C or A·T base pair contributes its own ΔH/ΔS at each end. Add the −1.4 e.u. symmetry term if the primer is self-complementary.
  4. Apply the salt correction: ΔS += 0.368·(N − 1)·ln[Na⁺], with [Na⁺] in molar.
  5. Compute Tm = (ΔH × 1000) / (ΔS + R·ln(Ct/4)) − 273.15, using Ct/4 for a normal primer (Ct for a self-complementary one).
  6. For the Wallace method instead, simply compute 2·(A+T) + 4·(G+C) with no salt or concentration term.
  7. Report Ta = Tm − 5 and the gradient window Tm − 10 to Tm + 5, plus GC% and length.

Worked laboratory examples

Example 1 — Nearest-neighbour Tm for a real 18-mer

Given: sequence 5′-GCGCATGCGCATACGTAG-3′ (18 nt, 61.1% GC) · primer 250 nM · Na⁺ 50 mM

  1. Sum the 17 nearest-neighbour stacks plus the two terminal initiation terms: ΔH = −149.7 kcal/mol, ΔS(NN+init) = −402.1 cal/(mol·K).
  2. Salt correction: 0.368 × 17 × ln(0.05) = −18.7, so ΔS = −420.8 cal/(mol·K).
  3. Concentration term: R·ln(250 nM / 4) = 1.9872 × ln(6.25 × 10⁻⁸) = −33.0.
  4. Tm = (−149.7 × 1000) / (−420.8 − 33.0) − 273.15 = 329.9 − 273.15 = 56.7 °C.

Result: Tm ≈ 56.7 °C → anneal at ≈ 51.7 °C, gradient 46.7–61.7 °C

Example 2 — Wallace vs nearest-neighbour on the same primer

Given: same 18-mer GCGCATGCGCATACGTAG · GC = 11, AT = 7

  1. Wallace: 2 × (A+T) + 4 × (G+C) = 2 × 7 + 4 × 11 = 14 + 44 = 58 °C.
  2. Nearest-neighbour (Example 1): 56.7 °C.
  3. The two independent methods agree to within ~1.3 °C, which is typical for a clean primer.

Result: Wallace 58 °C, nearest-neighbour 56.7 °C — consistent

Example 3 — Salt moves Tm

Given: sequence CGTACGTCGATGCATGCA (18 nt, 55.6% GC) · primer 250 nM

  1. At 50 mM Na⁺: Tm = 55.2 °C.
  2. At 100 mM Na⁺: Tm = 58.4 °C.
  3. Doubling the monovalent salt raised Tm by ~3 °C — always quote the salt your Tm was computed at.

Result: Tm 55.2 °C (50 mM Na⁺) → 58.4 °C (100 mM Na⁺)

Example 4 — A short oligo where Wallace is fine

Given: sequence ACGTTGCA (8 nt, 50% GC)

  1. Wallace: 2 × 4 + 4 × 4 = 8 + 16 = 24 °C.
  2. Such a short primer melts far below any normal annealing temperature — it would not work as a PCR primer.

Result: Wallace Tm ≈ 24 °C (too short to use)

Want the reasoning behind the numbers? Read How to Calculate Primer Tm and How to Choose a PCR Annealing Temperature.

How to interpret the result

The primary Tm is a prediction, not a measurement. Treat it as the centre of a range: two reputable tools using different salt or divalent models can legitimately differ by 1–3 °C on the same sequence. What matters is that you know which model produced your number and that you optimise empirically around it.

The recommended annealing temperature (Tm − 5) is a starting point, not a law. For a clean single band many people anneal 3–5 °C below Tm; for a difficult or GC-rich template a gradient across the reported window is the fastest way to find the truth. The gradient window here (Tm − 10 to Tm + 5) is built to bracket the useful range.

ΔH and ΔS are shown so the number is not a black box: a large negative ΔH (strong stacking) and the salt-corrected ΔS together set Tm. If two primers have similar GC% but different Tm, it is their nearest-neighbour stacking order — visible in these totals — that explains it. For the composition alone, see the GC content calculator.

Free [Mg²⁺] is reported because magnesium is the variable most often missing from a Tm prediction. A high free Mg²⁺ will push the real Tm above what this Na⁺-only model shows, which is one more reason to confirm by gradient rather than trust a single figure.

Assumptions

  • The duplex forms as a simple two-state helix in dilute aqueous buffer, with no mismatches, hairpins or self-dimers.
  • The primer is non-self-complementary and in excess over template, so Ct/4 is used; palindromic inputs switch to Ct with the −1.4 e.u. symmetry correction.
  • Monovalent salt is the only ion folded into Tm; the 0.368·(N−1)·ln[Na⁺] correction is the SantaLucia 1998 form.
  • Nearest-neighbour parameters are the SantaLucia 1998 unified set (the same default Primer3 uses), valid near 1 M NaCl before the salt correction is applied.

Limitations

  • No divalent (Mg²⁺) correction is applied; free [Mg²⁺] is guidance only. Polymerase buffers rich in Mg will give a higher real Tm.
  • Secondary structure (hairpins, self- and hetero-dimers) is not modelled — a primer can have a good Tm and still fail.
  • Degenerate bases are rejected for nearest-neighbour; the model needs unambiguous A/C/G/T.
  • Tm predictions from different tools differ by a few °C; this page states its model so you can reconcile it with your supplier’s number.

Common mistakes

  • Setting the annealing temperature equal to Tm instead of a few degrees below it, and getting no product.
  • Comparing a Tm computed at one salt concentration with a protocol that uses another, and blaming the primer.
  • Trusting the Wallace rule for a long or GC-rich primer, where the nearest-neighbour method is markedly more accurate.
  • Forgetting that Mg²⁺ in the master mix raises Tm, so a Na⁺-only prediction sits below the real melting point.
  • Using a single predicted Tm for a multiplex without checking that all primers actually share a workable annealing temperature.

FAQ

What is primer Tm?

The melting temperature is the point at which half of the primer duplex is bound and half is dissociated. Above it the primer will not stay on the template; below it, it binds. It depends on length, GC content, salt and primer concentration.

What annealing temperature should I use?

Start at Tm − 5 °C and run a gradient PCR across roughly Tm − 10 to Tm + 5 °C. The prediction gets you into the right neighbourhood; the gradient finds the exact value for your template and enzyme.

Why do two calculators give different Tm for the same primer?

Because they use different thermodynamic parameter sets, salt models and divalent corrections, and different default primer concentrations. Differences of 1–3 °C are normal. This tool uses the SantaLucia 1998 nearest-neighbour set at the salt and concentration you enter, and shows its ΔH and ΔS so you can see where the number comes from.

What is the Wallace rule and when is it good enough?

Tm = 2·(A+T) + 4·(G+C). It ignores salt, concentration and base-stacking order, so it is a quick estimate best for primers shorter than about 14 nt. For anything longer or GC-rich, use the nearest-neighbour method.

Does magnesium change the Tm?

Yes, substantially — divalent cations stabilise the duplex and raise Tm. This calculator reports free [Mg²⁺] = Mg²⁺ − dNTP as guidance but does not apply a divalent correction, so the reported Tm is the monovalent (Na⁺) value. Expect the real Tm in a Mg-containing master mix to be higher.

How does GC content affect Tm?

G·C pairs stack more stably than A·T pairs, so higher GC% means higher Tm — roughly the "4 °C per G/C" intuition behind the Wallace rule. Use the GC content calculator to see the composition that drives your Tm.

Can I use this for probes or long oligos?

The nearest-neighbour method handles sequences up to 100 bases, but the tool assumes a simple primer-template duplex. For hydrolysis probes, molecular beacons or long constructs, confirm with a dedicated tool that models the specific chemistry.

Scientific Sources

External links open in a new tab and carry rel="nofollow". We cite primary references (NIST, NIH/NCBI, peer-reviewed papers) and established manufacturer technical documentation (NEB, Thermo Fisher, Promega, IDT). Calculated results are estimates; your protocol and manufacturer guidance take precedence.

Last reviewed: 2026-09 · Method version: 1.0