The Hardy-Weinberg principle is the baseline against which biologists measure evolution: it describes what allele and genotype frequencies would look like if a population were NOT evolving. Comparing a real population's genotype counts to that baseline is one of the simplest ways to detect that something — selection, migration, non-random mating, or genetic drift — is at work.
How the Hardy-Weinberg Calculator works
The calculator implements the two core Hardy-Weinberg equations: p + q = 1 for allele frequencies, and p² + 2pq + q² = 1 for genotype frequencies, where p is the frequency of the dominant allele and q is the frequency of the recessive allele. From Alleles goes directly from a known p to the three genotype frequencies. From Genotypes handles the common real-world case where you can only count the recessive phenotype in a sample — it estimates q as the square root of the recessive genotype's observed frequency, then derives p. Equilibrium Check goes the other direction: given full genotype counts, it estimates p by directly counting alleles, computes the Hardy-Weinberg expected frequencies, and compares them against what was actually observed.
Inputs and what they mean
Allele frequency p is a number between 0 and 1 representing the proportion of the dominant allele in the population's gene pool; q = 1 − p is always derived, never entered directly. Genotype counts (homozygous dominant, heterozygous, homozygous recessive) are raw sample sizes — how many individuals of each genotype were observed or genotyped. The two count-based tabs use the same three numbers differently: From Genotypes assumes you can only reliably identify the recessive phenotype, while Equilibrium Check assumes all three genotypes are distinguishable (for example, via a genetic test or a co-dominant marker).
Limits and edge cases
This calculator supports exactly two alleles per gene — genes with three or more alleles (like human blood type) need an extended version of the equations not modeled here. The Hardy-Weinberg model itself assumes a large population, random mating, and no selection, mutation, or migration; real populations violate these assumptions to varying degrees, which is exactly why comparing observed genotype counts to the model's predictions is useful — a large mismatch is a signal that one of those assumptions is being broken, not a flaw in the math. The equilibrium check flags a mismatch using a simple percentage-point threshold rather than a formal statistical test, so treat a flagged deviation as a prompt to investigate further, not a definitive conclusion.