Tm Calculator

Calculate DNA melting temperature for primers and oligonucleotides.

Primer Sequence

Enter A, T, G, C only (other characters ignored)

Melting Temperature (Tm)

29.7C
Annealing: 24.7C (Tm - 5)

Sequence Properties

Length20 bp
GC Content50.0%
Molecular Weight6117 Da

Base Composition

A
5
T
5
G
5
C
5

PCR Guidelines

Optimal primer length: 18-25 bp

Optimal GC content: 40-60%

Optimal Tm: 55-65C

Primer pair Tm difference: max 5C

3' end: End with G or C (GC clamp)

What the Tm Calculator Does

The Tm calculator estimates the melting temperature of a DNA primer or oligonucleotide directly from its base sequence. The melting temperature, written as Tm, is the temperature at which half of the double-stranded molecules in a sample have separated into single strands. It is one of the most important numbers in molecular biology because it controls how primers bind their templates during the annealing step of PCR, qPCR, sequencing, site-directed mutagenesis, and hybridization assays.

This melting temperature calculator accepts a sequence written 5' to 3' and ignores any character that is not A, T, G, or C, so you can paste a primer with spaces or formatting without cleaning it first. As soon as the cleaned sequence reaches at least eight bases, the tool reports the predicted Tm, a suggested annealing temperature (Tm minus 5 °C), the sequence length, the GC content, the approximate molecular weight in daltons, and the count of each base. These outputs let you judge primer quality at a glance instead of running a separate GC content calculator or molecular weight calculator.

Because no single equation is correct for every length and salt condition, the calculator offers five methods. A short primer behaves differently from a long oligo, and a reaction run in high salt melts at a higher temperature than the same primer in dilute buffer. Choosing the right method, and entering realistic salt, magnesium, and DMSO values, is what separates a rough guess from a usable primer design number.

The Five Calculation Methods

The Tm calculator implements five established approaches. Each is suited to a different sequence length or accuracy requirement, and the calculator applies the same salt, magnesium, and DMSO corrections on top of whichever method you select.

Method Formula used in the tool Best for
Basic Tm = 2×(A+T) + 4×(G+C) Quick checks on primers under ~14 bp
Wallace Rule Tm = 2×(A+T) + 4×(G+C) Short oligos; identical to Basic
GC Content (Marmur-Doty) Tm = 64.9 + 41×(G+C−16.4)/N Medium-length sequences
Nearest Neighbor Thermodynamic ΔH/ΔS (SantaLucia 1998) Most accurate primer Tm
Salt-Adjusted Tm = 81.5 + 16.6×log10([Na+]) + 41×(GC fraction) − 675/N Longer oligos with explicit salt

The Basic and Wallace rules add 2 °C for every A or T and 4 °C for every G or C; they are fast but ignore length, salt, and stacking, so they overestimate Tm for anything longer than a short oligo. The GC content (Marmur-Doty) method scales the contribution of the combined G and C count by the sequence length N, which makes it more reliable for medium primers. The salt-adjusted equation folds the sodium concentration and length directly into the result, so it responds to buffer changes. The nearest neighbor method is the most accurate and is described in detail below.

The Nearest-Neighbor Method (Most Accurate)

The default and most accurate option is the nearest-neighbor model. Instead of treating bases independently, it recognises that the stability of a duplex depends on which base sits next to which. The calculator walks through every overlapping pair of bases (dinucleotide) in your primer and adds up the enthalpy (ΔH°) and entropy (ΔS°) contributions from the SantaLucia 1998 unified parameter set, measured in cal/mol and cal/mol·K respectively.

After summing all 16 possible dinucleotide steps, the tool adds a small initiation correction (+100 cal/mol to ΔH° and −2.8 cal/mol·K to ΔS°) to account for helix formation, then solves the thermodynamic relationship for Tm and converts from Kelvin to Celsius. Finally it applies the monovalent-salt term using the sodium concentration you entered. This is why two primers with identical GC content can still report different melting temperatures: their dinucleotide stacks differ.

The nearest-neighbor approach is the standard used by professional primer-design pipelines, so when you need a number you can act on, leave the method on Nearest Neighbor (most accurate) and enter your true primer concentration and salt.

Nearest-Neighbor Melting Temperature (SantaLucia 1998)

Tm = ΔH° / (ΔS° + R · ln(C_T / 4)) − 273.15 + 16.6 · log₁₀([Na⁺])

Where:

  • Tm= Melting temperature in degrees Celsius, where half the duplex has dissociated into single strands.
  • ΔH°= Sum of nearest-neighbor enthalpy values (cal/mol) for every overlapping dinucleotide, plus a +100 cal/mol initiation term.
  • ΔS°= Sum of nearest-neighbor entropy values (cal/mol·K) for every dinucleotide, plus a −2.8 cal/mol·K initiation term.
  • R= Universal gas constant, 1.987 cal/(mol·K).
  • C_T= Total primer (strand) concentration in mol/L; divided by 4 for non-self-complementary oligonucleotides.
  • [Na⁺]= Monovalent sodium-ion concentration in mol/L used for the salt-correction term.

Salt, Magnesium, and DMSO Corrections

Melting temperature is not a property of the sequence alone — the surrounding chemistry matters. After the chosen method produces a base value, this Tm calculator applies three buffer corrections so the result reflects your real reaction.

Sodium (salt) correction. Monovalent cations such as Na+ shield the negatively charged phosphate backbone and stabilise the duplex, raising Tm. In the salt-adjusted and nearest-neighbor methods the tool adds 16.6 × log10 of the sodium concentration expressed in molar. Because 50 mM equals 0.05 M and the logarithm of a number below 1 is negative, modest salt concentrations actually pull the corrected Tm downward relative to a 1 M reference, which is why entering a realistic 50 mM Na+ noticeably lowers the displayed value.

Magnesium correction. Mg2+ ions are essential cofactors for polymerases and strongly affect duplex stability. When magnesium is greater than zero, the calculator applies a term of 0.7 × log10([Mg2+]/1000) × 10. At the default 1.5 mM this term is large and negative (about −19.8 °C), so the predicted Tm drops considerably. If you want to see the uncorrected melting temperature, simply set Mg2+ to 0 and the magnesium term is skipped entirely.

DMSO correction. Dimethyl sulfoxide is a common PCR additive that disrupts base pairing, so each percent of DMSO lowers Tm. The calculator subtracts 0.6 °C for every 1% DMSO you enter, matching the widely cited 0.5–0.6 °C per percent estimate.

How to Use the Tm Calculator

Enter your oligonucleotide in the sequence box, written 5' to 3'. The Tm calculator strips out anything that is not A, T, G, or C, so pasted FASTA fragments or spaced-out sequences are handled automatically. Remember that the cleaned sequence must contain at least eight bases before any result appears.

  1. Sequence: paste or type the primer; only the four standard DNA bases are counted.
  2. Calculation method: choose Nearest Neighbor for accuracy, or a simpler rule for a quick estimate.
  3. Primer concentration (nM): the total strand concentration; used by the nearest-neighbor equation.
  4. Salt concentration (mM Na+): your monovalent cation level, typically 50 mM for standard PCR.
  5. Mg2+ concentration (mM): magnesium in the reaction; set to 0 to disable the magnesium correction.
  6. DMSO (%): any DMSO additive, which lowers the predicted Tm.

The result panel shows the melting temperature, the suggested annealing temperature (Tm minus 5 °C), the sequence length in base pairs, the GC content percentage, the approximate molecular weight, and a breakdown of how many A, T, G, and C bases the primer contains. Read these alongside the built-in PCR guidelines to judge whether the primer is well designed.

Interpreting Results and Designing Better Primers

A good PCR primer usually has a melting temperature between 55 and 65 °C, a length of 18 to 25 nucleotides, and a GC content of 40 to 60%. The Tm calculator surfaces all three numbers so you can iterate quickly. The single most useful output for benchwork is the annealing temperature: starting roughly 5 °C below the lower primer Tm gives the polymerase a good chance of specific binding without sacrificing yield.

When you design a primer pair, calculate the Tm of both primers and keep them within about 5 °C of each other. A large mismatch means one primer binds efficiently while the other lags, producing weak or off-target product. The reported GC content also flags problems early: too low and the duplex is unstable, too high and you risk secondary structure and difficult denaturation.

Finally, favour a 3' terminal G or C — the so-called GC clamp — to anchor the priming end, and avoid runs of four or more identical bases that can cause slippage. Combined with the molecular weight and base-composition readouts, this melting temperature calculator gives you everything needed to screen candidate primers before ordering them, saving both time and reagent cost at the bench.

Worked Examples

Basic rule for a 12-mer primer

Problem:

Estimate the Tm of 5'-ATGCATGCATGC-3' using the Basic (2xAT + 4xGC) method with Mg2+ and DMSO set to 0.

Solution Steps:

  1. 1Count the bases: A=3, T=3, G=3, C=3, so A+T = 6 and G+C = 6 across the 12 bp.
  2. 2Apply the basic rule: Tm = 2 x (A+T) + 4 x (G+C) = 2 x 6 + 4 x 6 = 12 + 24.
  3. 3With Mg2+ = 0 the magnesium term is skipped and DMSO = 0 leaves the value unchanged, so Tm = 36 C.
  4. 4Annealing temperature = Tm - 5 = 36 - 5 = 31 C.

Result:

Tm = 36.0 C (suggested annealing temperature 31.0 C).

GC-content (Marmur-Doty) method for a 20-mer

Problem:

Find the Tm of 5'-ATGCGATCGATCGATCGATC-3' (20 bp, 10 G/C bases) with the GC Content method, Mg2+ = 0 and DMSO = 0.

Solution Steps:

  1. 1Determine the length N = 20 and the combined G+C count = 10.
  2. 2Substitute into Tm = 64.9 + 41 x (G + C - 16.4) / N = 64.9 + 41 x (10 - 16.4) / 20.
  3. 3Evaluate the bracket: 41 x (-6.4) = -262.4, divided by 20 = -13.12.
  4. 4Combine: Tm = 64.9 - 13.12 = 51.78 C, and annealing = 51.78 - 5 = 46.78 C.

Result:

Tm = 51.8 C (suggested annealing temperature 46.8 C).

Salt-adjusted method at 50 mM Na+

Problem:

Calculate the Tm of the 20-mer 5'-ATGCGATCGATCGATCGATC-3' (50% GC) with the Salt-Adjusted method, 50 mM Na+, Mg2+ = 0 and DMSO = 0.

Solution Steps:

  1. 1Use Tm = 81.5 + 16.6 x log10([Na+] in molar) + 41 x (GC fraction) - 675 / N.
  2. 2Salt term: log10(50/1000) = log10(0.05) = -1.301, so 16.6 x (-1.301) = -21.60.
  3. 3GC term: 41 x 0.50 = 20.5; length term: 675 / 20 = 33.75.
  4. 4Combine: 81.5 - 21.60 + 20.5 - 33.75 = 46.65 C, and annealing = 46.65 - 5 = 41.65 C.

Result:

Tm = 46.7 C (suggested annealing temperature 41.7 C).

Nearest-neighbor Tm with salt and magnesium corrections

Problem:

Reproduce the calculator's default result for 5'-ATGCGATCGATCGATCGATC-3' using Nearest Neighbor with 250 nM primer, 50 mM Na+, 1.5 mM Mg2+ and 0% DMSO.

Solution Steps:

  1. 1Sum the 19 dinucleotide enthalpies and add the +100 cal/mol initiation term to get dH = -162,200 cal/mol; the entropies plus -2.8 give dS = -438.3 cal/mol.K.
  2. 2Base Tm = dH / (dS + 1.987 x ln(250e-9 / 4)) - 273.15 = -162200 / (-438.3 - 32.96) - 273.15 = 71.0 C.
  3. 3Add the salt term 16.6 x log10(0.05) = -21.60 C, giving 71.0 - 21.6 = 49.4 C.
  4. 4Apply the magnesium correction 0.7 x log10(1.5/1000) x 10 = -19.77 C: 49.4 - 19.77 = 29.7 C.

Result:

Tm = 29.7 C (annealing 24.7 C), matching the calculator's default on-screen value.

Tips & Best Practices

  • Enter only A, T, G, and C; any other characters are stripped out before the calculation runs.
  • The cleaned sequence must be at least 8 bases long or no result is displayed.
  • Use Nearest Neighbor for accurate primer Tm and reserve the Basic or Wallace rule for quick checks on short oligos.
  • Keep the two primers in a pair within about 5 C of each other for balanced amplification.
  • Aim for 40-60% GC content and an 18-25 nucleotide length for robust PCR primers.
  • Set Mg2+ and DMSO to 0 to see the uncorrected Tm, then add your real buffer values.
  • Favour a 3' terminal G or C (a GC clamp) and avoid runs of four or more identical bases.
  • Start your PCR annealing about 5 C below the lower primer Tm and optimise with a gradient.

Frequently Asked Questions

It predicts the melting temperature, the temperature at which half of a DNA duplex has separated into single strands, from the primer sequence you enter. Alongside the Tm it reports a suggested annealing temperature, the GC content, the molecular weight, and the count of each base. These values help you decide whether an oligonucleotide is a good PCR primer before you order it.
For real primer design use Nearest Neighbor, the default and most accurate option, because it accounts for base-stacking thermodynamics, primer concentration, and salt. The Basic and Wallace rules are fine for a quick sanity check on very short oligos under about 14 bases. The GC content and salt-adjusted methods sit in between and are useful for medium-length sequences.
The calculator applies a magnesium term of 0.7 x log10([Mg2+]/1000) x 10 whenever Mg2+ is above zero. Because the magnesium concentration in molar is far below 1, its logarithm is negative, so at the default 1.5 mM the term subtracts roughly 19.8 C from the result. If you want to see the uncorrected melting temperature, set the Mg2+ field to 0 and the term is skipped.
A practical starting point is about 5 C below the melting temperature, which is exactly what the calculator reports as the annealing temperature (Tm minus 5). When using a primer pair, base the annealing temperature on the lower of the two Tm values. From there you can run a gradient PCR to fine-tune specificity and yield.
Both rules implement the same arithmetic in this tool: they add 2 C for every adenine or thymine and 4 C for every guanine or cytosine. As a result, selecting either option for the same sequence produces an identical melting temperature. They differ only in name and historical attribution, not in the underlying calculation here.
Yes. Each percent of DMSO you enter lowers the Tm by 0.6 C, reflecting how DMSO destabilises base pairing. Monovalent salt is included through a 16.6 x log10([Na+]) term in the salt-adjusted and nearest-neighbor methods, so changing the sodium concentration shifts the predicted melting temperature accordingly.

Sources & References

Last updated: 2026-06-05

💡

Help us improve!

How would you rate the Tm Calculator?

<>

Editorial Note

MyCalcBuddy Editorial Team

This page is maintained as an educational calculator reference.

Source

Formula Source: Standard Mathematical References

by Various

UpdatedLast reviewed: May 2026
CheckedFormula checks are based on standard references and internal QA review.

Privacy choices

MyCalcBuddy uses necessary storage for the site to work. Optional analytics, notifications, and future advertising features stay off unless you allow them.