Bench Tools Free browser-based calculators for the lab and for bioinformatics

ToolsSequence tools

Nearest-Neighbor Primer Tm Calculator

Calculate primer Tm by nearest-neighbor thermodynamics, returning ΔH°, ΔS°, ΔG°₃₇, with Mg²⁺ and dNTP converted to Na⁺ equivalent.

5′-GC-3′-2.235′-CG-3′-2.165′-GG-3′-1.835′-CA-3′-1.465′-GT-3′-1.455′-GA-3′-1.315′-CT-3′-1.295′-AA-3′-0.995′-AT-3′-0.875′-TA-3′-0.59
Nearest-neighbor stacking free energies ΔG° at 37 °C (kcal/mol, SantaLucia & Hicks 2004). More negative means more stable. The most stable 5′-GC-3′ and the least stable 5′-TA-3′ differ by 1.64 kcal/mol — which is why the same base composition in a different order gives a different Tm.

Use the nearest-neighbor thermodynamic model to calculate the melting temperature Tm of a DNA oligonucleotide, together with ΔH°, ΔS°, and ΔG°₃₇. The calculator also converts Mg²⁺ and dNTP in your PCR buffer to a Na⁺ equivalent — a step that is frequently overlooked but can shift Tm by more than 6 °C.

The sequence statistics page computes Tm via the Wallace rule and the GC formula and explicitly states that “for setting a PCR annealing temperature, use the nearest-neighbor thermodynamic model” — this page provides exactly that.

Why the GC formula falls short

The GC formula Tm = 64.9 + 41 × (GC − 16.4) / N uses only two numbers: length and GC count. In other words, any two sequences with the same length and GC content will receive the same Tm.

Duplex stability, however, depends not just on base composition but on the order of the bases: the energy contribution comes from stacking interactions between adjacent base pairs, not from individual bases.

The two 20 nt sequences below both have exactly 50% GC:

Sequence GC formula Nearest-neighbor (2004)
GATACCTCTCCTTATCCCTC 51.8 °C 49.4 °C
AACGCAACGCCACCCAAAAA 51.8 °C 58.6 °C

The GC formula treats these two sequences as identical; the nearest-neighbor model differs by 9.1 °C. Setting an annealing temperature of 51.8 °C would leave the second primer annealing too loosely — risking non-specific bands — and the first annealing too tightly — possibly eliminating product altogether.

(Both sequences were selected from 8,000 random 20 nt, 50% GC sequences as the lowest and highest nearest-neighbor Tm.)

How much do stacking energies vary

The chart at the top of this page lists the free energy at 37 °C for all 10 dinucleotide combinations, making clear why sequence order matters.

The most stable GC/CG and the least stable TA/AT differ by 1.64 kcal/mol. A 20 nt primer has 19 such stacking steps; differences accumulate one by one and ultimately appear as several degrees of Tm difference. Note that AT/TA and TA/AT have identical base composition yet ΔG°₃₇ values of −0.87 and −0.59 kcal/mol, respectively — which base sits at the 5′ end and which at the 3′ end both affect stability, something that is fundamentally beyond the reach of the GC formula.

Nearest-neighbor thermodynamic parameters

Stack ΔH° (kcal/mol) ΔS° (cal/(K·mol)) ΔG°₃₇ (kcal/mol)
GC/CG -9.8 -24.4 -2.23
CG/GC -10.6 -27.2 -2.16
GG/CC -8.0 -19.9 -1.83
CA/GT -8.5 -22.7 -1.46
GT/CA -8.4 -22.4 -1.45
GA/CT -8.2 -22.2 -1.31
CT/GA -7.8 -21.0 -1.29
AA/TT -7.6 -21.3 -0.99
AT/TA -7.2 -20.4 -0.87
TA/AT -7.2 -21.3 -0.59

Initiation ΔH° = 0.2, ΔS° = -5.7; each terminal A or T adds ΔH° = 2.2, ΔS° = 6.9; a self-complementary sequence adds -1.4 to ΔS°. Table from SantaLucia & Hicks (2004); the tool can switch to Allawi & SantaLucia (1997).

ΔG°₃₇ in the table is derived from the ΔH° and ΔS° in the same table using ΔG = ΔH − 310.15 × ΔS / 1000; it agrees with the independently fitted ΔG° values in the literature to within 0.015 kcal/mol.

Mg²⁺ must be accounted for

Many online Tm calculators have no Mg²⁺ in their default conditions (this tool’s default is also 0), while a typical PCR reaction contains 1.5–2 mM Mg²⁺. Using the former to set the annealing temperature for the latter will give a value that is too low.

Divalent cations stabilize duplexes far more than monovalent cations. The standard conversion is [Na⁺]eq = [Na⁺] + 120 × √([Mg²⁺] − [dNTP]) (concentrations in mM). dNTP is subtracted because it chelates free Mg²⁺.

Example using ACTGGTCAACGTATGCAAGT (250 nM primer):

Condition Monovalent Na⁺ equivalent Tm
50 mM Na⁺, no Mg²⁺ 50 mM 53.8 °C
50 mM Na⁺ + 1.5 mM Mg²⁺ + 0.2 mM dNTP 187 mM 60.3 °C
Same, Mg²⁺ raised to 2.0 mM 211 mM 61.0 °C

The same primer shifts from 53.8 °C to 60.3 °C. This explains why “the Tm calculator said 54 °C, yet annealing at 55 °C gives smears” — the actual Tm in your reaction is 60 °C, and 55 °C is far too permissive.

Three methods compared on the same sequence

Using ACTGGTCAACGTATGCAAGT (20 nt, 45% GC, 250 nM primer, 50 mM Na⁺):

