GC Content Calculator
Paste a DNA or RNA sequence — plain or FASTA, one record or many — and get its GC percentage, base counts, GC skew, GC at each codon position and CpG observed/expected ratio, plus a sliding-window plot of GC content, GC skew or cumulative skew you can download. Choose how ambiguity codes are treated. It runs in your browser; nothing is uploaded.
Spaces, line breaks, numbers and lower case are fine. With several FASTA records, each gets a row in the table and you choose one to plot.
Results
64.56%
GC content
333 nt
Length
0.014
GC skew (G − C) / (G + C)
GC at codon positions 1, 2, 3 (frame from base 1): 69.37%, 44.14%, 80.18%
CpG observed / expected: 0.29
All sequences
| Sequence | Length | A | C | G | T/U | Other | GC % | GC skew |
|---|---|---|---|---|---|---|---|---|
| NM_000207.3 | 333 | 57 | 106 | 109 | 61 | 0 | 64.56% | 0.014 |
Sliding-window profile
Dashed line: whole-sequence value.
How to Use the GC Content Calculator
- 1. Paste the sequence. Plain letters or FASTA; spaces, line breaks, numbers and lower case are ignored, and U is counted as T. With several FASTA records, every one gets a row in the table.
- 2. Choose the ambiguity rule. The default leaves N, R, Y and other ambiguity codes out of the calculation. You can instead count them as not-GC or weight each code by its chance of being G or C.
- 3. Read the numbers. GC%, length, GC skew, GC at codon positions 1, 2 and 3, and the CpG observed/expected ratio appear for the selected sequence.
- 4. Plot a profile. Set a window and a step, then plot GC content, GC skew or cumulative GC skew along the sequence. Download the plot as SVG or PNG.
What GC Content Is
GC content is the fraction of bases in a DNA or RNA sequence that are guanine or cytosine: GC% = (G + C) ÷ (A + C + G + T) × 100. G–C pairs have three hydrogen bonds and A–T pairs two, and stacking interactions add further stability, so GC-rich DNA melts at a higher temperature. GC content varies widely between genomes and along them: the human genome averages about 41%, Escherichia coli K-12 about 51%, Streptomyces coelicolor about 72% and the malaria parasite Plasmodium falciparum about 19%. For primers, a GC content of roughly 40–60% is the usual target.
Real sequences often contain IUPAC ambiguity codes, and there is more than one reasonable way to count them. The three options here follow the conventions in Biopython's gc_fraction:
| Option | Formula | Use it when |
|---|---|---|
| Leave ambiguity codes out | (G + C + S) ÷ (A + C + G + T + S + W) | You want the GC content of the bases that are actually known |
| Count them as not-GC | (G + C + S) ÷ total length | A tool or paper divides by the full length |
| Weight them | Each code adds its chance of being G or C (N = 0.5, B and V = ⅔, D and H = ⅓) | Ambiguity is frequent and you want an expected value |
GC Skew and CpG Ratio
GC skew is (G − C) ÷ (G + C), computed in windows. In many bacterial genomes the leading strand has more G than C, so skew is positive on one side of the replication origin and negative on the other (Lobry, 1996, Molecular Biology and Evolution). Plotting the running sum of the skew — the cumulative skew — turns that switch into a V or an inverted V whose minimum and maximum mark the origin and terminus of replication (Grigoriev, 1998, Nucleic Acids Research). The cumulative plot uses non-overlapping windows of the size you set.
The CpG observed/expected ratio is CpG count × length ÷ (C count × G count). In vertebrates, methylated CpG mutates readily to TpG, so CpG is depleted across most of the genome and a ratio near 1 marks unusual stretches. The classic definition of a CpG island (Gardiner-Garden and Frommer, 1987) is a stretch of at least 200 bp with GC above 50% and a ratio of at least 0.6; apply it to a 200 bp window yourself, as the cut-offs are arbitrary.
Worked Example: Human Insulin Coding Sequence
Try an example loads the 333-base coding sequence of human insulin from NCBI RefSeq NM_000207.3. It contains 57 A, 106 C, 109 G and 61 T, so GC = 215 ÷ 333 = 64.56%. The skew is (109 − 106) ÷ 215 = 0.014, almost none. The ten CpG dinucleotides give a ratio of 10 × 333 ÷ (106 × 109) = 0.29.
GC by codon position, frame from base 1
GC1 = 69.37% GC2 = 44.14% GC3 = 80.18%
With a 100-base window stepping 20 bases there are 12 windows, from 58.0% to 76.0% GC
GC3, the third codon position, is where synonymous changes happen without altering the protein, so it tracks the local base composition. A GC3 of 80% against a GC2 of 44% is a typical sign of a gene in a GC-rich region of the human genome. Translate the sequence with the DNA to protein translator, or design primers for it with the primer Tm calculator.
Frequently Asked Questions
- How do you calculate GC content?
- Count the G and C bases, divide by the total number of A, C, G and T (or U) bases, and multiply by 100. For ATGCGC that is 4 ÷ 6 = 66.7%. The same fraction is used for a whole genome or for a 50-base window slid along a gene.
- What is a normal GC content for a primer?
- Primers are usually designed with 40–60% GC, which gives a melting temperature in a workable range and avoids long runs of G or C that bind non-specifically. A 3′ end that finishes in one or two G or C bases (a GC clamp) helps annealing, while more than three in a row can cause mispriming. Check the melting temperature with the primer Tm calculator.
- What does GC skew tell you?
- GC skew, (G − C) ÷ (G + C), measures strand asymmetry. In many bacteria the leading strand is enriched in G, so the sign of the skew flips at the replication origin and terminus. A cumulative skew plot makes the two switch points visible as the minimum and maximum, which is a quick way to locate the origin of replication in a new genome.
- Why does GC content differ between organisms?
- Mutation bias, DNA repair, replication and selection all shape base composition, and the balance differs between lineages. Free-living bacteria range from about 25% to 75% GC, and warm-blooded vertebrates show large regional variation called isochores. Within a genome, GC-rich regions tend to be gene-dense.
- How are ambiguity codes like N counted?
- By default they are left out of both the numerator and the denominator. You can instead keep them in the denominator as not-GC, or weight each code by the share of its possible bases that are G or C, so N counts as 0.5. The three choices match Biopython's "remove", "ignore" and "weighted" settings.
- What window size should I use for a GC plot?
- Use a window long enough for stable estimates and short enough to show the feature you want. Around 100–200 bases suits a gene or a CpG island search, 1,000–10,000 suits a bacterial genome, and the step can be a fifth to a half of the window. If the step would give more than 2,000 windows the tool raises it automatically so the plot stays readable.