Audited ·Last updated 29 Jul 2026·5 citations·Tier 1·0 uses

GC Content Calculator for DNA Primers

Calculate GC content, AT content, 3' GC clamp, Wallace Td and molecular weight of a DNA primer, checked against Lorenz 2012 and Primer3 defaults.

GC Content Calculator (Primer)

Unambiguous A, C, G and T only. Whitespace, hyphens, digits and 5'/3' markers are stripped for you. Degenerate bases (N, R, Y and the rest of the IUPAC codes), inosine and RNA are refused rather than approximated — there is no single composition to count.
5' end chemistry
How many bases at the 3' end to scan when counting G and C. Five is the usual convention, but it is a convention rather than a published constant, so it is editable. A window longer than the sequence is narrowed to the whole sequence.
bases
GC content
52.94
Percentage of bases that are G or C — exact arithmetic on the sequence, not a model. Lorenz (2012) calls 40–60% optimal; Primer3's default acceptance window is much wider at 20.0–80.0%. Report it to one decimal place.
AT content
47.06
Length
17 nt
G + C bases
9
G/C in 3' window
3
Wallace Td
52 °C
Molecular weight
5,228.467 g/mol
Mass per nanomole
5.2285 µg/nmol
Design notes
GC content 52.9% is inside the 40–60% optimum Lorenz (2012) recommends. Length 17 nt is inside Lorenz's 15–30 nt guidance but outside Primer3's narrower default 18–27 nt window. The two published sources genuinely disagree here; both are shown so you can decide. The 3' terminal base is T, so there is no GC clamp. Lorenz recommends ending on a G or C to stop the 3' end 'breathing'; Primer3 does not require one by default (PRIMER_GC_CLAMP = 0), so treat this as a preference. 3 of the last 5 bases are G or C. The longest single-base run is 4 bases, short enough not to trip the run guidance. The 52 °C figure is the Wallace 2(A+T) + 4(G+C) rule from 1979, measured with the oligonucleotide bound to a membrane in roughly 0.9 M sodium. It is not a solution melting temperature and it is not what you should programme into a thermocycler — use a nearest-neighbour calculation for that. Molecular weight is the average mass of the single strand as the free acid, with a 5'-hydroxyl; a supplier quoting a sodium salt will report a heavier figure.

Background.

This calculator reports the composition of a DNA oligonucleotide: what fraction of it is G or C, how long it is, how many G and C bases sit at the 3' end, what it weighs, and how it measures up against published primer-design guidance. Everything above the design verdicts is exact arithmetic on the sequence you paste — there is no model and no approximation in a base count.

GC content matters because G·C base pairs are held together by three hydrogen bonds and A·T pairs by two, and because stacking interactions between adjacent G and C bases are stronger still. A GC-rich sequence therefore takes more energy to separate: it binds more tightly, melts at a higher temperature, and tolerates mismatches more readily. That last consequence is the one primer designers care about, because a primer that binds too tightly will also bind happily to sites it was never meant to find. A GC-poor primer has the opposite problem — it has to be made longer to reach a workable melting temperature, which increases the chance it folds on itself.

Where published guidance disagrees, this page shows both sources rather than picking one. Lorenz's 2012 PCR protocol in the Journal of Visualized Experiments states that optimal GC content ranges between 40 and 60 percent, that primer length should be 15 to 30 bases, and that the 3' end should carry a G or C to clamp the primer and stop the end 'breathing'. Primer3 — the program most primer designs actually come out of — ships defaults that tell a different story: its acceptance window for GC content is 20.0 to 80.0 percent, its size window is 18 to 27 bases, and its GC-clamp requirement defaults to zero, meaning no clamp is enforced at all. Those are not contradictions so much as different jobs: Lorenz is describing an optimum, Primer3 is setting the outer bounds of what it will return. But a reader shown only the first would discard perfectly workable primers, so both appear here and the assessment names which source each verdict comes from.

