Hardy-Weinberg Equilibrium Calculator

Study allele and genotype frequencies with clarity. Use flexible inputs, exports, graphs, and worked examples. Understand equilibrium assumptions before interpreting real population data carefully.

Calculator Input

Choose one mode. Allele mode uses p or q. Count mode derives frequencies from observed genotype counts.

Pick the input style that matches your data.
Leave q blank to derive it automatically.
Leave p blank if q is known instead.
Add this to estimate expected genotype counts.
Observed homozygous dominant count.
Observed heterozygous count.
Observed homozygous recessive count.
Choose how many decimals appear in results.

Plotly Graph

The chart compares expected genotype frequencies with observed frequencies when count data is available.

Example Data Table

This worked example uses a population of 100 individuals with p = 0.70 and q = 0.30.

Genotype Observed Count Expected Frequency Expected Count
AA 49 0.49 49
Aa 42 0.42 42
aa 9 0.09 9

Formula Used

Hardy-Weinberg equilibrium for two alleles uses these standard relationships:

p + q = 1

p² + 2pq + q² = 1

Expected AA = p² × N

Expected Aa = 2pq × N

Expected aa = q² × N

p = (2AA + Aa) / (2N)

q = 1 − p

χ² = Σ (Observed − Expected)² / Expected

Meaning of terms:

  • p is the frequency of one allele.
  • q is the frequency of the second allele.
  • is the expected frequency of genotype AA.
  • 2pq is the expected frequency of genotype Aa.
  • is the expected frequency of genotype aa.
  • N is the population size used for expected counts.

How to Use This Calculator

  1. Select Allele Frequency Mode if you know p or q already.
  2. Select Observed Genotype Count Mode if you have AA, Aa, and aa counts.
  3. Enter population size when you want expected counts, not just frequencies.
  4. Choose your preferred decimal precision.
  5. Press Calculate Equilibrium to show the result above the form.
  6. Review the summary cards, the tables, and the graph.
  7. Download the calculation as CSV or PDF when needed.
  8. For real populations, compare results with biological assumptions before drawing conclusions.

Frequently Asked Questions

1. What is Hardy-Weinberg equilibrium?

Hardy-Weinberg equilibrium describes an ideal population where allele and genotype frequencies stay constant across generations when evolutionary forces are absent and mating is random.

2. What do p and q mean?

p is the frequency of one allele, usually labeled dominant. q is the frequency of the other allele. In a two-allele model, p plus q always equals 1.

3. What does 2pq represent?

2pq is the expected frequency of heterozygous individuals, genotype Aa. In many carrier-screening examples, it is also treated as the carrier frequency for a recessive allele.

4. Why can observed counts differ from expected counts?

Real populations may show sampling noise, selection, migration, mutation, non-random mating, or small population size. Any of these factors can move counts away from equilibrium expectations.

5. Why include population size?

Population size lets the calculator convert genotype frequencies into expected genotype counts. Frequencies alone describe proportions, while counts estimate how many individuals fall into each genotype class.

6. What assumptions does the model use?

The standard model assumes random mating, no selection, no mutation, no migration, and a very large population. When those assumptions fail, equilibrium may not hold.

7. What does the chi-square result tell me?

The chi-square value is a quick screen comparing observed and expected genotype counts. Smaller values suggest closer agreement, while larger values suggest possible deviation from equilibrium assumptions.

8. Can this calculator estimate carrier rates for disease alleles?

Yes, it can estimate heterozygous carrier frequency under the model. Still, medical interpretation should consider real population structure, screening context, penetrance, and laboratory evidence.

Related Calculators

Important Note: All the Calculators listed in this site are for educational purpose only and we do not guarentee the accuracy of results. Please do consult with other sources as well.