Allele & Genotype Frequency Calculator
Enter genotype counts (AA, Aa, aa) or allele frequency p to compute allele and genotype frequencies, plus a chi-square test for Hardy-Weinberg equilibrium.
Calculation Mode
Enter the number of individuals observed for each genotype.
Enter the frequency of allele A to predict Hardy-Weinberg genotype frequencies.
Decimal between 0 and 1 (exclusive), e.g. 0.7
Derived q = 1 - p
—
Enter values and click Calculate to see frequencies.
Allele Frequencies
p — allele A (dominant)
—
q — allele a (recessive)
—
Sample Summary
Total N
—
p + q
—
Heterozygosity
—
Summary
p + q
—
Heterozygosity (2pq)
—
Genotype Frequencies
| Genotype | Observed freq. | HWE Expected freq. |
|---|---|---|
| AA | — | — |
| Aa | — | — |
| aa | — | — |
HWE Expected Distribution
AA (p²)
—
Aa (2pq)
—
aa (q²)
—
Chi-Square HWE Test (df = 1)
chi-square statistic
—
p-value
—
| Genotype | Observed | Expected | (O-E)²/E |
|---|
Summary
Enter genotype counts (AA, Aa, aa) or allele frequency p to compute allele and genotype frequencies, plus a chi-square test for Hardy-Weinberg equilibrium.
How it works
- Select Mode 1 to calculate from observed genotype counts, or Mode 2 to predict from allele frequency p.
- Mode 1: Enter counts for each genotype (AA, Aa, aa). The tool computes N, p, q, observed frequencies, and HWE-expected frequencies.
- Mode 1 also runs a chi-square goodness-of-fit test (df = 1) when N >= 5.
- Mode 2: Enter allele frequency p (0 < p < 1). q is derived as 1 - p, and genotype frequencies are p², 2pq, q².
- All frequencies are rounded to 4 decimal places.
Use cases
- Calculate allele frequencies from population genotype survey data.
- Predict Hardy-Weinberg expected genotype frequencies from allele frequencies.
- Test whether a sample population deviates from Hardy-Weinberg equilibrium.
- Verify genetics homework or lab report calculations.
- Estimate carrier frequency of a recessive allele in a population.
- Explore how changing p alters expected genotype distributions.
Frequently Asked Questions
Related tools
Last updated: 2026-05-29 ·
Reviewed by Nham Vu