The temperature this page reports needs its own warning, and it is on the page rather than in a footnote. The Wallace rule — two degrees per A or T, four degrees per G or C — comes from Wallace and colleagues' 1979 hybridisation work, carried out at roughly 0.9 molar sodium with the oligonucleotide immobilised on a membrane. It is a serviceable rule of thumb for choosing hybridisation conditions for a short probe. It is not a solution melting temperature, it embeds a salt concentration around eighteen times higher than a PCR buffer, and it takes no account of which base sits next to which. For the number you actually programme into a thermocycler, use a nearest-neighbour calculation — our annealing temperature calculator does exactly that, and for the M13 primer used in the worked example below the two approaches land three degrees apart, which is a useful thing to see for yourself.

The molecular weight is derived rather than borrowed. Every nucleotide residue mass on this page is computed from the IUPAC standard atomic weights of hydrogen, carbon, nitrogen, oxygen and phosphorus, summed over the residue's molecular formula — so the familiar constant of −61.96 that appears in every supplier's oligo mass formula is reproduced here from first principles rather than copied. One convention has to be stated because suppliers differ: this page reports the free acid. If your synthesis report quotes a sodium salt, its figure will be heavier by roughly 22 grams per mole per phosphate, which for a 17-mer is about 350 g/mol, or seven percent. Knowing which convention each side used is the difference between a reconciliation and a mystery.

Finally, the scope. This is an oligonucleotide tool. It accepts DNA only, refuses degenerate and modified bases outright rather than guessing an average composition for them, and caps input at five thousand bases. Above about fifty bases the Wallace value and the clamp count stop meaning anything, and the page says so rather than quietly continuing to report them as though they did.

What is gc content calculator (primer)?

GC content is the proportion of bases in a nucleic acid sequence that are guanine or cytosine, conventionally expressed as a percentage of the total. For the sequence GTAAAACGACGGCCAGT, nine of the seventeen bases are G or C, so the GC content is 9 ÷ 17 = 52.9 percent. The remaining bases are adenine and thymine, giving an AT content of 47.1 percent; the two always sum to exactly 100 percent for an unambiguous DNA sequence. GC content is a property of composition alone — it does not depend on the order the bases appear in, so GGGCCCAAATTT and GCATGCATGCAT have identical GC content despite behaving very differently. Its importance comes from base-pair chemistry. A G·C pair forms three hydrogen bonds where an A·T pair forms two, and the stacking energy between neighbouring bases is generally larger for G and C. Both effects push in the same direction: raising GC content raises duplex stability, which raises melting temperature. That relationship is the basis of every simple melting-temperature rule, including the Wallace 2(A+T) + 4(G+C) formula this page reports, and it is why GC content ends up in every primer-design checklist. A GC clamp is a related but distinct idea: the presence of a G or C at the extreme 3' end of a primer, the end from which the polymerase extends. The reasoning is that the terminal base pair of a duplex is the one most likely to transiently open — to 'breathe' — and a G·C pair there breathes less than an A·T pair, so the 3' end stays engaged with the template while the polymerase gets to work. Molecular weight, the last thing this page reports, is unrelated to any of that and is simply the summed mass of the residues plus the terminal groups. It is what you need to convert between the nanomoles a synthesis report quotes and the micrograms a balance measures, or to work out how much buffer to add to a dried pellet to reach a target concentration.

How to use this calculator.

  1. Paste the sequence 5' to 3'. Whitespace, hyphens, digits and 5'/3' end markers are stripped automatically, and lowercase is fine — a FASTA line pasted without its header will work as-is.
  2. Set the 5' end chemistry. Leave it on free hydroxyl unless you specifically ordered a 5'-phosphorylated oligo, which is normal for primers destined for ligation or for 5' end-labelling. This changes only the molecular weight.
  3. Leave the GC clamp window at 5 unless your lab uses a different convention. It controls how many 3'-terminal bases are scanned for G and C.
  4. Read GC content against both published bands. Inside 40–60 percent you are in Lorenz's optimum. Between 20 and 40, or between 60 and 80, you are outside the optimum but still inside what Primer3 will return by default — a preference, not a failure. Outside 20–80 percent both sources agree there is a problem.
  5. Check the length against both windows too. The two published sources genuinely disagree at the edges, and the assessment text names which one you have fallen outside.
  6. Look at the 3' terminal base. Lorenz recommends it be a G or C. Primer3 does not require one. If your primer ends in A or T and everything else looks good, that is worth knowing but is rarely worth a redesign on its own.
  7. Use the mass per nanomole to resuspend a dried oligo. A tube containing 25 nmol of a primer weighing 5.228467 µg/nmol holds about 131 µg; adding 250 µL of buffer gives a 100 µM stock.
  8. Do not use the Wallace Td as an annealing temperature. It is reported because people search for it, and it is labelled with the conditions it came from. For a PCR annealing temperature use a nearest-neighbour calculation.

