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
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
Variables and units
| Symbol | Meaning | Unit |
|---|---|---|
| Tm | Melting temperature | °C |
| Ta | Recommended annealing temperature (Tm − 5) | °C |
| ΔH | Enthalpy of duplex formation (summed nearest-neighbour + initiation) | kcal/mol |
| ΔS | Entropy of duplex formation, salt-corrected | cal/(mol·K) |
| R | Gas constant | 1.9872 cal/(mol·K) |
| Ct | Total primer strand concentration | M |
| [Na⁺] | Monovalent (sodium) salt concentration | M |
| N | Primer length | bases |
How primer tm is calculated
- Clean the sequence (uppercase, drop spaces/digits) and read any U as T. Reject degenerate codes for the nearest-neighbour method.
- 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).
- 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.
- Apply the salt correction: ΔS += 0.368·(N − 1)·ln[Na⁺], with [Na⁺] in molar.
- Compute Tm = (ΔH × 1000) / (ΔS + R·ln(Ct/4)) − 273.15, using Ct/4 for a normal primer (Ct for a self-complementary one).
- For the Wallace method instead, simply compute 2·(A+T) + 4·(G+C) with no salt or concentration term.
- 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
- 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).
- Salt correction: 0.368 × 17 × ln(0.05) = −18.7, so ΔS = −420.8 cal/(mol·K).
- Concentration term: R·ln(250 nM / 4) = 1.9872 × ln(6.25 × 10⁻⁸) = −33.0.
- 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
- Wallace: 2 × (A+T) + 4 × (G+C) = 2 × 7 + 4 × 11 = 14 + 44 = 58 °C.
- Nearest-neighbour (Example 1): 56.7 °C.
- 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
- At 50 mM Na⁺: Tm = 55.2 °C.
- At 100 mM Na⁺: Tm = 58.4 °C.
- 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)
- Wallace: 2 × 4 + 4 × 4 = 8 + 16 = 24 °C.
- 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?
What annealing temperature should I use?
Why do two calculators give different Tm for the same primer?
What is the Wallace rule and when is it good enough?
Does magnesium change the Tm?
How does GC content affect Tm?
Can I use this for probes or long oligos?
Scientific Sources
- SantaLucia J. (1998) PNAS 95:1460–1465 — unified DNA nearest-neighbour thermodynamics · Tier 1 source
- Primer3 — melting temperature calculation (SantaLucia 1998 default) · Tier 2 source
- IDT OligoAnalyzer — primer analysis and Tm tool · Tier 2 source
- NEB Tm Calculator · Tier 2 source
- Wikipedia — Nucleic acid thermodynamics · Tier 3 source
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