DNA Base Counter
Count the occurrence of each nucleotide in a DNA sequence.
Learn more
What it does
The DNA base counter tallies how many times each nucleotide (A, T, C, G) occurs in a sequence, converts each count to a percentage of the total, and groups everything else into an Others row. Counting is case-insensitive, so lowercase sequence from a trace file is handled the same as uppercase. Students use it to verify composition by hand, and bench scientists use it as a quick quality check on a sequence pasted from a supplier, a sequencing report or a paper.
How it works
Each base frequency is a plain count, and its share is count / total x 100, where the total includes every character reported in the table. The counts are informative because of Chargaff's rules: in a double-stranded molecule A equals T and G equals C exactly, and in long single strands of most genomes A is still approximately equal to T and G approximately equal to C (Chargaff's second parity rule). Large deviations from that near-symmetry in a long sequence usually mean something real, such as a strand-specific GC or AT skew around a replication origin, a coding-strand bias, or simply that the pasted text is not the sequence you thought it was. The Others row is equally diagnostic, since it collects N and other IUPAC ambiguity codes, digits, whitespace and any stray non-nucleotide letters.
Worked example
For the 20-mer 5'-ATGCGGATCCATGCTAAGGT-3' the counter reports A = 5 (25.0%), T = 5 (25.0%), G = 6 (30.0%), C = 4 (20.0%) and a total of 20 bases, with nothing in the Others row. Here A equals T exactly and G exceeds C by two, giving G + C = 10, that is 50% GC. In such a short oligo a two-base difference between G and C is unremarkable; the same imbalance sustained across several kilobases would be worth investigating as a genuine compositional skew.
When to use it
After pasting a sequence copied out of a PDF or an email, check the Others row first: a non-zero value means hidden line numbers, spaces or ambiguity codes are riding along and will distort any downstream calculation. Before ordering a long oligo or gene fragment, look at the individual base shares to catch extreme composition, for example a run-heavy sequence dominated by G, which is prone to G-quadruplex formation and poor synthesis. In teaching labs the counter lets students confirm Chargaff's rules numerically on a real sequence instead of taking them on trust.
FAQ
- How do I count the number of A, T, C and G in a DNA sequence?
- Paste the sequence into the input box and the counts appear immediately, each with its percentage of the total. Counting ignores case, so mixed-case input is fine, and any character that is not A, T, C or G is tallied separately in the Others row instead of being silently dropped.
- Should the number of A equal the number of T in my sequence?
- In an intact double-stranded molecule A equals T and G equals C exactly, because every base is paired. A single strand is not required to be balanced, though in practice long genomic strands come close, which is Chargaff's second parity rule. A modest difference in a short oligo is normal; a persistent, large imbalance over many kilobases points to a real strand asymmetry or to a problem with the sequence.
- What does the Others row include?
- Anything that is not A, T, C or G, which most often means IUPAC ambiguity codes such as N, R or Y, but also digits, spaces, line breaks and punctuation left over from copy-and-paste, and U if you pasted RNA. Seeing a non-zero Others count is a signal to clean the sequence before running analyses that assume pure ACGT.
- Does base counting distinguish uppercase and lowercase?
- No, counting is case-insensitive, so a and A are added to the same total. This matters in practice because some pipelines write repeat-masked or low-quality regions in lowercase; the counter treats them as ordinary bases, so if you need to exclude those regions you must remove them before counting.