Calqube

Allele Frequency Calculator (Hardy-Weinberg)

Allele Frequency Calculator (Hardy-Weinberg)

Calculate allele frequencies (p, q), expected p² / 2pq / q² genotypes, and Chi-Square (χ²) Hardy-Weinberg equilibrium tests.

p + q = 1 | p² + 2pq + q² = 1
Goodness-of-Fit (df = 1): Critical χ² at p = 0.05 is 3.841. Observed genotype counts match Hardy-Weinberg expectations.
Allele p (A)
0.6000
60.0%
Allele q (a)
0.4000
40.0%
Chi-Square (χ²)
0.000
Threshold: 3.841
HWE Status
In Equilibrium
p ≥ 0.05

Genotype Frequency Distribution: Expected vs. Observed

Sample N = 1,000 individuals

Exp AA (p²)
36.0 %
Obs AA
36.0 %
Exp Aa (2pq)
48.0 %
Obs Aa
48.0 %
Exp aa (q²)
16.0 %
Obs aa
16.0 %
GenotypeHWE TermExpected %Expected CountObserved CountDifference
Homozygous Dominant (AA)p²36.00%360.0360+0.0
Heterozygous Carrier (Aa)2pq48.00%480.0480+0.0
Homozygous Recessive (aa)q²16.00%160.0160-0.0
Intended Purpose & Overview

How the Allele Frequency Calculator (Hardy-Weinberg) Works

Performs population genetics calculations for biallelic loci: deriving dominant (p) and recessive (q) allele frequencies, Hardy-Weinberg expected genotype counts, and Pearson’s Chi-Square equilibrium test.

Operational Steps:

  • Choose Observed Genotype Counts (AA, Aa, aa) or Direct Allele Frequency (p / q) mode.
  • View calculated allele frequencies, heterozygote carrier prevalence (2pq), and χ² test statistic against the 3.841 threshold (df = 1, α = 0.05).
  • Compare Expected vs Observed genotype proportions on the bar chart and breakdown table.
Mathematical Formula & Equations
p = (2·AA + Aa) / (2N) | q = 1 − p | p² + 2pq + q² = 1 | χ² = Σ(Obs − Exp)² / Exp

Formulas and unit conversions are documented alongside their underlying mathematical definitions for general educational and reference use.

Step-by-Step Practical Example

A population sample of 1,000 individuals with 360 AA, 480 Aa, and 160 aa genotypes.

• AA = 360
• Aa = 480
• aa = 160
• N = 1,000
Calculated Outcome: p = 0.6000, q = 0.4000, χ² = 0.000 -> Exact Hardy-Weinberg Equilibrium.

Key Insights & Best Practices

•When χ² exceeds 3.841 (df = 1), evolutionary forces such as natural selection, inbreeding, assortative mating, or population substructure may be shifting genotype ratios.
Frequently Asked Questions

Questions About This Calculation

Why is degrees of freedom equal to 1 for a 3-genotype HWE test?

Three genotype classes minus 1 constraint (N) minus 1 estimated parameter (allele p) leaves 3 − 2 = 1 degree of freedom.

Want this calculator on your own website?

Get free iframe embed code with customizable light/dark theme support.

Related Calculators in Health Calculators

Ideal Body Weight Calculator (IBW)

Calculate Ideal Body Weight across four clinical equations (Devine, Robinson, Miller, Hamwi), healthy BMI range, and body frame adjustments.

Open →

Lean Body Mass Calculator (LBM)

Compute fat-free Lean Body Mass via Boer, James, and Hume clinical formulas or direct body fat % with daily protein targets.

Open →

Waist-to-Hip Ratio Calculator (WHR)

Assess abdominal fat distribution, Apple vs. Pear body shape, and WHO cardiovascular & metabolic risk levels.

Open →

Waist-to-Height Ratio Calculator (WHtR)

Evaluate central obesity risk using the universal 0.50 waist-to-height rule with maximum healthy waist threshold.

Open →