HP

Biology

Hardy-Weinberg Population Calculator

Convert allele frequency p into p², 2pq, and q² expectations and compare each with entered observed genotype counts.

Allele a frequency (q)-
Expected AA individuals-
Expected heterozygous individuals-
Expected aa individuals-
Observed genotype count-
Observed minus expected AA-
Observed minus expected heterozygotes-
Observed minus expected aa-

Decision view

Hardy-Weinberg genotype composition

Hardy-Weinberg genotype compositionThe selected allele frequency is converted into AA, heterozygous, and aa expectations for the exact population size.
Exact scenario comparisonAllele A frequency (p) changes while all other entered assumptions remain constant.
Allele A frequency (p)Allele a frequency (q)Expected AA individualsExpected heterozygous individualsExpected aa individualsObserved genotype countObserved minus expected AAObserved minus expected heterozygotesObserved minus expected aa

How to use Hardy-Weinberg Population Calculator

  1. Define one population and sampling frame.
  2. Enter allele p and observed genotypes from compatible data.
  3. Use a formal statistical test before drawing equilibrium conclusions.

Calculator guide

Understanding Hardy-Weinberg Population Calculator

Hardy–Weinberg proportions provide a null expectation for genotype counts, not proof that a population is in equilibrium.

Null model Expectations are conditional.
Three genotypes p², 2pq, and q².
Counts reconcile Expected totals equal population size.
Test separately Differences alone are not inference.

Calculation method

How the calculation works

Calculate expected Hardy-Weinberg genotype counts from an entered allele frequency and compare them with three entered observed genotype counts. Set q = 1 − p, multiply p², 2pq, and q² by population size, then calculate observed-minus-expected differences.

Population-genetics check

Investigate a mismatch carefully

Several biological and technical processes can create the same pattern.

Sampling Population mixture and relatedness.
Biology Selection, migration, and mating.
Laboratory Allele dropout or calling error.
Statistics Use an appropriate exact or chi-square test.

Worked situations

Practical examples

  • Expected proportions sum to one algebraically.
  • At p = q = 0.5, heterozygotes have expected frequency 0.5.
  • A positive difference means observed exceeds expected.

Better inputs

Useful tips

  • Check observed counts sum to the sample.
  • Inspect genotyping quality.
  • Stratify mixed populations before interpretation.

Before relying on the result

Limitations and common mistakes

  • Random mating, negligible selection, mutation, migration, drift, and error are assumptions.
  • Differences are descriptive, not a significance test.
  • Population structure can mimic disequilibrium.

Reference

Key terms

p
Frequency of allele A.
q
Frequency of the other allele, 1 − p.
Heterozygote
Individual carrying one copy of each allele.
Expected count
Equilibrium proportion multiplied by population size.

Important note

Calculated from the entered values using the displayed biological or statistical model. Study design, sampling, measurement quality, and biological variation affect interpretation.

Frequently asked questions

Do expected counts have to be integers?

No. They are mathematical expectations.

Does a difference prove selection?

No.

What if observed counts do not sum to population?

Reconcile the data before interpretation.

Is q entered separately?

No; it is calculated as 1 − p.