HGR

Biology

Hardy-Weinberg Genotype Rate Calculator

Calculate Hardy-Weinberg allele and genotype rates, expected counts, observed allele frequency, and a future heterozygote reference.

Allele q frequency-
Expected p-p rate-
Expected p-q rate-
Expected q-q rate-
Expected p-p count-
Expected p-q count-
Expected q-q count-
Observed genotype total-
Observed p allele frequency-
Future heterozygote reference-
Entered p minus calculated observed p-

Decision view

Hardy-Weinberg genotype composition

Hardy-Weinberg genotype compositionThe p-squared, two-p-q, and q-squared shares close to one whole, with expected counts and observed p kept separate.
Exact scenario comparisonAllele p frequency changes while all other entered assumptions remain constant.
Allele p frequencyAllele q frequencyExpected p-p rateExpected p-q rateExpected q-q rateExpected p-p countExpected p-q countExpected q-q countObserved genotype totalObserved p allele frequencyFuture heterozygote referenceEntered p minus calculated observed p

How to use Hardy-Weinberg Genotype Rate Calculator

  1. Enter allele p and population size.
  2. Enter observed genotype counts separately.
  3. Add a comparison p and future population only for the labeled references.
  4. Compare the expected composition with the observed-frequency result.

Calculator guide

Understanding Hardy-Weinberg Genotype Rate Calculator

Hardy-Weinberg arithmetic expands the two allele frequencies p and q into three expected genotype proportions. This page also reconstructs p from entered genotype observations so the expected composition and observed allele count remain separate and auditable.

Rates sum to one The three genotype shares form a complete composition.
Counts scale with N Changing population size leaves rates unchanged.
Observed is separate Entered counts reconstruct their own p value.
Composition is live The stacked chart updates with p.

Calculation method

How the calculation works

Apply p plus q equals one and the p-squared, two-p-q, q-squared expansion, while keeping entered observations and implied allele frequency auditable. Expected rates close to one, while observed allele frequency uses only the entered nonempty genotype sample. Set q equal to one minus p, expand (p+q)², multiply each genotype rate by population size, and count observed p alleles from genotype observations.

Detailed calculation process

Expand allele frequencies into expected genotype composition

The default p frequency is 0.62 in a population of 1,200, with observed counts 470 p-p, 570 p-q, and 160 q-q.

General formula: q = 1-pf(pp) = p^2f(pq) = 2pqf(qq) = q^2E_g = Nf(g)p_obs = [2O_pp + O_pq]/[2(O_pp + O_pq + O_qq)] The binomial expansion produces mutually exclusive expected genotype shares that sum to one. Multiplying by N produces expected counts, while the separate observed-frequency equation counts two p alleles in p-p and one in p-q.

What each symbol means

p, q Frequencies of the two modeled alleles (proportions).
f(pp), f(pq), f(qq) Expected genotype proportions.
N Entered diploid population size (people or organisms).
E_g Expected count for genotype g.
O_pp, O_pq, O_qq Entered observed genotype counts.
p_obs p frequency reconstructed from observed alleles.

Worked substitution with the default inputs

1. Calculate the second allele q = 1 - 0.62 = 0.38 The two allele frequencies exhaust the modeled locus.
2. Expand expected genotype rates p^2 = 0.62^2 = 0.38442pq = 2(0.62)(0.38) = 0.4712q^2 = 0.38^2 = 0.1444 Homozygous and heterozygous terms are kept distinct.
3. Convert rates to expected counts E_pp = 1200(0.3844) = 461.28E_pq = 1200(0.4712) = 565.44E_qq = 1200(0.1444) = 173.28 Expected counts can be fractional because they are mathematical expectations.
4. Reconstruct observed p O_total = 470+570+160 = 1200p_obs = [2(470)+570]/[2(1200)] = 0.629167 The denominator contains two allele copies for every observed diploid individual.
5. Reconcile the composition 0.3844+0.4712+0.1444 = 1.0000461.28+565.44+173.28 = 1200 Both the rate stack and expected counts must close exactly to their totals.

The defaults imply q = 0.38 and expected shares of 38.44% p-p, 47.12% p-q, and 14.44% q-q; the observed p frequency is 0.62917.

Genotype composition

See p², 2pq, and q² close to one whole

A stacked composition bar and expected-count labels show how the entered allele frequency partitions the population.

p-p share The p² homozygous component.
p-q share The 2pq heterozygous component.
q-q share The q² homozygous component.
Observed marker The allele frequency reconstructed from counts.

Worked situations

Practical examples

  • At p = 0.62, q equals 0.38.
  • Expected heterozygotes are 565.44 in a population of 1,200.
  • The entered observations imply p = 0.62917.

Better inputs

Useful tips

  • Keep expected and observed quantities clearly separated.
  • Use counts from the same sampled population.
  • Assess equilibrium with an appropriate statistical test rather than visual similarity alone.

Before relying on the result

Limitations and common mistakes

  • Hardy-Weinberg expectations assume random mating, a large population, and no selection, mutation, migration, or genotyping error.
  • Expected counts are not proof that a population is in equilibrium.
  • The page models one two-allele locus.

Reference

Key terms

Allele frequency
Share of allele copies represented by p or q.
Heterozygote
An individual carrying one p and one q allele.
Expected count
Population size multiplied by an expected genotype proportion.
Observed p frequency
p alleles counted directly from entered genotype observations.

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

Why is the heterozygote term 2pq?

There are two allele-order combinations: p from one parent and q from the other, or the reverse.

Can expected counts be fractional?

Yes. They are population-size-scaled expectations, not observed individuals.

Do expected rates prove equilibrium?

No. Statistical comparison and model assumptions must also be considered.

Why might observed p differ from entered p?

The entered genotype counts may imply a different allele composition.