Primer Tm Calculator: Nearest-Neighbour Tm, GC%, Dimers and Hairpins
Paste your forward and reverse primers (and a probe if you have one) to get the nearest-neighbour melting temperature with salt and Mg²⁺ correction, GC content and a primer-quality checklist: length, GC clamp, runs, 3′-end stability, self-dimers, hairpins and the Tm match between the pair, with a suggested annealing temperature.
- PriceFree, no login or sign-up needed
- Your dataProcessed in your browser, never uploaded
- Works onPhone, tablet or computer, any modern browser
- Made byDr. Muhammad Aammar Tufail, Codanics
- Published17 November 2026
- Last updated16 November 2026
📚 How to cite this tool
This tool is free. If it helped your thesis, paper, report or assignment, please cite it. It keeps the tools free and helps other students find them.
Tufail, M. A. (2026). Primer Tm calculator: nearest-neighbour Tm, GC%, dimers and hairpins [Online tool]. Codanics. Retrieved 16 November 2026, from https://codanics.com/tools/primer-tm-calculator/
In-text citation: (Tufail, 2026) · Narrative: Tufail (2026)
The access date is today’s date, filled in automatically. Author: Muhammad Aammar Tufail. Published 17 November 2026.
How to use the primer tm and gc% calculator
- Paste the forward and reverse primers, 5′ to 3′. Spaces, numbers and lowercase letters are cleaned up for you.
- Set the reaction conditions: Na⁺/K⁺, Mg²⁺, dNTPs and primer concentration, or click a preset. Mg²⁺ raises the Tm noticeably.
- Read the nearest-neighbour Tm of each primer, the Tm difference and the suggested annealing temperature.
- Work through the checklist for each primer and the pair. Redesign primers flagged as Problem, especially 3′-end dimers.
How the melting temperature is calculated
The calculator uses the nearest-neighbour model with the unified parameters of SantaLucia (1998), the same model and salt correction as Primer3 (results match Primer3 to 0.01 °C under the same conditions):
ΔH° and ΔS° are summed over every pair of neighbouring bases plus initiation terms, R = 1.987 cal/(K·mol), C is the oligo concentration and N its length. For self-complementary oligos C/4 becomes C and a symmetry correction is added.
For comparison the table also gives the Wallace rule (Tm = 2 × (A+T) + 4 × (G+C), only for oligos under about 14 nt) and the basic salt-adjusted formula (81.5 + 16.6 log[Na⁺] + 0.41 × %GC − 600/N). They often differ from the nearest-neighbour Tm by several degrees, which is why modern design tools use nearest-neighbour values.
Primer design rules of thumb
| Property | Aim for |
|---|---|
| Length | 18–30 nt |
| GC content | 40–60% |
| Tm | 52–68 °C, forward and reverse within 2–5 °C |
| GC clamp | 1–3 G or C in the last 5 bases at the 3′ end |
| Runs and repeats | No more than 3 identical bases or dinucleotide repeats in a row |
| Dimers and hairpins | No stable complementarity, especially at the 3′ end |
| Annealing temperature | Start 3–5 °C below the lower Tm, then optimise with a gradient |
Limitations
The dimer and hairpin screen looks for the strongest perfectly complementary run and uses nearest-neighbour ΔG at 37 °C with simple loop penalties. It does not model mismatches, bulges or dangling ends, so treat it as a quick warning system rather than a full secondary-structure prediction. Degenerate (IUPAC) bases are not supported.
Frequently asked questions
What is the best method to calculate primer Tm?
The nearest-neighbour method, which accounts for the order of bases and the salt and Mg²⁺ in your buffer. Simple formulas such as the Wallace rule can be off by 5 °C or more for typical 20-mers.
Why is my Tm different from another calculator?
Different tools use different parameter sets, salt corrections and default concentrations (for example 50 nM vs 250 nM primer, with or without Mg²⁺). This calculator matches Primer3 when you use the same conditions; click “Primer3 defaults”.
How do I choose the annealing temperature?
Start 3–5 °C below the lower Tm of the two primers and optimise with a gradient PCR. Raise it if you see extra bands; lower it if you get no product.
How much can the two primer Tm values differ?
Ideally within 2 °C, and no more than 5 °C. A large difference forces a low annealing temperature that lets the higher-Tm primer bind non-specifically.
Does Mg²⁺ change the Tm?
Yes. Mg²⁺ stabilises DNA duplexes, so 1.5–2.5 mM Mg²⁺ raises the Tm by several degrees compared with Na⁺ alone. dNTPs bind Mg²⁺, which is why their concentration is also needed.
Are my sequences uploaded?
No. Everything runs in your browser; your primer sequences are never sent anywhere.
Do I need to log in or create an account to use the primer tm and gc% calculator?
No. There is no login, no sign-up and no email required. Open the page and start using it straight away, for free, on any device.
How do I cite this tool in my thesis or paper?
Use the citation box on this page. In APA 7th edition: Tufail, M. A. (2026). Primer Tm calculator: nearest-neighbour Tm, GC%, dimers and hairpins [Online tool]. Codanics. Retrieved [date you used it], from https://codanics.com/tools/primer-tm-calculator/. BibTeX, RIS (EndNote, Mendeley, Zotero), MLA, Harvard, Chicago and Vancouver formats are also available.
Free guides and courses from Codanics
More free tools
See all free Codanics tools → · Codanics on YouTube · WhatsApp channel