GC Ratio Calculator: DNA/RNA GC Content Percentage

This GC ratio calculator finds the GC content of a DNA or RNA sequence, the percentage of its bases that are guanine (G) or cytosine (C). Enter the count of each base, and it returns the GC percentage.

Ratios Calculators

GC Ratio Calculator

GC content (percentage of G and C bases) in a DNA/RNA sequence, from base counts.

Starting values: the calculator opens with 25 of each base: G, C, A and T. The GC content is 50%.

The GC content formula

GC content (%) = (G + C) ÷ (G + C + A + T) × 100

Where:

  • G, C = the counts of guanine and cytosine
  • A = the count of adenine
  • T = the count of thymine, or uracil (U) if you are counting RNA

The denominator is the total number of bases you entered. If all four counts are zero, the calculator returns 0 instead of dividing by zero.

Counting the bases

The calculator takes counts, not the sequence itself, so count each base first. A text editor’s find function, a spreadsheet or a short script can all do this. For RNA, enter the uracil count in the T box.

Example 1: a short sequence

ATGCGC has A = 1, T = 1, G = 2 and C = 2, six bases in all. GC content = (2 + 2) ÷ 6 × 100 = 66.7%.

Example 2: the default

25 of each base, 100 in total. (25 + 25) ÷ 100 × 100 = 50%.

Example 3: an AT-rich sequence

G = 10, C = 10, A = 40, T = 40, a total of 100. GC content = 20 ÷ 100 × 100 = 20%.

Example 4: a GC-rich sequence

G = 35, C = 30, A = 15, T = 20, a total of 100. GC content = 65 ÷ 100 × 100 = 65%.

Example 5: a longer sequence

A 1,200-base sequence with 310 G, 290 C, 300 A and 300 T. GC content = (310 + 290) ÷ 1,200 × 100 = 50%.

Why GC content matters

G pairs with C through three hydrogen bonds, while A pairs with T through two. A GC-rich region therefore holds its two strands together more tightly and generally melts at a higher temperature than an AT-rich region of the same length. That is why GC content is one of the properties checked when designing PCR primers, where a range of about 40 to 60 percent is commonly cited as a starting point. Requirements vary with the protocol, so follow the guidance for your own method.

Things to watch

  • Count only A, C, G and T (or U). Ambiguous codes such as N are not part of this formula, so leave them out of the total if you want the GC content of the known bases.
  • Count upper and lower case letters the same way.
  • Enter whole numbers. A fraction of a base is not meaningful.
  • The result describes the whole sequence you counted. A long sequence can have very different local GC content in different regions.

Counting and checking

Example 6: counting a sequence step by step

Take ATGGCCATTA. Going letter by letter: A, T, G, G, C, C, A, T, T, A. That gives A = 3, T = 3, G = 2 and C = 2, ten bases in total. GC content = (2 + 2) ÷ 10 × 100 = 40%.

Example 7: a primer

A 20-base primer with 9 G or C bases has a GC content of 9 ÷ 20 × 100 = 45%, which sits inside the commonly cited 40 to 60 percent range.

Example 8: whole sequence against halves

A 1,000-base sequence has 500 G or C bases, so its GC content is 50%. If the first 500 bases hold 300 of them (60%) and the last 500 hold 200 (40%), the average hides the difference. The calculator gives one figure for what you enter, so count each region separately when it matters.

AT content

AT content is the remainder: 100 minus the GC content. A sequence that is 40% GC is 60% AT.

Working backward

To find how many G and C bases a sequence of a known length should contain at a target GC content, multiply: 150 bases at 40% is 150 × 0.40 = 60 G or C bases.

Common questions when counting

Example 9: DNA versus RNA

The RNA sequence AUGGCCAUUA has A = 4, U = 2, G = 2 and C = 2, ten bases. Enter 4 for A, 2 for T (the box that takes U), 2 for G and 2 for C. GC content = 4 ÷ 10 × 100 = 40%, the same as the DNA version with T in place of U.

Percent or fraction?

The calculator reports a percentage. If a paper quotes a GC fraction of 0.45, that is 45%. Convert before you compare values from different sources.

Does sequence length matter?

The percentage does not depend on length, so a 20-base primer and a 2,000-base gene can both be 45%. But a short sequence is noisier: one base changes a 20-base result by 5 points, while one base changes a 2,000-base result by 0.05 points.

Frequently asked questions

What is GC content?

It is the percentage of bases in a DNA or RNA sequence that are guanine or cytosine.

How do I calculate GC content?

Add the G and C counts, divide by the total number of A, C, G and T bases, and multiply by 100.

How do I use it for RNA?

Enter the uracil count in the T box. The formula is the same.

Why does GC content affect melting temperature?

G and C pair with three hydrogen bonds and A and T with two, so GC-rich DNA is held together more tightly.

What about N or other ambiguous bases?

Leave them out of the counts if you want the GC content of the bases that are known.

Mark Danny

Mark Danny

Mark Danny builds and maintains the free calculators and guides on Area of Irregular Shapes Calculator. Every calculator page explains its formula and shows a worked example, so you can check the working yourself. Spotted a mistake or have a suggestion? Email gulsher.hingoro101@gmail.com.

Articles: 699