Evolution & Population Genetics

Genetic Drift Sampling Simulator

Simulate repeated neutral Wright–Fisher allele sampling with a recorded seed. Compare replicate trajectories and retain loss, fixation and ongoing variation as different outcomes.

Biology · experimental measurements

See how finite random inheritance changes allele frequency even when no selection, migration or mutation is included.

Private calculations in your browser · explicit inputs and model boundaries
Example preview · Small diploid populationReplicate allele-frequency paths through generations
000.2512.50.5250.7537.5150Run 1Run 2Run 3Run 4GenerationFocal-allele frequency
Run 1Run 2Run 3Run 4

Each labelled line is one seeded model trajectory. The ledger preserves integer allele counts at every generation. Loss and fixation remain absorbing in this model.

  1. 1EnterProvide the known values
  2. 2CalculateResults update automatically
  3. 3VerifyReview the details and units
Try an example

Enter values in individuals.

An integer count from zero to population × copies per individual. Initial frequency is derived from this count.

1–8 independent model trajectories, starting with the same entered allele count.

Whole number from 0 to 4294967295. The same complete settings reproduce the same trajectories.

Calculation result

Enter valid values to see the result.

Your entries are calculated in this browser and are not submitted to 365CALCS.COM.

Feedback

Understand the relationship

The reasoning behind the result

Each generation samples a new finite set of gene copies

P(focal copy on one draw) = pₜ = Xₜ/K

The neutral Wright–Fisher model forms the next generation from K independent draws with replacement from the current allele distribution. The count of focal copies is binomial. In the diploid convention K = 2N; in the haploid convention K = N.

The simulator performs these Bernoulli draws directly, so counts remain integers and frequencies remain multiples of 1/K. Individuals and allele copies are not interchangeable denominators.

Neutrality preserves the conditional mean, not every path

E[pₜ₊₁ | pₜ] = pₜ; Var(pₜ₊₁ | pₜ) = pₜ(1 − pₜ)/K

With no selection, the next generation's expected frequency equals the current frequency. A finite realization can still rise or fall. Replicate paths make that difference between an expectation and an observed model outcome visible.

The conditional sampling variance decreases as copy number grows. This describes the ideal model, not a measured effective size of a natural population. Census size and effective population size need not agree.

Loss and fixation are absorbing here

At zero copies, every draw samples the other allele. At K copies, every draw samples the focal allele. With mutation and migration excluded, neither boundary can be left.

The neutral model's eventual fixation probability equals the initial frequency, but the share fixed within a short finite set of simulations is a different quantity. The results keep that theoretical probability separate from outcomes by the entered horizon.

A reproducible experiment on a model

The recorded 32-bit pseudorandom seed makes the same complete settings reproducible. Runs use nonoverlapping successive portions of the deterministic generator stream. Changing settings can change how that stream is consumed.

Generations do not overlap; population and ploidy remain fixed; selection, mutation, migration, linkage, sex structure and unequal reproductive success are absent. These are educational model trajectories, not an inference about a real population or an individual's inheritance.

Follow the numbers

One generation in a 20-individual diploid model

  1. There are K = 2 × 20 = 40 allele copies, initially X = 20, so p = 0.5.
  2. The next count has distribution Binomial(40, 0.5), with expected count 20 and count variance 10.
  3. The next frequency has expected value 0.5 and variance 0.5 × 0.5/40 = 0.00625; a particular seeded path need not equal the expected value.

Repeating the simulation shows model sampling variability without adding any selection mechanism.

Quick guide

How to use this calculator

  1. Choose the idealized ploidy and constant model population size.
  2. Enter an integer initial focal-allele count; the tool derives its frequency.
  3. Choose the horizon, replicate trajectories and recorded seed.
  4. Compare the paths and their final status, remembering that finite simulated outcomes are not biological forecasts.

Calculation method

Calculation and interpretation

See how finite random inheritance changes allele frequency even when no selection, migration or mutation is included.

Xₜ₊₁ ∼ Binomial(K, Xₜ/K); pₜ = Xₜ/K; K = population × gene copies per individual

Worked example

One generation in a 20-individual diploid model

Repeating the simulation shows model sampling variability without adding any selection mechanism.

Xₜ₊₁ ∼ Binomial(K, Xₜ/K); pₜ = Xₜ/K; K = population × gene copies per individual

Supported inputs

Precision and limits

Ideal neutral population only

A constant-size Wright–Fisher model with independent sampling and a two-allele locus. It does not infer effective population size, real fixation times, selection, ancestry or conservation outcomes.

Bounded local simulation

At most eight trajectories and 200 generations are supported, with at most two million potential allele draws per calculation. This bounds browser work and is not a biological limit.

Continue calculating

Related calculators