# Primer Tm calculator (nearest-neighbour, with salt and Mg²⁺)

> Free primer Tm calculator for PCR and qPCR: SantaLucia nearest-neighbour Tm with Na⁺/K⁺, Mg²⁺ and dNTP correction, GC %, ΔG and the ΔTm of a primer pair.

URL: https://www.labcanvas.com/tools/primer-tm-calculator

Paste one or two primers (5′→3′) and the calculator gives each primer’s melting temperature from the SantaLucia 1998 nearest-neighbour parameters, corrected for your oligo concentration, Na⁺/K⁺, Mg²⁺ and dNTPs, with the Tm difference between the primers, GC content, molar mass, ΔH°, ΔS°, the G/C count at the 3′ end and the longest repeats.

## Quick answer

- **What it does:** Calculates primer melting temperature with SantaLucia 1998 nearest-neighbour parameters, corrected for oligo, Na⁺/K⁺, Mg²⁺ and dNTP concentrations, plus GC %, ΔG and pair ΔTm.
- **Formula:** Tm = ΔH° ÷ (ΔS° + R ln(C_T/F)) − 273.15; ΔS° += 0.368 × (N − 1) × ln[Na⁺]eq, [Na⁺]eq = [Na⁺] + [K⁺] + [Tris]/2 + 3.79√([Mg²⁺] − [dNTP]).
- **Example:** AGCGGATAACAATTTCACACAGGA at 250 nM in 50 mM K⁺, 1.5 mM Mg²⁺, 0.8 mM dNTP: Tm = 184,400 ÷ (516.74 + 30.21) − 273.15 = 64.0 °C.

Free, in the browser, no account needed. Updated 2026-11-08.

## Features

- Nearest-neighbour Tm with the unified SantaLucia 1998 parameters (10 stacks, terminal initiation, symmetry correction)
- Salt correction for Na⁺ and K⁺, Tris, and Mg²⁺ above the dNTP concentration
- Primer-in-excess (PCR) or equal-strand concentrations
- Two primers at once, with their Tm difference
- GC content, molar mass, \(\Delta H^\circ\), \(\Delta S^\circ\) and \(\Delta G^\circ_{37}\) for each primer
- G/C count in the last five 3′ bases, longest single-base run and dinucleotide repeat, reverse complement
- Copy the result or download a CSV; nothing is uploaded

## How to use it

1. **Paste the primers**: Enter one or two primers 5′→3′. Spaces, numbers and FASTA headers are ignored; only A, C, G and T are accepted.
2. **Set the reaction**: Enter the primer concentration (nM) and the Na⁺ + K⁺, Mg²⁺, total dNTP and Tris concentrations of your buffer (mM).
3. **Choose the strand setting**: Leave “Primer in excess (PCR)” for PCR primers; choose “Equal strands” for two complementary oligos mixed at equal concentration.
4. **Read the result**: Read each Tm and the difference between the two primers, then check GC content, the 3′ end and repeats.
5. **Save it**: Copy the result with its conditions, or download the CSV.

## At a glance

| | |
| --- | --- |
| Model | Two-state nearest-neighbour, SantaLucia 1998 unified parameters |
| Salt correction | \(\Delta S^\circ + 0.368\,(N - 1)\) \(\ln[\mathrm{Na^+}]_\mathrm{eq}\), as implemented in Primer3; Mg²⁺ and Tris as sodium equivalent |
| Strands | Primer in excess (\(C_\mathrm{T}\)) or equal strands (\(C_\mathrm{T}/4\)); self-complementary detected |
| Also gives | GC %, molar mass, \(\Delta H^\circ\), \(\Delta S^\circ\), \(\Delta G^\circ_{37}\), 3′ G/C count, repeats, reverse complement |
| Not included | Mismatches, mixed bases, modifications, DMSO, formamide |

## How it works

$$T_\mathrm{m} = \frac{\Delta H^\circ}{\Delta S^\circ + R\ln(C_\mathrm{T}/F)} - 273.15$$

