Primer Tm Calculator (Nearest-Neighbour)
Work out the melting temperature of a PCR primer or oligo three ways: the Wallace rule, the salt-adjusted formula and SantaLucia nearest-neighbour thermodynamics with Na⁺, Mg²⁺, dNTP and primer concentrations, plus GC content, molecular weight and 3′-end checks.
How to Use
- Choose Single primer or Primer pair, then paste the sequence 5′ to 3′. Spaces, line breaks and 5′-/-3′ labels are ignored; U is read as T.
- Set the buffer: monovalent salt (Na⁺ + K⁺), Mg²⁺ and total dNTPs in mM, and the primer concentration in nM. The defaults match a typical PCR.
- Pick the nearest-neighbour table (SantaLucia 1998 unified or SantaLucia & Hicks 2004) and the salt correction (SantaLucia 1998 or Owczarzy 2008 for Mg²⁺).
- Read the three Tm values in the readouts; the nearest-neighbour value is the one to design with. In pair mode the difference should be under 5 °C.
- Check the 3′-end warnings for hairpins and dimers, and open Show Work for the full ΔH/ΔS sum of every nearest-neighbour pair.
Worked Example
The T7 promoter primer. TAATACGACTCACTATAGGG is 20 nt with 8 G/C (40%). The Wallace rule gives 2 × 12 + 4 × 8 = 56 °C. The salt-adjusted formula with the sodium equivalent of 50 mM K⁺ plus 1.5 mM Mg²⁺ (less 0.8 mM dNTPs), 150.4 mM, gives 50.49 °C. The nearest-neighbour method sums ΔH and ΔS over the 19 base-pair steps plus the terminal-pair terms, corrects ΔS for salt and uses the 250 nM primer concentration: Tm = 54.13 °C.
Checking against Biopython. For CGTTCCAAAGATGTGGGCATGAGCTTAC at 50 mM Na⁺ with 25 nM of each strand, the tool gives 60.32 °C, the value in Biopython’s own documentation for the same settings.
The common mistake: using the Wallace rule for a long primer. That 28-mer has 14 A/T and 14 G/C, so the rule gives 2 × 14 + 4 × 14 = 84 °C, almost 24 °C above the nearest-neighbour 60.32 °C. Annealing at a temperature based on 84 °C would stop the primer binding at all. The rule only holds for short oligos in high salt.
Show Work
Formulas
From Base Counting to Nearest Neighbours
In 1962 Julius Marmur and Paul Doty showed that the melting temperature of DNA rises in a straight line with its G·C content, and in 1965 Carl Schildkraut and Shneior Lifson added the dependence on salt. When Kary Mullis’s polymerase chain reaction (devised in 1983, Nobel Prize 1993) made short synthetic primers everyday tools, the quick “2 + 4” rule of Thein and Wallace (1986) became the bench estimate.
Base counting ignores the fact that a duplex is held together mainly by the stacking of neighbouring base pairs. Breslauer and colleagues published the first nearest-neighbour table for DNA in 1986, and in 1998 John SantaLucia Jr. combined the published data sets into the “unified” parameters (with Allawi & SantaLucia 1997), refined by SantaLucia and Hicks in 2004. Salt corrections followed: von Ahsen and colleagues’ sodium equivalent for Mg²⁺ (2001) and Owczarzy and colleagues’ magnesium model (2008).
The parameter tables and the order of the calculation on this page are transcribed from Biopython’s open-source Bio.SeqUtils.MeltingTemp module (Tm_NN, Tm_GC, Tm_Wallace and salt_correction), and the results match the values in its documentation.
About This Tool
This calculator gives the melting temperature of a DNA oligo by three methods side by side, so you can see why bench rules and design software disagree. The nearest-neighbour result takes the buffer into account (monovalent salt, Mg²⁺, dNTPs) and the primer and template concentrations, detects self-complementary sequences, and shows the ΔH and ΔS of every base-pair step. It also reports GC content, the reverse complement, the molecular weight, and simple 3′-end checks for hairpins, self-dimers and cross-dimers. Those checks are heuristics: they look for 4 or more complementary bases at the 3′ end, not for full folding energies, and the tool assumes a perfectly matched duplex.
Everything runs in your browser; nothing you enter is sent anywhere.
Related tools: DNA Concentration Calculator, Molarity Calculator, and Dilution Calculator.
Frequently Asked Questions
How is primer melting temperature calculated?
There are three common methods. The Wallace rule counts bases, the salt-adjusted formula uses GC content, length and [Na⁺], and the nearest-neighbour method adds up the stacking energy of each base pair step. For the T7 primer TAATACGACTCACTATAGGG in a typical PCR buffer (50 mM K⁺, 1.5 mM Mg²⁺, 0.8 mM dNTPs, 250 nM primer) they give 56 °C, 50.49 °C and 54.13 °C.
What is the Wallace rule and when can I use it?
Tm = 2 °C × (A + T) + 4 °C × (G + C), from Thein and Wallace (1986). It is a quick estimate for 14–20-mers in about 0.9 M salt: ACGTTGCAATGCCGTA has 8 A/T and 8 G/C, so 2 × 8 + 4 × 8 = 48 °C. For longer primers it runs far too high: the 28-mer CGTTCCAAAGATGTGGGCATGAGCTTAC gives 84 °C by the rule but 60.32 °C by nearest-neighbour at 50 mM Na⁺.
How does Mg²⁺ change the Tm?
Divalent magnesium stabilises the duplex much more than sodium. For the 28-mer above at 55 mM monovalent salt and 25 nM strands, Tm is 60.79 °C; adding 1.5 mM Mg²⁺ raises it to 67.39 °C with the sodium-equivalent method or 66.81 °C with the Owczarzy 2008 correction. dNTPs bind Mg²⁺, so 0.6 mM dNTPs bring it back to 66.04 °C.
How close should the Tm of two PCR primers be?
A common guideline is within 5 °C, because one annealing temperature has to suit both. The classic M13 forward (−20) GTAAAACGACGGCCAGT and M13 reverse CAGGAAACAGCTATGAC primers come out at 59.14 °C and 53.51 °C in a typical PCR buffer, a 5.63 °C gap, so this tool flags them.
Why do different Tm calculators disagree?
They use different parameter tables, salt corrections and strand concentrations. For the T7 primer in PCR buffer, the SantaLucia 1998 table gives 54.13 °C and SantaLucia & Hicks 2004 gives 54.05 °C; switching to the Owczarzy Mg²⁺ correction gives 53.17 °C; and cutting the primer from 250 nM to 25 nM lowers it to 50.87 °C. Always compare like with like.
How do I use the Primer Tm Calculator (Nearest-Neighbour)?
Just type your numbers. The answer shows up right away — there is no button to press. Change anything and it updates by itself.
Does it cost anything or need an account?
No. The tool is completely free, there is no account to create, and it keeps working offline after the page first loads.
Is anything I type uploaded?
No. The tool works entirely on your device, so the values you enter never leave your browser.
Common Use Cases
Designing PCR primers
Check a primer pair before ordering: M13 forward and reverse at 59.14 °C and 53.51 °C differ by 5.63 °C, more than the usual 5 °C limit.
Choosing an annealing temperature
The T7 promoter primer melts at 54.13 °C in a typical PCR buffer, the starting point for the annealing step.
Spotting primer dimers
A primer ending in GAATTC (an EcoRI site) has a 6-base self-complementary 3′ end and is flagged as a self-dimer risk.
Probes and hybridisation
At 50 mM Na⁺ with 25 nM of each strand, the 28-mer CGTTCCAAAGATGTGGGCATGAGCTTAC melts at 60.32 °C, matching Biopython.
Ordering oligos
The same 28-mer weighs 8,628.65 g/mol, so one A260 unit (about 33 µg) is about 3.824 nmol.
Last updated: