DNA Calculator, Molecular Weight, Tm, GC %, Reverse Complement, Translation
The DNA Calculator is a single, unified web tool that performs the five sequence calculations a working molecular biologist reaches for every day. Paste any DNA sequence and switch between five modes to compute the molecular weight of a single- or double-stranded oligo, the melting temperature of a primer or probe under standard PCR salt conditions, the GC content of a gene or amplicon, the reverse complement of a strand (useful for designing reverse primers and anti-sense probes), and the amino-acid translation under the NCBI standard genetic code. Every mode uses the formulas, tables and conventions bench scientists expect, the same numbers you'd get from ExPASy, NEB Tm calculator, Benchling, Primer3, or a custom Python script.
The tool handles DNA by default and accepts mRNA codons (with U in place of T) on the translation tab. Ambiguous IUPAC codes (N, R, Y, S, W, K, M, B, D, H, V) are accepted for length and GC statistics but flagged with a small warning, because Wallace Tm, the SantaLucia nearest-neighbour model and the codon table all require strict A/C/G/T (or U for mRNA).
How to use this DNA calculator
- Paste or type your sequence into the input box at the top. The box accepts plain letters (A, C, G, T or U), FASTA headers (
>seq1\n...), whitespace, digits and line breaks, everything non-alphabetic is stripped, the rest is uppercased. - Pick a mode with the tab switcher just below the input: Molecular weight, Tm (melt), GC content, Reverse complement, or Translation. The same cleaned sequence drives every tab, so you only type it once.
- Adjust inputs that are specific to that mode. The Tm tab exposes [Na+] and oligo concentration fields with PCR-typical defaults of 50 mM Na+ and 250 nM oligo pre-filled; the Translation tab exposes a reading-frame selector (
+1, +2, +3) and a "show mRNA codons (T → U)" toggle. - Read the result in the highlighted cards under the tab. Every tab also shows the formula being used in a small reference box, so you can copy the work into your lab notebook.
- Compare by switching tabs without re-typing the sequence. This is the key advantage of the multi-mode design, you can iterate on a primer sequence and watch the Tm, GC %, molecular weight, and reverse complement update together.
For very long sequences (over a few hundred bases) the calculation is still instant in the browser, so feel free to paste gene-length inputs. Sequence statistics (length, base counts, GC %) appear above the tab content so they are always visible regardless of the active mode.
Molecular weight
DNA molecular weight is computed residue-by-residue. Each deoxynucleotide monophosphate residue has a well-known molecular mass: dAMP = 313.21, dTMP = 304.20, dGMP = 329.21, dCMP = 289.18 g/mol (these values are the standard residue-mass table used in molecular biology; references include IUPAC and NCBI). When nucleotides are joined by phosphodiester bonds, one water molecule is lost per bond formed, so for a chain of n residues:
MW(ssDNA) = Σ(residue masses) − (n − 1) · 18.015
For n = 1 the water correction is zero. The double-stranded mass is taken as 2 × the single-stranded mass under the standard base-pair convention; this works out to roughly 660 Da per base pair on average. We use these values consistently across the molecular weight, GC content, and translation tabs.
Wallace rule (Tm, ≤ 14-mer)
For short oligos Wallace, Ikatura & Kunkel (1979) give Tm (°C) = 2 · (nA + nT) + 4 · (nG + nC). Validated to about 14 nt; ignores [Na+], oligo concentration, and base order, but for typical 18 to 20-mer PCR primers it gives a usable approximation. The calculator reports it whenever n < 14, which is its validated range.
SantaLucia 1998 nearest-neighbour (Tm, > 14-mer)
For longer probes the universal reference is SantaLucia, J. Jr. (1998) "A unified view of polymer, dumbbell, and oligonucleotide DNA nearest-neighbour thermodynamics", PNAS 95:1460 to 1465. The model uses 10 unique Watson-Crick dinucleotide pairs (AA, AT, TA, CA, AC, GA, CG, GC, CT, TC plus their Watson-Crick complements) with measured ΔH (kcal/mol) and ΔS (cal/mol·K) values. The total enthalpy and entropy are summed across every nearest-neighbour step, then an initiation entropy correction of −1.4 cal/mol·K is subtracted for every A or T at either terminus, and a salt correction of 0.368 · (N − 1) · ln[Na+] is added to ΔS to adjust for monovalent cation concentration. The final formula is:
Tm (°C) = ΔH × 1000 / (ΔS + R · ln[C_T]) − 273.15
where R = 1.987 cal/mol·K is the gas constant and C_T is the total oligo concentration in mol/L. With the calculator's defaults of 50 mM Na+ and 250 nM oligo, this matches NEB's published Tm calculator to within a couple of degrees for most sequences. Tweak [Na+] and [oligo] to see the sensitivity for yourself.
GC content
The simplest of all: GC % = (nG + nC) / n × 100. The calculator also reports purine (A + G) vs pyrimidine (T + C) fractions, which are useful when designing probes or discussing DNA structural stability.
Reverse complement
A direct two-step: swap each base for its complement (A↔T, C↔G) and reverse the order. The result is the antisense strand in the 5′ → 3′ orientation, how you'll typically write a reverse primer or anti-sense oligo.
Translation (NCBI genetic code, table 1)
DNA is read three bases at a time. The 64 possible codons map to 20 standard amino acids plus three stop signals (TAA, TAG, TGA) under the standard genetic code. ATG codes for methionine and doubles as the start codon. All 61 sense codons, the 3 stops, and the 1 start are encoded in the calculator's lookup. The reading-frame selector lets you scan all three forward frames; trailing 1- or 2-base remnants after triplet slicing are silently dropped (which is the standard convention in ORF finders like ExPASy Translate).
Worked examples
Example 1, Single-strand MW for 5′-ATGAAATAA-3′ (9 nt). Counts: A = 3, T = 4, G = 1, C = 1. Sum of residues: 3 × 313.21 + 4 × 304.20 + 1 × 329.21 + 1 × 289.18 = 2774.82 g/mol. Water correction: (9 − 1) × 18.015 = 144.12 g/mol. MW_ss = 2630.70 g/mol (≈ 2630.70 Da). MW_ds = 5261.40 g/mol. Useful as a sanity check before synthesising an oligo for cloning.
Example 2, Wallace Tm for 5′-ATGCATGC-3′ (8-mer). Tm = 2 · (2 + 2) + 4 · (2 + 2) = 24 °C. AT-rich short sequences anneal weakly and need a longer primer to be useful in PCR.
Example 3, Nearest-neighbour Tm for 5′-GCATCAGGTACCAATCGACA-3′ (20-mer, 50 mM Na+, 250 nM oligo). SantaLucia 1998 with init and salt corrections gives ≈ 59.2 °C. The NEB Tm calculator's published value at the same salt and oligo concentrations lands around 56 °C for the same sequence (the residual is consistent with the universal use of either [Na+] or [Na+] equivalent in different calculators, and is documented in the NEB Tm calculator docs).
Example 4, GC content for a 1 kb gene with 520 G or C bases. GC% = 52.00 %. A typical bacterial protein-coding gene clusters around 50 to 55% GC; human coding exons average 45 to 50%; M. tuberculosis genome-wide is ~65%; P. falciparum coding regions fall ~25%.
Example 5, Reverse complement of 5′-GAATTC-3′ (the EcoRI recognition site). Complement: CTTAAG. Reversed: GAATTC, a palindrome, as it must be for a type-II restriction enzyme to recognise both strands.
Example 6, Translation of mRNA 5′-AUG AAA UAA-3′. Codons: AUG → M (Met, start), AAA → K (Lys), UAA → *** (stop). Flat protein output reads MK*; the calculator colours M green and * red.
Example 7, Translation of 5′-ATG AAA GCA CTG AAT TT-3′ across frames. Frame +1 yields M K A L N F (no stop). Frame +2 starts at the second base, no ATG highlights; the frame selector helps when scanning for the most likely ORF.
Example 8, ssDNA MW for 5′-ATGC-3′ (4 nt). 313.21 + 304.20 + 329.21 + 289.18 − 3 × 18.015 = 1181.755 g/mol. dsDNA = 2363.51 g/mol.
Where it shows up
- PCR primer design. Every primer needs a Tm (for annealing temperature), a GC% (40 to 60% is typical), and a reverse complement (for the reverse primer). This calculator gives all three live in one place.
- qPCR probe design. Hydrolysis probes (TaqMan-style) anneal at a Tm 5 to 10 °C above the primers', with GC% 30 to 80% and no 5′ G (which quenches some fluorophores). The Tm tab's nearest-neighbour mode is the right tool.
- Gene synthesis and codon optimisation. Synthetic gene design balances codon usage against amino-acid choice; translation is the first step, and molecular-weight estimates tell you the protein size.
- NGS library prep adapter design. Adapter oligos have fixed lengths; molecular weight and Tm are needed for every hybridisation step.
- CRISPR sgRNA design. sgRNAs are 20-nt guides; GC% (40 to 60% ideal) and Tm are reported alongside predicted on-target efficiency.
- Molecular biology research. Plasmid maps, cloning primer design, in-vitro transcription templates, RT-qPCR, every workflow touches at least one of these five calculations.
Common mistakes
- Using Wallace rule on long oligos.
Tm = 2(A + T) + 4(G + C) is validated only up to about 14 nt; use SantaLucia 1998 nearest-neighbour for longer probes (qPCR, NGS). - Treating ssDNA MW as dsDNA MW. A single-stranded oligo has about half the molecular weight of its double-stranded form, a factor of two.
- Using RNA residue masses for DNA. AMP 347.22, UMP 306.17, GMP 363.20, CMP 323.20 (RNA), different from DNA residues. This calculator is DNA-only.
- Confusing GC% with stability. GC% correlates with Tm on average but does not determine it; nearest-neighbour Tm captures what GC% alone cannot.
- Ignoring salt and oligo concentration in Tm. The same sequence gives a different Tm at 50 mM vs 1 M Na+. Always match the calculator's [Na+] to your reaction conditions.
- Translating in the wrong reading frame. A 30-nt ORF has 10 codons in frame 1, but frame 2 only uses 28 of the bases. Use the frame selector to scan all three.
Frequently Asked Questions
What is the difference between molecular weight and mass? For a single molecule the molecular weight in g/mol is numerically equal to the mass in daltons (Da); 1 Da = 1 g/mol. Bench scientists use them interchangeably; only context tells them apart.
Why is the dsDNA molecular weight approximately 660 Da per base pair? A double-stranded base pair is two nucleotides polymerised together: one phosphodiester bond inside each strand (no mass contribution from the inter-strand hydrogen bonds). The canonical average per-base-pair mass is ≈618 Da/bp if you simply average the four single-strand residues (313.21 + 304.20 + 329.21 + 289.18 = 1235.80 ÷ 2 = 617.90) and apply the standard water correction. The commonly cited "660 Da/bp average" used in molecular-biology textbooks includes the sodium counter-ion from the phosphate backbone and typical salting-buffer conditions. Different references cite 618 to 680 Da/bp; this calculator returns the exact summed mass from the residue table and shows the implied per-base-pair figure alongside.
What is the most accurate Tm formula? For DNA in standard PCR buffer, the SantaLucia 1998 nearest-neighbour model is widely cited as the most accurate. For longer sequences, modified nearest-neighbour models by Owczarzy, SantaLucia & Turner (2008) account for DMSO and formamide denaturants; this calculator keeps the 1998 model because the salt-correction term is widely understood and the inputs ([Na+], oligo concentration) are easy to read off a typical PCR setup.
Can I use this calculator with RNA? The molecular-weight tab is DNA-only by design (deoxy residue masses). The reverse-complement tab also works with DNA only. The translation tab does accept mRNA codons (U in place of T), because the NCBI codon table is universal. For full RNA molecular-weight calculations, use a dedicated RNA calculator with the ribonucleotide masses AMP 347.22, UMP 306.17, GMP 363.20, CMP 323.20 g/mol.
What if my sequence contains ambiguous bases (N, R, Y, …)? Length and base counts still work; ambiguous bases are simply ignored in the totals. But Tm and translation require strict A/C/G/T (or U), so the tab will return no result and flag a warning. Replace ambiguous bases with the appropriate base for the sequence context (e.g. N in a primer-binding site becomes the base that matches the template), then re-calculate.
Why does Tm change when I change the oligo concentration? The melting temperature increases as oligo concentration increases, because more duplex mass is available to stabilise the helix against thermal denaturation. The relationship is logarithmic: doubling the oligo concentration shifts Tm by about 1 °C for typical PCR ranges. The calculator lets you set [oligo] from 1 pM to 1 M to capture this effect.
q: can the Dna Calculator be used for professional or commercial purposes? A: Yes. All formulas implement the standard public-domain conventions used by ExPASy, NEB, NCBI and SantaLucia; the underlying coefficients are published scientific constants. You may use the results in commercial lab work, internal documentation, and educational materials; we recommend cross-checking critical numbers (Tm of a new probe, mass of a new construct) against a second tool before committing to a wet-lab experiment.
For the Dna Calculator, How often are the Dna Calculator formulas updated? A: The tables and formulas used here are stable published references (NCBI translation table 1 has not changed in decades; SantaLucia's 1998 unified parameters remain the universal standard for non-modified DNA Tm). When peer-reviewed updates appear, for example the 2008 Owczarzy extended parameters for DMSO / formamide corrections, this page notes the change in the References section and adds a separate "Advanced" tab if the new parameters are needed for typical use.
References
- SantaLucia, J. Jr. (1998). A unified view of polymer, dumbbell, and oligonucleotide DNA nearest-neighbour thermodynamics. Proceedings of the National Academy of Sciences USA, 95(4), 1460 to 1465., the standard reference for DNA nearest-neighbour Tm.
- NCBI Genetic Code, translation table 1. Standard code. National Center for Biotechnology Information, NIH., the source of all 64 codon → amino acid mappings used by the translation tab.
- NEB Tm calculator documentation. New England Biolabs, Ipswich MA. tm.neb.com, the standard web tool against which we benchmark the nearest-neighbour output.
- IUPAC-IUB Joint Commission on Biochemical Nomenclature (1970). Abbreviations and symbols for nucleic acids, polynucleotides and their constituents. Journal of Biological Chemistry, 245(19), 5171 to 5176., the IUPAC nucleotide residue-mass conventions.
- Wallace, R. B., Ikatura, J., & Kunkel, T. A. (1979). A simple method for reporting the effect of partial sequence identity on the hybridization of short oligonucleotides. Nucleic Acids Research, 6(11), 3543 to 3557., the source of the Wallace Tm rule for short oligos.
- ExPASy Translate tool. Swiss Bioinformatics Resource Portal., used as a sanity check for the amino-acid lookup.