🧬Hardy-Weinberg Calculator
Calculate allele and genotype frequencies, or test observed genotype counts for Hardy-Weinberg equilibrium.
Free Hardy-Weinberg Calculator
Our free Hardy-Weinberg calculator applies the Hardy-Weinberg equation, p² + 2pq + q² = 1, to find genotype frequencies from a known allele frequency, or to test whether an observed population is in genetic equilibrium.
In "From Allele Frequency" mode, enter the dominant allele frequency (p) and instantly get the recessive allele frequency (q), plus the expected homozygous dominant (p²), heterozygous (2pq), and homozygous recessive (q²) genotype frequencies.
In "From Genotype Counts" mode, enter observed counts of AA, Aa, and aa individuals. The calculator computes the allele frequencies, the expected genotype counts under Hardy-Weinberg equilibrium, and a chi-square test to determine whether the population's observed genotype distribution is statistically consistent with equilibrium. No sign-up, no downloads — everything runs instantly in your browser.
About the Hardy-Weinberg Calculator
Features
Two modes
Calculate from an allele frequency, or test observed genotype counts for equilibrium.
Chi-square equilibrium test
Compares observed and expected genotype counts against the critical value at α=0.05.
Full allele and genotype breakdown
See p, q, and all three genotype frequencies at once.
Step-by-step working
See the exact formula and substitution used to reach every result.
Frequently Asked Questions
What is the Hardy-Weinberg equation?
The Hardy-Weinberg equation, p² + 2pq + q² = 1, describes the expected genotype frequencies in a population that is not evolving, where p and q are the frequencies of the two alleles at a gene locus.
What do p and q represent?
p is the frequency of the dominant allele and q is the frequency of the recessive allele. Together, p + q = 1 for a gene with two alleles.
What does p² + 2pq + q² represent?
p² is the expected frequency of homozygous dominant individuals (AA), 2pq is the expected frequency of heterozygous individuals (Aa), and q² is the expected frequency of homozygous recessive individuals (aa).
How do I test if a population is in Hardy-Weinberg equilibrium?
Use the 'From Genotype Counts' mode: enter observed AA, Aa, and aa counts. The calculator computes allele frequencies, expected genotype counts, and a chi-square statistic to test for equilibrium.
What does the chi-square test tell me?
The chi-square statistic compares observed genotype counts to the counts expected under Hardy-Weinberg equilibrium. If it exceeds the critical value (3.841 at α=0.05, df=1), the population deviates significantly from equilibrium.
What assumptions does Hardy-Weinberg equilibrium require?
It assumes no mutation, no migration, random mating, no natural selection, and a very large population size. Real populations rarely meet all these assumptions perfectly.
Why would a population not be in equilibrium?
Deviations from equilibrium can indicate natural selection, non-random mating, genetic drift, migration, or mutation acting on the population.
Can I use this for genes with more than two alleles?
This calculator handles the standard two-allele case. Multi-allele Hardy-Weinberg extensions require additional terms not covered here.
What is a carrier frequency?
The carrier frequency for a recessive trait is the heterozygote frequency, 2pq — the proportion of the population carrying one copy of the recessive allele without expressing the trait.
Is this calculator free to use?
Yes, the Hardy-Weinberg calculator is completely free with no sign-up, and all calculations run instantly in your browser.