Hardy-Weinberg Calculator

Enter the recessive allele frequency (q) to find the Hardy-Weinberg genotype frequencies p², 2pq and q².

—

The Hardy-Weinberg principle predicts genotype frequencies from allele frequencies in a non-evolving population. With allele frequencies p and q (where p + q = 1), the genotypes occur as p² (homozygous dominant), 2pq (heterozygous carriers) and q² (homozygous recessive). If q = 0.3, then p = 0.7, giving 49% AA, 42% Aa and 9% aa.

Advertisement

How to Use This Calculator

Enter the recessive allele frequency, q, as a decimal between 0 and 1. The calculator finds the dominant allele frequency p = 1 − q, then returns the three genotype frequencies: p² for homozygous dominant (AA), 2pq for heterozygotes (Aa, the carriers), and q² for homozygous recessive (aa).

If you do not know q directly but do know the fraction of the population showing the recessive trait, that fraction equals q², so take its square root to get q first. For example, if 9% of a population is homozygous recessive, q = √0.09 = 0.3, which you would enter here.

How the Calculation Works

Under Hardy-Weinberg equilibrium, allele frequencies stay constant and genotypes follow the binomial expansion of (p + q)² = p² + 2pq + q² = 1. Each individual carries two alleles, so the chance of drawing two dominant alleles is p × p = p², two recessive is q × q = q², and one of each (in either order) is 2 × p × q. Because these are the only three genotypes, their frequencies must add up to exactly 1, which the calculator confirms in the working.

Worked Example

Suppose the recessive allele frequency is q = 0.3. Then p = 1 − 0.3 = 0.7. Homozygous dominant AA = p² = 0.7² = 0.49 (49%). Heterozygous Aa = 2pq = 2 × 0.7 × 0.3 = 0.42 (42%). Homozygous recessive aa = q² = 0.3² = 0.09 (9%). Check: 0.49 + 0.42 + 0.09 = 1.00. Notice the carriers (42%) far outnumber the affected homozygotes (9%) — a hallmark result for a fairly common recessive allele.

What the Result Means

The genotype frequencies tell you what proportion of a population is expected to carry each genotype if no evolutionary forces are acting. The 2pq term is especially useful in genetic counseling: it gives the carrier frequency for a recessive condition, which is often much higher than the frequency of affected individuals. Comparing observed genotype counts to these expected frequencies (with a chi-square test) is how biologists test whether a population is actually in equilibrium or is being shaped by selection, drift, migration or non-random mating.

Assumptions and Limitations

Hardy-Weinberg equilibrium assumes an infinitely large, randomly mating population with no mutation, no migration, no natural selection and no genetic drift — an idealized baseline that real populations only approximate. It also assumes a single gene with two alleles and discrete generations. Because these conditions are rarely met exactly, the predicted frequencies are a null model to compare against, not a guarantee. This tool covers the two-allele case; multi-allele systems use an expanded version of the equation.

Who Uses a Hardy-Weinberg Calculator

Genetics students use this to find genotype frequencies — p squared, 2pq, and q squared — from an allele frequency. Run it for population-genetics homework, to find carrier frequency for a recessive trait, or to set up a Hardy-Weinberg equilibrium problem. Enter the allele frequency to get the three genotype proportions.

Frequently Asked Questions

What is the Hardy-Weinberg equation?

It is p² + 2pq + q² = 1, which predicts genotype frequencies from allele frequencies p and q (with p + q = 1) in a population that is not evolving. p² is homozygous dominant, 2pq heterozygous, q² homozygous recessive.

How do I find q from the recessive phenotype frequency?

The frequency of the recessive phenotype equals q². Take its square root to get q. For example, if 1 in 100 shows the trait, q² = 0.01 and q = 0.1.

What does 2pq represent?

It is the frequency of heterozygotes — the carriers who have one dominant and one recessive allele. For recessive genetic conditions, 2pq is the carrier rate, often much higher than the affected rate q².

What are the Hardy-Weinberg assumptions?

A large, randomly mating population with no mutation, migration, selection or genetic drift. When a population deviates from the predicted frequencies, one of these forces is usually at work.

Why must the frequencies add up to 1?

Because p² + 2pq + q² is the full expansion of (p + q)², and p + q = 1. The three genotypes are the only possibilities, so together they account for the entire population.

Can Hardy-Weinberg handle more than two alleles?

Yes, with an expanded equation — for three alleles with frequencies p, q and r, you expand (p + q + r)². This calculator covers the common two-allele case.

Looking for a different calculator?

CalculatorPlus has free tools across finance, construction, math, health and more — each one showing the formula and a worked example.