Genetic Drift Simulator

Simulate how random sampling causes allele frequencies to drift over generations in a finite population, showing fixation and loss events.

Simulation Parameters

Number of diploid individuals (2–2000)

Starting frequency of allele A (0.01 – 0.99)

Simulation length (10 – 500)

Independent simulation lineages (1 – 30)

Quick Presets

Allele Frequency Over Generations

Each line is an independent simulation run. Dashed lines mark fixation (p=1) and loss (p=0).

Set parameters and click Run Simulation.

Summary

Simulate how random sampling causes allele frequencies to drift over generations in a finite population, showing fixation and loss events.

How it works

  1. Set population size (N), initial allele frequency (p), number of generations, and number of simulation runs.
  2. Click Run Simulation to start the Wright-Fisher random sampling process.
  3. Each generation, the new allele count is drawn from a binomial distribution with n = 2N and probability = current frequency.
  4. Results are plotted as a line chart showing allele frequency over time for each run.
  5. Fixed (100%) and lost (0%) alleles are highlighted so you can see drift outcomes at a glance.
  6. Summary statistics show how many runs ended in fixation, loss, or polymorphism.

Use cases

  • Demonstrate genetic drift and the Wright-Fisher model in genetics or evolution courses.
  • Explore how small population size accelerates drift compared with large populations.
  • Visualize how an initially rare allele can be lost or fixed purely by chance.
  • Compare drift intensity across different starting allele frequencies.
  • Illustrate the founder effect and population bottlenecks in introductory biology.
  • Understand why genetic diversity is harder to maintain in small populations.
  • Support self-study of neutral theory of molecular evolution.
  • Generate quick simulation data for classroom discussions or lab reports.

Frequently Asked Questions

Last updated: 2026-07-01 · Reviewed by Nham Vu