Skip to content

Hardy-Weinberg Equilibrium Calculator

This genetics calculator determines allele frequencies and expected genotype frequencies under Hardy-Weinberg equilibrium. It also calculates the chi-square statistic to test whether a population is in genetic equilibrium.

Hardy-Weinberg Frequency and Chi-Square Test

Input Fields
CH
Number of individuals with dominant homozygous genotype (AA)
H
Number of heterozygous individuals (Aa)
RH
Number of individuals with recessive homozygous genotype (aa)

Hardy-Weinberg Equilibrium and Chi-Square Formula

Formula
$$p = \frac{CH + 0.5 \cdot H}{CH + H + RH} \\[5pt] q = \frac{RH + 0.5 \cdot H}{CH + H + RH} \\[10pt] E_{CH} = p^2 \cdot N \\ E_H = 2pq \cdot N \\ E_{RH} = q^2 \cdot N \\[10pt] \chi^2 = \frac{(CH – E_{CH})^2}{E_{CH}} + \frac{(H – E_H)^2}{E_H} + \frac{(RH – E_{RH})^2}{E_{RH}}$$

Where:

  • $$CH$$ = number of homozygous dominant individuals
  • $$H$$ = number of heterozygous individuals
  • $$RH$$ = number of homozygous recessive individuals
  • $$N$$ = total individuals = CH + H + RH
  • $$p$$, $$q$$ = allele frequencies
  • $$E_{CH}$$, $$E_H$$, $$E_{RH}$$ = expected genotype counts
  • $$\chi^2$$ = chi-square value for deviation from equilibrium


The Hardy-Weinberg principle predicts genotype frequencies in a population under ideal conditions (no mutation, migration, selection, or genetic drift). This calculator allows you to input observed counts of dominant, heterozygous, and recessive individuals to determine allele frequencies (p and q), expected genotype frequencies, and whether the population deviates from equilibrium using a chi-square test. It is useful in population genetics, evolutionary biology, and academic research.

Previous
IV Drops Per Minute

Leave a Reply

Your email address will not be published. Required fields are marked *