Hardy Weinberg Equilibrium Calculator

Hardy Weinberg insights for classrooms, labs, and exams. Enter counts or allele rates, get clarity. See expected genotypes, chi square, and downloads in seconds.

Calculator Inputs

Choose an input method, then press Submit.

Homozygous dominant count.
Heterozygous count.
Homozygous recessive count.
Used when observed counts are available.
Tip: In the counts mode, N is the sum of AA, Aa, and aa.

Example data table

A sample genotype dataset, often used for practice.
Sample AA Aa aa N
Population 1 36 48 16 100
Population 2 20 50 30 100
Population 3 70 20 10 100

Formula used

How to use this calculator

  1. Select Observed genotype counts for real sample data.
  2. Enter the counts for AA, Aa, and aa.
  3. Optionally adjust α if you want a different threshold.
  4. Press Submit. Results appear above the form.
  5. Use Download CSV or Download PDF to export.
  6. If you only know allele frequency, choose the second mode.

Article

Allele frequency outputs

This calculator estimates p and q from genotype counts. It uses 2N alleles in the sample. A dataset with N=100 can yield p=0.60 and q=0.40. These values summarize the gene pool. They support quick comparisons across populations and dates. Results update after submit.

Genotype frequency estimates

Hardy Weinberg predicts p², 2pq, and q² frequencies. With p=0.60, AA becomes 0.36. The heterozygote frequency becomes 0.48. The recessive genotype becomes 0.16. These outputs help explain dominance, segregation, and random mating. They also estimate carrier proportion for recessive traits.

Expected count comparison

Expected counts equal frequency multiplied by N. For N=100, AA expects 36 individuals. Aa expects 48 individuals. aa expects 16 individuals. The results table shows observed versus expected counts. Use it to spot selection, drift, or migration signals. Large gaps can indicate nonrandom mating. Small gaps can reflect sampling noise.

Chi square testing notes

When observed counts are provided, the tool computes χ². It uses Σ(O−E)²/E across three genotypes. Degrees of freedom is commonly one here. With α=0.05, a small p value suggests deviation. Always check sample size and expected counts. Very small expected counts weaken the test. Consider pooling rare classes in strict analyses.

Teaching and lab use

Students can validate homework examples in seconds. Labs can summarize genotype surveys from field data. A class can compare three cohorts with equal N. Differences in p reflect allele shifts. Differences in 2pq reflect heterozygosity changes and inbreeding effects. Use the graph to explain equilibrium visually.

Export and reporting

CSV export supports spreadsheets and audits. PDF export creates a clean record for reports. Save results with the same sample label. Share the allele frequencies with collaborators. Keep χ² and p value with your notes. This improves reproducibility and review speed. Exports help build appendices for assignments and lab notebooks.

FAQs

1) What does the calculator compute from genotype counts?

It calculates allele frequencies p and q, expected genotype frequencies, and expected counts. If observed counts exist, it also computes χ², a df=1 p value, and an equilibrium decision using your α.

2) Why is q always equal to 1 − p?

With two alleles at one locus, total allele frequency must sum to one. After p is estimated, the remaining proportion is q. This keeps the model consistent for p², 2pq, and q².

3) When should I trust the chi square test here?

Use it when expected counts are not too small. Very low expected values can distort χ². Increase sample size when possible, or interpret results cautiously when rare genotypes occur.

4) What if I only know allele frequency p?

Select the allele frequency mode. Enter p and a sample size N. The tool outputs expected genotype frequencies and expected counts. Add observed counts if you want χ² and a p value.

5) How can I use the chart for reporting?

The grouped bars show observed versus expected counts for AA, Aa, and aa. Large differences are easy to see. Hover values support quick checks during grading, lab meetings, or revisions.

6) What do the CSV and PDF downloads include?

They include p, q, expected frequencies, optional χ² outputs, and the genotype table. CSV is best for spreadsheets. PDF is best for submission records and clean documentation.

Related Calculators

inbreeding coefficient calculatormendelian inheritance calculator

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.