GC Content Calculator

Find the GC content and base composition of a nucleotide sequence.

Result

45.00%
55.00%
20
9

How it is calculated

GC content is the share of bases in a sequence that are guanine (G) or cytosine (C): GC % = (G + C) ÷ (A + T/U + G + C) × 100. The tool removes all whitespace, converts the sequence to upper case and counts the letters A, C, G and T or U, so both DNA and RNA work (U is counted with T). Lines starting with > or ; (FASTA headers) are skipped, and any other character, such as N, digits or hyphens, is ignored and does not count towards the length. It reports GC %, AT %, the number of valid bases and the G + C count. Only the whole sequence is analysed; there is no sliding window, so local GC-rich regions are averaged out.

Worked example

Take the 20-base sequence ATGCGCGATATTAGCGCTAA. Counting the bases: G appears 5 times, C 4 times, A 6 times and T 5 times, a total of 20 valid bases. G + C = 5 + 4 = 9. GC content = 9 ÷ 20 × 100 = 45.00%. AT content is the remaining 55.00%. A GC value in this range is typical of a moderately balanced sequence.

Try this example →

Common mistakes

  • Pasting a title or label line that does not start with > or ; above the sequence. Only lines starting with > or ; (FASTA headers and comments) are skipped, so the A, C, G, T and U letters in any other label are counted and skew the result.
  • Expecting N or other ambiguity codes to count. Only A, C, G, T and U are counted, so unknown bases silently shorten the denominator.
  • Treating the figure for a whole genome or long gene as if it applied to a short primer. GC content varies along a molecule and the whole-sequence average can hide local differences.
  • Using GC % alone to predict melting temperature. It is only one factor; length and sequence order also matter.
  • Entering a protein sequence. Amino acid letters such as A, C, G and T are also amino acids, so the tool would give a meaningless number.

About this calculator

This calculator finds the GC content of a DNA or RNA sequence — the percentage of bases that are guanine (G) or cytosine (C) rather than adenine (A) and thymine/uracil (T/U): GC% = (G+C) / total bases × 100. Because G pairs with C via three hydrogen bonds (versus two for A-T), higher GC content generally means a more thermally stable double helix with a higher melting temperature.

Molecular biologists use GC content to design PCR primers, estimate the annealing temperature for lab protocols, assess genome composition across species, and flag potential sequencing or assembly issues, since extreme GC content (very high or very low) is harder to sequence accurately.

Was this helpful?

You can pick up to 3 reactions.

Comments (1)

  • Editorial team

    Paste the sequence itself, with or without a FASTA header: lines beginning with the greater-than sign or a semicolon are skipped. Any other label line is not, and its A, C, G, T or U letters would be counted as bases. GC content is often used for a quick check of primer candidates, where roughly 40 to 60 percent is a common guideline, but this tool averages the whole sequence. What are you checking: primers, a gene or a genome?

Popular calculators

All Calculators