The duplex is treated as melting in two states. \(\Delta H^\circ\) and \(\Delta S^\circ\) are the sums of the ten nearest-neighbour stacks of the unified DNA parameters (SantaLucia 1998, [PNAS 95:1460](https://doi.org/10.1073/pnas.95.4.1460); the table as printed in [Wang et al. 2025, PLoS One](https://doi.org/10.1371/journal.pone.0321885)), plus an initiation term for each end (terminal G·C: \(\Delta H^\circ\) 0.1 kcal/mol, \(\Delta S^\circ\) −2.8 cal/(K·mol); terminal A·T: 2.3 and 4.1) and, for a self-complementary sequence, a symmetry term of −1.4 cal/(K·mol). \(R = 1.987\ \mathrm{cal/(K{\cdot}mol)}\). \(C_\mathrm{T}\) is the total strand concentration; \(F = 1\) when one strand is in large excess (a PCR primer over its template) or the strand is self-complementary, and \(F = 4\) for two strands at equal concentration ([MELTING 5, Dumousseau et al. 2012](https://doi.org/10.1186/1471-2105-13-101)).

$$\begin{aligned} \Delta S^\circ[\mathrm{Na^+}] &= \Delta S^\circ(1\ \mathrm{M}) \\ &\quad {}+ 0.368 \times (N - 1) \\ &\quad {}\times \ln[\mathrm{Na^+}]_\mathrm{eq} \end{aligned}$$

$$\begin{aligned} [\mathrm{Na^+}]_\mathrm{eq} &= [\mathrm{Na^+}] + [\mathrm{K^+}] + [\mathrm{Tris^+}]/2 \\ &\quad {}+ 3.79\sqrt{[\mathrm{Mg^{2+}}] - [\mathrm{dNTP}]} \end{aligned}$$

The salt correction is the entropy term as implemented in Primer3 (and Biopython), which attribute it to SantaLucia (1998); we could not read the constant in the paper itself. \(N\) is the primer length and concentrations are in mol/L. Mg²⁺ and Tris are converted to a sodium equivalent with the von Ahsen formula (as given in MELTING 5); dNTPs bind Mg²⁺, so only Mg²⁺ above the dNTP concentration counts. This combination is the one von Ahsen et al. ([Brief Bioinform 2011](https://doi.org/10.1093/bib/bbq081)) recommend when Mg²⁺ is present, and with \(C_\mathrm{T}/4\) it gives the same Tm, to within 0.01 °C, as Primer3’s SantaLucia setting.

Molar mass is for the free acid with 5′-OH and 3′-OH ends, from the elemental formulas of the nucleotides and the CIAAW 2021 atomic weights. The model is for a perfectly matched DNA/DNA duplex: mismatches, mixed bases, modifications, DMSO and formamide are not included.

## Worked example

**Primer 5′-AGCGGATAACAATTTCACACAGGA-3′ (24 nt), 250 nM, 50 mM K⁺, 1.5 mM Mg²⁺, 0.8 mM dNTP, primer in excess.**

Summing the 23 stacks and the two terminal initiation terms gives \(\Delta H^\circ = -184.4\ \mathrm{kcal/mol}\) and \(\Delta S^\circ = -500.7\ \mathrm{cal/(K{\cdot}mol)}\) in 1 M NaCl. The sodium equivalent is \(0.050 + 3.79 \times \sqrt{0.0015 - 0.0008}\) \(= 0.1503\ \mathrm{M}\), so the salt term is \(0.368 \times 23 \times \ln 0.1503 = -16.04\) and \(\Delta S^\circ = -516.74\). With \(R\ln C_\mathrm{T} = 1.987 \times \ln(2.5\times10^{-7})\) \(= -30.21\):

$$\begin{aligned} T_\mathrm{m} &= \frac{184\,400}{516.74 + 30.21} - 273.15 \\ &= \mathbf{64.0}\ {}^\circ\mathbf{C} \end{aligned}$$

With equal strands (\(C_\mathrm{T}/4\)) the same primer gives 62.3 °C; in 50 mM Na⁺ with no Mg²⁺, 56.7 °C.

## Questions

### How is the Tm of a primer calculated?

With the nearest-neighbour model: the enthalpy and entropy of the duplex are added up from each pair of neighbouring base pairs (SantaLucia 1998 parameters), and \[ T_\mathrm{m} = \Delta H^\circ / (\Delta S^\circ + R\ln(C_\mathrm{T}/F)) - 273.15, \] after correcting \(\Delta S^\circ\) for the salt in the buffer.

### Why does the Tm depend on the primer concentration?

Duplex formation is a two-strand equilibrium, so the concentration enters the Tm equation through \(R\ln(C_\mathrm{T}/F)\): more primer gives a higher Tm.

### How do Mg²⁺ and dNTPs change the Tm?

Mg²⁺ stabilises the duplex and raises the Tm. dNTPs bind Mg²⁺, so only the Mg²⁺ above the dNTP concentration is counted; it is converted to a sodium equivalent of \(3.79 \times \sqrt{[\mathrm{Mg^{2+}}] - [\mathrm{dNTP}]}\) mol/L.

### Why does another calculator give a different Tm?

Calculators differ in their nearest-neighbour parameters, salt corrections and strand-concentration convention (\(C_\mathrm{T}\) or \(C_\mathrm{T}/4\)). For example, Primer3 uses \(C_\mathrm{T}/4\); choose “Equal strands” here to compare. Check that the concentrations entered match.

### What annealing temperature should I use?

This tool gives the Tm, not an annealing temperature. The optimal annealing temperature depends on the Tm of the less stable primer–template pair and of the product (Rychlik et al. 1990), so it is best confirmed experimentally, for example with a temperature gradient.

### Does it handle mismatches, mixed bases or modified oligos?

No. It calculates the Tm of a perfectly matched DNA/DNA duplex from A, C, G and T only.

### What is a self-complementary primer?

A sequence that is its own reverse complement, such as GCGCGCGCGC. It can pair with itself, so the calculator adds the symmetry correction and uses \(C_\mathrm{T}\) rather than \(C_\mathrm{T}/4\).