The formula.

GC% = 100 × (nG + nC) ⁄ L

Five calculations run on this page, and only the first two involve no assumptions at all.

GC% = 100 × (nG + nC) / L AT% = 100 × (nA + nT) / L Td = 2 × (nA + nT) + 4 × (nG + nC) clamp = count of G or C in the last W bases MW = Σ(residue masses) + H₂O − HPO₃ [5'-hydroxyl] MW = Σ(residue masses) + H₂O [5'-phosphate]

GC and AT percentages are exact division of integer counts. Note that AT content is computed from its own counts rather than as 100 minus GC content — that costs nothing and means the two figures independently verify each other, which a shipped test relies on.

The Wallace rule assigns two degrees to every A or T and four to every G or C, and adds them up. It has no concentration term, no salt term and no sequence-context term, which is exactly why it is fast to do in your head and why it disagrees with real melting temperatures. It is reported here labelled with the conditions Wallace and colleagues actually used in 1979: an oligonucleotide bound to a membrane in roughly 0.9 molar sodium.

The molecular weight is built from IUPAC standard atomic weights — hydrogen 1.008, carbon 12.011, nitrogen 14.007, oxygen 15.999, phosphorus 30.974 — summed over each residue's molecular formula. A residue is a nucleoside 5'-monophosphate minus a water, because that is the repeating unit inside a chain: dA is C₁₀H₁₂N₅O₅P at 313.210, dC is C₉H₁₂N₃O₆P at 289.184, dG is C₁₀H₁₂N₅O₆P at 329.209, and dT is C₁₀H₁₃N₂O₇P at 304.195. Adding one water (18.015) closes the chain at both ends and gives the mass of an oligo with a 5'-phosphate. Standard synthesis leaves a free 5'-hydroxyl instead, so a metaphosphate group (HPO₃, 79.979) is removed. The net terminal correction for a 5'-OH oligo is therefore 18.015 − 79.979 = −61.964 — which is the −61.96 constant every supplier's mass formula carries, derived here rather than assumed.

Rounding stage: FINAL ONLY. Counts are integers throughout. The percentages, the Wallace value and the masses are carried as full-precision Decimals and rounded once, at the moment each field is returned. Nothing is rounded and then reused, so the displayed GC content and the displayed AT content still sum to exactly 100.

Invalid-domain behaviour. An empty sequence is rejected. Any character that is not an unambiguous A, C, G or T is rejected with the offending characters named, and a U gets a message specifically pointing out that this is a DNA tool and that a deoxyribonucleotide mass is not an RNA mass. Sequences beyond five thousand bases are rejected because this is an oligonucleotide tool. A clamp window that is not a positive whole number is rejected; a window longer than the sequence is narrowed to the whole sequence and the narrowing is reported, rather than raising an error on a field the user never touched.

A worked example.

Example

