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

Frequently Asked Questions

Related tools

Last updated: 2026-05-29 · Reviewed by Nham Vu