PhysSandbox
Classical MechanicsWaves & SoundElectricity & MagnetismOptics & LightGravity & OrbitsLabs
🌙Astronomy & The Sky🌡️Thermodynamics🌍Biophysics, Fluids & Geoscience📐Math Visualization🔧Engineering🧪Chemistry

More from Biophysics, Fluids & Geoscience

Other simulators in this category — or see all 42.

View category →
NewUniversity / research

Logistic Harvest & Maximum Sustainable Yield

Logistic growth with constant harvest: MSY = rK/4, stable stock, unstable collapse threshold, and population trajectory.

Launch Simulator
NewUniversity / research

Leslie Matrix Age-Structured Population

Fertility and survival matrix model: total population trajectory, dominant eigenvalue lambda, and stable age distribution.

Launch Simulator
NewUniversity / research

SIR Vaccination Threshold

Herd-immunity threshold simulator: R_eff = R0(1-v), SIR outbreak curves, peak infected, and final size vs vaccine coverage.

Launch Simulator
NewUniversity / research

Reaction-Diffusion Turing Patterns

Activator-inhibitor reaction-diffusion toy with spots, stripes, worms presets, diffusion ratio, and schematic dispersion relation.

Launch Simulator
NewUniversity / research

Hodgkin–Huxley Action Potential

Squid-axon HH ODEs: membrane voltage V(t) and gating (m, h, n); step stimulus and Na⁺/K⁺ conductance traces.

Launch Simulator
NewUniversity / research

Cardiac Action Potential

FitzHugh–Nagumo/Noble-style cardiac toy: fast upstroke, plateau-like repolarization, refractory recovery gate, and S1-S2 premature-stimulus capture vs block.

Launch Simulator
PhysSandbox

Interactive physics, chemistry, and engineering simulators for students, teachers, and curious minds.

Physics

  • Classical Mechanics
  • Waves & Sound
  • Electricity & Magnetism

Science

  • Optics & Light
  • Gravity & Orbits
  • Astronomy & The Sky

More

  • Thermodynamics
  • Biophysics, Fluids & Geoscience
  • Math Visualization
  • Engineering
  • Chemistry

© 2026 PhysSandbox. Free interactive science simulators.

PrivacyTermsContact
Home/Biophysics, Fluids & Geoscience/Hardy-Weinberg Population Genetics

Hardy-Weinberg Population Genetics

Hardy-Weinberg equilibrium predicts genotype frequencies p², 2pq, and q² from allele frequency p when mating is random and there is no selection, mutation, migration, or drift. This simulator starts from that baseline and then adds simple selection, mutation, and finite-population drift to show how allele frequency changes across generations.

Who it's for: Population genetics, evolutionary biology, ecology, and introductory bioinformatics courses.

Key terms

  • Hardy-Weinberg equilibrium
  • Allele frequency
  • Genotype frequency
  • Selection
  • Mutation
  • Genetic drift

Hardy-Weinberg equilibrium is the no-selection, no-mutation, no-drift baseline. The sliders deliberately break those assumptions one at a time.

Live graphs

Allele and genotype

0.62
1
1
0.86

Evolution toy

0.002
0.001
120
0.35
4

Measured values

AA = p²0.384
Aa = 2pq0.471
aa = q²0.144
Final p0.628

How it works

Hardy-Weinberg genotype frequencies with selection, mutation, and a small genetic drift toy.

Key equations

p + q = 1; genotype frequencies: p², 2pq, q²
Selection updates p by genotype fitness; drift samples 2N alleles each generation

Frequently asked questions

Why are genotype frequencies p², 2pq, q²?
They come from random pairing of alleles with probabilities p and q. The heterozygote can be formed in two orders, so its frequency is 2pq.
What does the drift slider do?
It samples a finite number of alleles each generation, then blends that stochastic sample into the deterministic trajectory.