The M13 forward (−20) universal primer, GTAAAACGACGGCCAGT, ordered as a standard 5'-hydroxyl oligonucleotide. Counting the bases: six A, four C, five G, two T, seventeen in total. Nine of them are G or C, so GC content is 900 ÷ 17 = 52.94 percent and AT content is 800 ÷ 17 = 47.06 percent. The two sum to exactly 100, as they must. The Wallace rule gives 2 × 8 + 4 × 9 = 16 + 36 = 52 °C. Worth comparing against the nearest-neighbour value for the same primer under PCR conditions, which is 55.0 °C — a three-degree gap between two temperatures that both get called 'the Tm', from two models with different salt assumptions and different levels of sequence detail. The last five bases are C, C, A, G, T. Three of them are G or C, but the 3' terminal base is a T, so there is no GC clamp. Lorenz recommends ending on a G or C; Primer3 does not require it. The longest single-base run is the AAAA at positions three to six — four bases, just inside the limit implied by Lorenz's own AAAAA example. Molecular weight: 6 × 313.210 + 4 × 289.184 + 5 × 329.209 + 2 × 304.195 = 5290.431, plus a water at 18.015 gives 5308.446 for a 5'-phosphate oligo, minus HPO₃ at 79.979 gives 5228.467 g/mol for the free 5'-hydroxyl this primer actually has. That is 5.228467 µg per nanomole, so a 25 nmol synthesis is about 131 µg of material, and 250 µL of TE gives a 100 µM stock. One genuine finding: at 17 bases this primer is inside Lorenz's 15–30 nt guidance but below Primer3's default minimum of 18. Two published sources, two answers, and this famous old primer sits precisely in the gap between them. Neither source is wrong; the primer works, has worked for forty years, and would simply never have been proposed by Primer3 running its defaults.

sequenceGTAAAACGACGGCCAGT
end Chemistryhydroxyl
clamp Window5

Frequently asked questions.

