Omni Calculator’s Hardy-Weinberg equilibrium calculator lets you play scientist for a bit and see what a population’s gene pool might look like. Based on the Hardy-Weinberg law, a cornerstone of population genetics, our tool takes allele frequencies and turns them into a complete picture of genotype distribution.
Whether you’re trying to understand the Hardy-Weinberg principle, working through Hardy-Weinberg practice problems, or wondering how many people might be carrying a recessive trait without actually showing any signs, our calculator can definitely help out!
Stay tuned to learn:
- What is the Hardy-Weinberg law;
- The idea of genetic equilibrium;
- Breaking down the Hardy-Weinberg equation; and
- How does carrier frequency relate to disease risk?
Hardy-Weinberg principle and genetic equilibrium
The Hardy-Weinberg principle, independently discovered by English mathematician Godfrey H. Hardy and German physician Wilhelm Weinberg in 1908, is a foundational concept in population genetics. It explains how allele and genotype frequencies work in a big, stable population. The simple but surprising thing is that these frequencies don’t actually change over time. If a population meets certain conditions, it settles into what’s called genetic equilibrium. In this state, genetic makeup remains constant from one generation to the next. A population in Hardy–Weinberg equilibrium isn’t really evolving at all.
This equilibrium only really stands under a strict set of assumptions:
- The population has to be infinitely large;
- Mating has to happen completely at random;
- Generations can’t overlap; and
- There can’t be any mutation, migration, or natural selection going on (equal fitness of all genotypes).
In real life, at least one of these things is almost always off. When observed genotype frequencies deviate from Hardy-Weinberg equilibrium, it’s a sign that something such as genetic drift, inbreeding, natural selection, or gene flow is influencing the population. For population geneticists, genetic equilibrium serves as a reference point and control group against which to measure.
Hardy-Weinberg equation explained
The core of the Hardy-Weinberg principle is actually just one pretty straightforward equation. Say you’ve got two alleles in a population (let’s name them A and a); their frequencies are usually shown as p and q (you can calculate these using our allele frequency calculator). Since these are the only two alleles, together they make up the whole gene pool:
p + q = 1
Now, when individuals in a population mate randomly, the expected genotype frequencies follow naturally:
p² + 2pq + q² = 1
where:
p²— Chance of having two homozygotes for the first allele (AA);2pq— Frequency of heterozygotes (Aa); andq²— Frequency of homozygotes for the second allele (aa).
For a fully recessive disease allele, Aa individuals are typically unaffected carriers, and aa individuals are affected; in that case, 2pq gives the carrier frequency and q² the disease frequency.
So, the total number of possible genotypes for two alleles will be 3. But, keep in mind, this number grows quickly: if you’ve got n alleles, the total number of genotypes is:
n × (n + 1) / 2
The Hardy-Weinberg equation isn’t limited to just two alleles and scales up pretty naturally. With three alleles (p, q, r), the equation expands to:
p² + q² + r² + 2pq + 2pr + 2qr = 1
and 6 possible genotypes. Blood type is a perfect example of when three different alleles determine your ABO group.
Real-world applications: carrier frequency, allele frequency, and disease risk
The Hardy-Weinberg equation isn’t just some abstract formula; it has real, practical uses in medicine and public health. Let’s walk through some Hardy-Weinberg practice problems.
Genotype frequencies
Suppose 70% of all the alleles in the population are A, which means that is p = 0.7, while 30% are a, therefore q = 0.3. Using the Hardy-Weinberg equation:
- AA (unaffected, non-carrier):
p² = 0.49→ 49% of the population - Aa (carrier):
2pq = 0.42→ 42% of the population - aa (affected):
q² = 0.09→ 9% of the population
Carrier frequency and disease risk
that spinal muscular atrophy (SMA) affects approximately 1 in 10,000 live births. If you do the math in reverse, using the Hardy-Weinberg equation, you’ll get:
q² = 1/10,000 = 0.0001q = √0.0001 = 0.01p = 1 − 0.01 = 0.99- Carrier frequency (
2pq) =2 × 0.99 × 0.01 ≈ 0.0198
That means that 1.98% of the population and about one in every 50 people carry the gene for SMA, often without even knowing it. When both parents are carriers, there’s about a 25% chance that their child will actually have SMA; confirm this result with Punnett square calculator.
Check this to explore other examples.
💡 Hardy-Weinberg law covers one gene at a time, but if you’re tracking two genes at once, a dihybrid cross shows how two independent traits combine in offspring.
How to use Hardy-Weinberg equilibrium calculator
Using the Hardy-Weinberg equilibrium calculator is pretty straightforward:
- Pick how many alleles you want to use; you can choose between 2, 3, 4, or 5.
- Enter the allele frequencies. Just remember, the total of all frequencies has to be 1.
- Our tool will instantly show you what to expect for each genotype’s frequency in the population.
- If you want, switch to
Carrier frequency and disease riskand enter the proportion of affected people. - Check out the carrier frequency (
2pq). The Hardy-Weinberg equilibrium calculator will calculate the number of people who carry the gene but don’t show any symptoms.
FAQs
What is Hardy-Weinberg law?
The Hardy-Weinberg law states that in a large population where mates are chosen at random, the frequencies of alleles and genotypes stay the same from one generation to the next. This holds as long as things like mutation, migration, or natural selection aren’t changing the mix.
What does p and q stand for in Hardy-Weinberg equation?
In the Hardy-Weinberg equation, p stands for the frequency of one allele, while q represents the frequency of another allele of the same gene within a population. Because these are the only two alleles being considered, their frequencies always add up to 1: p + q = 1.
For a recessive disease example, p often denotes the normal (wild‑type) allele frequency and q the disease (mutant) allele frequency.
What are the 5 principles of Hardy-Weinberg equilibrium?
Hardy-Weinberg equilibrium holds when five conditions are met:
- The population is infinitely large;
- Mating is completely random;
- There is no mutation;
- There is no migration in or out of the population; and
- All genotypes are equally fit with no natural selection acting on them.
How do I find genotype frequencies if the dominant allele frequency is 60%?
Use the Hardy-Weinberg law:
- If the dominant allele frequency is 60%, then p = 0.6 and q = 1 − 0.6 = 0.4.
- Plugging into the Hardy-Weinberg equation p2 + 2pq + q2 = 1: AA = p² = 0.36, Aa = 2pq = 0.48, aa = q² = 0.16.
- Check: 0.36 + 0.48 + 0.16 = 1.