Genetic Drift Simulator
Follow a gene with two versions, A and a, through many generations in many populations at once. Watch pure chance fix or lose alleles, see how population size, selection, mutation and bottlenecks change the outcome, and work out Punnett squares and Hardy–Weinberg tests.
Genetic variation (heterozygosity)
simulated drift theoryWhere populations are now
share of populations by frequency of ACapital letter = dominant version. Each parent passes one letter of each gene to a child, at random. Two genes (AaBb) are assumed to be inherited independently.
Pick an experiment. It restarts with its settings and starts playing.
The CSV has one row per generation with the frequency of A in every population, the mean, heterozygosity and fixation counts.
How the simulation works
- Each population has N individuals, so 2N copies of the gene. A share p of the copies are A, the rest a.
- Selection: genotypes AA, Aa and aa have different chances to reproduce (fitness). Mutation turns some A into a and back.
- Drift: the next generation's 2N gene copies are drawn at random from the parents' gene pool (the Wright–Fisher model). By pure chance, p goes up or down a little every generation.
- Eventually an allele can be fixed (100%) or lost (0%). Without selection, the chance that A gets fixed equals its starting frequency.
- Heterozygosity (2pq) measures variation. Drift alone shrinks it by the factor (1 − 1/2N) each generation.
A simplified teaching model with one gene and random mating. Everything runs in your browser.
Using Genetic Drift Simulator
Follow a gene with two versions (A and a) through many generations in many populations at once. See how pure chance — genetic drift — fixes or loses alleles, and how population size, selection, mutation and bottlenecks change the outcome. Includes Punnett squares and a Hardy–Weinberg test.
- Press Play: 20 small populations start with 50% A and drift apart by chance.
- Watch the big chart: each line is one population. Lines that reach 100% have fixed A, lines at 0% have lost it. The dashed line is the average.
- Try the examples: large populations, selection, heterozygote advantage (sickle cell), bottleneck, mutation–drift balance and the founder effect.
- Change population size, starting frequency, fitness of AA/Aa/aa, mutation and bottlenecks in Settings.
- Use the Punnett tab for crosses like Aa × Aa or AaBb × AaBb, and download all frequencies as CSV.
Example
Small populations: after 200 generations nearly every population of 30 has either fixed or lost A, about half each way. Heterozygote advantage: with Aa fittest, A settles near 33% in every population instead of disappearing.
Questions & answers
What is genetic drift?
Random change in allele frequencies because only some individuals happen to pass on their genes. It is strongest in small populations and can fix or eliminate an allele without any selection.
How does the simulation work?
It uses the Wright–Fisher model: each generation, the 2N gene copies of the next generation are drawn at random from the current gene pool, after selection and mutation adjust the probabilities.
What is the chance an allele gets fixed?
Without selection it equals the allele's current frequency. Starting at 50%, about half of the populations end with A fixed.
What is heterozygosity?
The chance that two gene copies picked at random differ, 2pq. Drift alone lowers it by the factor 1 − 1/(2N) per generation; the chart shows this theory line.
What is the Hardy–Weinberg equilibrium?
With random mating and no other forces, genotype frequencies are p², 2pq and q². The Live tab compares observed and expected counts with a chi-square test.
What are bottleneck and founder effects?
A bottleneck is a sudden drop in population size; a founder effect happens when a few individuals start a new population. Both lose genetic variation quickly through drift.
Does it run on my device only?
Yes. Everything runs in your browser.
Help improve this tool
Report a problem or suggest an improvement
Describe the issue without pasting private tool input. Feedback goes to our admin inbox.