What GC content should a PCR primer have?
It depends which source you ask, and this page shows you both because they differ substantially. Lorenz's 2012 PCR protocol states that optimal GC content ranges between 40 and 60 percent, and that is the band most primer-design checklists repeat. Primer3, the program most primers are actually designed in, ships defaults of 20.0 percent minimum and 80.0 percent maximum — a window four times wider. The two are not contradicting each other so much as answering different questions: Lorenz is describing where primers behave best, Primer3 is setting the outer bounds of what it is willing to propose. In practice, aim for 40–60 percent when you have freedom to choose your binding site, and do not throw away a 35 percent or a 65 percent primer that is otherwise well matched to its partner — especially when the target region gives you no better option, which is common in AT-rich genomes and in GC-rich promoter regions.
Does GC content depend on the order of the bases?
No, and that is both its main convenience and its main limitation. GC content counts bases without regard to arrangement, so GGGCCCAAATTT and GCATGCATGCAT have identical GC content of 50 percent despite behaving very differently in a reaction — the first has runs the polymerase can slip on and a strongly asymmetric stability profile, the second does not. Duplex stability genuinely does depend on order, because the energy of a base pair depends on which base pair sits next to it: a G·C flanked by G·C stacks more favourably than the same G·C flanked by A·T. That is what nearest-neighbour thermodynamics captures and what GC content throws away. So use GC content as a first-pass screen, and use a nearest-neighbour melting temperature when you need to compare two primers properly.
Why is the Wallace Td different from the Tm on your annealing temperature page?
Because they are different models measuring different things under different conditions, and for the M13 primer in the worked example they land three degrees apart — 52 °C from Wallace against 55.0 °C from nearest-neighbour thermodynamics. The Wallace rule dates from 1979 filter-hybridisation experiments in roughly 0.9 molar sodium with the oligonucleotide immobilised on a membrane; it has no concentration term, no adjustable salt term and no sequence-context term. Nearest-neighbour thermodynamics sums measured enthalpies and entropies for every adjacent base-pair step, adds initiation terms for both ends, corrects the entropy for your actual salt concentration, and solves for the temperature at which half the strands are paired at your actual primer concentration. Neither number is 'the' Tm, but only one of them is appropriate for setting a thermocycler, and it is not the Wallace value.
What is a GC clamp and do I really need one?
A GC clamp is a G or C at the extreme 3' end of the primer — the end the polymerase extends from. The argument for it is that terminal base pairs transiently open and close, and a G·C pair with its three hydrogen bonds opens less readily than an A·T pair with two, so a 3'-terminal G or C keeps the primer end engaged with the template. Lorenz recommends it explicitly. Primer3, on the other hand, sets its GC-clamp requirement to zero by default, meaning it enforces no clamp at all and still returns primers that work. So: it is a genuine preference with a sensible mechanism behind it, not a requirement. This page reports the 3' terminal base and the count of G/C bases in the last few positions as information, and does not fail a primer for lacking a clamp. Worth noting that the opposite extreme is also discouraged in common practice — a 3' end that is entirely G and C can stabilise mispriming — though that particular rule of thumb does not come from either source cited here.
Why does the calculator refuse degenerate bases like N, R and Y?
Because a degenerate position is not one sequence — it is a pool of them, and they have different compositions. An N could be any of four bases, so a 20-mer with three N positions represents sixty-four different molecules with GC contents spanning a range, not a point. Reporting an average would produce a confident-looking number that describes no actual molecule in the tube, and the molecular weight would be even more misleading because the four bases differ in mass by up to 40 g/mol each. The honest workaround is to compute the two extremes: substitute G or C at every degenerate position for the upper bound, and A or T for the lower bound, then run this calculator twice. That gives you a defensible range, which is what a degenerate primer actually has.
How do I turn nanomoles into micrograms for a dried oligo?
Multiply by the mass per nanomole, which this page reports. A synthesis report quoting 25 nmol of the M13 forward primer, at 5.228467 µg/nmol, means about 131 µg of material in the tube. Going the other way, if you want a 100 µM stock from a 25 nmol tube: 25 nmol in 250 µL is 25 000 pmol ÷ 250 µL = 100 pmol/µL, which is 100 µM. That calculation needs no molecular weight at all, which is why most people resuspend by moles rather than by mass — the arithmetic is cleaner and the answer does not depend on which mass convention the supplier used. Use the mass figure when you need to reconcile a weight measurement, or when a downstream protocol specifies an input in nanograms.
Your molecular weight does not match my supplier's. Which is right?
Probably both, under different conventions, and the gap tells you which. This page reports the average mass of the free acid: no counter-ions. If your supplier quotes the sodium salt, their figure will be heavier by roughly 22 g/mol for every phosphate in the molecule, which for a 17-mer with a free 5'-hydroxyl is about 350 g/mol, or seven percent. A second, smaller source of difference is monoisotopic versus average mass: mass spectrometry reports monoisotopic masses, which are lower than average masses and diverge further as the molecule gets bigger. A third is the 5' end: an oligo ordered with a 5'-phosphate weighs 79.979 g/mol more than the same sequence with a free hydroxyl, which is why that is a dropdown on this page. Check which of those three explains your discrepancy before assuming either calculation is wrong.
Can I use this for RNA or for a whole gene?
Not for RNA, and only partly for a whole gene. RNA is refused outright: uracil is not in the accepted alphabet, and although GC content would count the same way, the molecular weight would be badly wrong because ribonucleotides carry an extra oxygen each and use uracil in place of thymine. Substituting T for U to force the sequence through would give you a correct GC percentage and a mass that is roughly 5 percent too low, which is exactly the kind of quiet error worth refusing. For long DNA, GC content itself remains perfectly meaningful — it is a standard genomic statistic — and this page will compute it for sequences up to five thousand bases. But the Wallace value and the GC-clamp count become meaningless well before that, so above about fifty bases the assessment says so explicitly instead of continuing to present them as useful.
Why do runs of the same base matter?
Because they give the polymerase nothing to keep its place with. Lorenz's protocol names them directly, advising that single-base runs such as AAAAA or CCCCC and dinucleotide repeats such as GCGCGCGCGC should be avoided because they can cause slipping along the primed segment and can promote hairpin formation. The mechanism is straightforward: within a homopolymer run, every position looks like every other, so a partially annealed primer can shift by one base and still appear correctly paired — which produces insertions and deletions in the product. This page reports the longest single-base run and flags anything longer than four, matching the five-base examples Lorenz gives. Many labs apply a stricter rule of three or four, and that is a reasonable tightening; it simply is not what the cited source says.
GC content of my whole target region is 70 percent and my PCR keeps failing. Is that the cause?
It is a strong candidate, but the problem is usually the template rather than the primer. GC-rich template forms stable secondary structure that survives the denaturation step, so the polymerase stalls and the primer cannot reach its site regardless of how good the primer's own composition is. The standard responses are additives that destabilise secondary structure — DMSO, betaine, or a commercial GC enhancer — plus a higher denaturation temperature and a longer initial denaturation. Primer composition matters too, but the useful adjustment there is usually to lengthen the primer so it can afford a slightly lower GC percentage while still reaching a workable melting temperature, rather than chasing the 40–60 percent band in a region that does not offer it. Check the primer's own GC content here, then look at the amplicon.