Method Tm
Wallace rule 2×AT + 4×GC 58.0 °C
GC formula 49.7 °C
Nearest-neighbor (2004) 53.8 °C

The three methods differ by more than 8 °C. The Wallace rule was designed for oligonucleotides of 14 nt or fewer and substantially overestimates Tm for 20 nt sequences; the GC formula is appropriate for 14–50 nt but, as noted above, cannot distinguish sequence order. For this primer, ΔH° = −153.2 kcal/mol, ΔS° = −435.6 cal/(K·mol), ΔG°₃₇ = −18.08 kcal/mol.

Two parameter sets

The tool lets you switch between two nearest-neighbor parameter sets:

For the vast majority of primers the two sets agree to within 0.5 °C. Both are provided because different software uses different defaults, which is one of the most common reasons two websites report different Tm values.

Sources for data and implementation

The parameter values were not manually transcribed: they were extracted programmatically from two independent source files — primer3’s oligotm.c and Biopython’s MeltingTemp.py — and cross-checked item by item; all 16 dinucleotide ΔH° and ΔS° values agree. The calculations on this page were further validated against Biopython’s Tm_NN on 4,004 random sequences; the maximum deviation was 6×10⁻¹⁴ °C.

Scope of this tool

Fully complementary duplexes only. When a primer contains mismatches or dangling ends relative to the template, additional mismatch parameters are required; this tool does not handle those cases.

No dimer or hairpin check. A primer with an acceptable Tm may still self-anneal. Use the primer dimer checker alongside this calculator.

Design-phase Tm only — not what is in your tube. For resuspending a primer pellet or preparing working stocks, see the oligo resuspension and dilution calculator.

No template-specificity check. Whether a primer has off-target binding sites in the genome must be assessed with Primer-BLAST.

Salt correction follows SantaLucia (1998), consistent with the santalucia mode in primer3. Some tools (e.g., IDT OligoAnalyzer) use the Owczarzy (2004/2008) correction; results will not agree exactly, especially in the presence of Mg²⁺.

FAQ

Why is the Tm here different from the IDT website?

There are three common reasons, roughly in order of effect size. First, Mg²⁺: if the other tool's default conditions contain no Mg²⁺ while your reaction has 1.5–2 mM, Tm will differ by 6 °C or more — enter your actual Mg²⁺ and dNTP concentrations and compare again. Second, primer concentration: this tool defaults to 250 nM; some calculators default to 50 nM, which shifts Tm by 2.2 °C for the same sequence. Third, the salt-correction formula: this tool uses the SantaLucia (1998) correction, consistent with primer3's santalucia mode; some tools use the Owczarzy (2004/2008) correction, which gives different results.

What annealing temperature should I use?

A common empirical starting point is to take the lower Tm of the two primers and subtract about 5 °C, then confirm with a gradient PCR experiment around that value. This is a rule of thumb only: high-fidelity polymerases (e.g., Q5, Phusion-type enzymes) often come with their own conversion guidelines — follow the instructions for whichever enzyme you are using. This tool reports Tm, not annealing temperature.

How much can the two primer Tm values differ?

A commonly cited limit is 5 °C. A single annealing temperature must work for both primers simultaneously; when Tm values differ too much, the lower-Tm primer anneals poorly while the higher-Tm primer risks off-target binding. The gap is usually corrected by adjusting primer length rather than by forcing the annealing temperature.

When can the Wallace rule or GC formula still be used?

The Wallace rule (2×AT + 4×GC) is appropriate only for oligonucleotides of 14 nt or fewer; applied to longer sequences it substantially overestimates Tm. The GC formula is reasonable for 14–50 nt but, as noted in the introduction, sees only length and GC count. The two 20 nt, 50% GC sequences shown above receive the same GC-formula Tm yet differ by 9.1 °C under the nearest-neighbor model. For setting PCR conditions, use the nearest-neighbor model.

What is ΔG°₃₇ used for?

It measures duplex stability at 37 °C: more negative means more stable. It is useful when designing probes or siRNA, or when comparing the relative stability of several candidate primers. The ΔG° reported here is for the primer hybridizing to its fully complementary strand — it is not the ΔG° for self-folding or dimerization, which requires dedicated secondary-structure algorithms.

Why are self-complementary sequences handled separately?

A palindromic sequence (reverse complement equals itself) melts from a duplex in which both strands are identical, which changes both the concentration term and the symmetry entropy: the concentration term changes from CT/4 to CT, and ΔS° receives an additional −1.4 cal/(K·mol) symmetry correction. This tool detects palindromic sequences automatically and flags them as "self-complementary (palindrome)" in the results.

Are the data reliable, or did a language model generate them?

No model generated the parameter values. The nearest-neighbor parameters were extracted programmatically from two independent source files — primer3's oligotm.c and Biopython's MeltingTemp.py — and all 16 dinucleotide ΔH° and ΔS° values were cross-checked and found to agree. The calculations were further validated against Biopython's Tm_NN on 4,004 random sequences; the maximum deviation was 6×10⁻¹⁴ °C. The primary literature is cited in the "Sources for data and implementation" section of the introduction.

Related tools

DNA / RNA Reverse Complement Online Converter

Paste a sequence to get its reverse complement, complement, or reverse; supports FASTA input and IUPAC degenerate bases.

Online DNA GC Content and Tm Calculator

Calculate GC%, base composition, molecular weight, and two empirical Tm values — for rapid primer screening.

DNA to Protein Translation — Six-Frame Online Tool

Standard genetic code (NCBI table 1): single-frame or six-frame translation with ORF finder.

No ads, no tracking, no sign-up — and every formula here is checked against a known answer. Keeping it that way takes ongoing work. If it saved you time, buy me a coffee.
Buy me a coffee