References& sources.

  1. [1]Lorenz, T. C. (2012). 'Polymerase Chain Reaction: Basic Protocol Plus Troubleshooting and Optimization Strategies.' Journal of Visualized Experiments 63:e3998, doi:10.3791/3998. PRIMARY SOURCE, peer-reviewed, open access. Supplies verbatim every design threshold implemented on this page: 'Primer length should be 15-30 nucleotide residues (bases)'; 'Optimal G-C content should range between 40-60%'; 'The 3' end of primers should contain a G or C in order to clamp the primer and prevent breathing of ends'; and that 'single base runs (e.g., AAAAA or CCCCC) should be avoided as they can cause slipping along the primed segment'. Fetched and verified 2026-07-29.
  2. [2]Untergasser, A., Cutcutache, I., Koressaar, T., Ye, J., Faircloth, B. C., Remm, M. & Rozen, S. G. (2012). 'Primer3 — new capabilities and interfaces.' Nucleic Acids Research 40(15):e115, doi:10.1093/nar/gks596, and the Primer3 manual of published default parameters. INDEPENDENT SECOND AUTHORITY — consulted specifically to check the primary source's thresholds, and it PARTLY DISAGREES, which is why both are shown. Primer3's published defaults are PRIMER_MIN_SIZE 18, PRIMER_OPT_SIZE 20, PRIMER_MAX_SIZE 27, PRIMER_MIN_GC 20.0, PRIMER_MAX_GC 80.0 and PRIMER_GC_CLAMP 0 — a far wider GC window than Lorenz's optimum, a narrower size window, and no 3' clamp requirement at all. Manual fetched and every default verified 2026-07-29.
  3. [3]Wallace, R. B., Shaffer, J., Murphy, R. F., Bonner, J., Hirose, T. & Itakura, K. (1979). 'Hybridization of synthetic oligodeoxyribonucleotides to Phi chi 174 DNA: the effect of single base pair mismatch.' Nucleic Acids Research 6(11):3543–3557. PEER-REVIEWED, the origin of the Td = 2(A+T) + 4(G+C) rule reported on this page. Cited with its conditions attached — the work used oligonucleotides hybridised to immobilised DNA in high salt, around 0.9 M sodium — because those conditions are why the Wallace value is not a solution melting temperature and should not be used to set an annealing temperature. Checked 2026-07-29.
  4. [4]Commission on Isotopic Abundances and Atomic Weights (CIAAW), IUPAC — Standard Atomic Weights 2021 (table page carrying selective 2024 updates that do not affect H, C, N, O or P). STANDARDS BODY. Every nucleotide residue mass on this page is derived from the abridged standard atomic weights H 1.008, C 12.011, N 14.007, O 15.999 and P 30.974, whose CIAAW intervals were read directly from this table on 2026-07-29: H [1.00784, 1.00811], C [12.0096, 12.0116], N [14.00643, 14.00728], O [15.99903, 15.99977], P 30.973761998(5). The interval form is the reason the page reports average masses to a stated precision rather than implying more.
  5. [5]SantaLucia, J. Jr. (1998). 'A unified view of polymer, dumbbell, and oligonucleotide DNA nearest-neighbor thermodynamics.' Proceedings of the National Academy of Sciences 95(4):1460–1465. PEER-REVIEWED, open access. Cited here as the contrast case rather than as an implemented model: it is the nearest-neighbour treatment that supersedes the Wallace rule for melting-temperature prediction, and it is what our annealing temperature calculator uses. For the M13 primer in this page's worked example the two approaches give 52 °C and 55.0 °C respectively — the gap is the point. Fetched 2026-07-29.

In this category

Embed

Quanta Pro

Paid features are coming later.

  • All 682 calculators remain free
  • No billing is enabled
Coming soon