Hardy-Weinberg Calculator

Calculates Hardy-Weinberg genotype expectations and tests from allele frequencies or observed genotypes, for researchers, students, and analysts in population genetics.

Tool coming soon!

We're working hard to get this tool ready for you.

Request Feature / Support
3,436+
Total Calculations Run
< 15ms
Browser Execution Speed
100%
Client-Side Privacy
4.9 / 5.0
User Satisfaction
AI Web Tool Generator

Build Your Own Custom Web Calculator in Seconds

Type what tool or calculator you need below. Our AI will build it instantly for your site.

Popular ideas:
100% FREE • No Credit Card Required

About This Tool

This tool computes Hardy-Weinberg equilibrium expectations and performs a chi-square test to assess deviations from random mating in diploid populations. It accepts either allele frequencies (p) and (q) or observed genotype counts (AA, Aa, aa) with total sample size N. Internally, it derives p and q as p = (2*AA + Aa)/(2N) and q = 1 - p, then calculates expected counts E_AA = p^2 N, E_Aa = 2pqN, E_aa = q^2 N. A chi-square statistic is computed as sum((O-E)^2/E) across genotype classes, with df = 1. Outputs include the observed counts, p, q, expected counts, the chi-square value, and the p-value. The tool also notes when any expected count is below 5, indicating that the chi-square approximation may be unreliable and suggesting data aggregation or exact testing where appropriate. Advanced users can provide allele frequencies directly to bypass count inputs and focus on equilibrium expectations. Results are suitable for documentation, QC pipelines, and teaching demonstrations.

How to Use

Choose input mode: provide observed genotype counts (AA, Aa, aa) and N, or provide allele frequency p (q = 1-p).
The tool computes p, q, and the expected genotype counts under HWE.
It then performs the chi-square test and reports the statistic and p-value.
Interpret results in the context of sample size and count reliability.
Export or record the numeric results for downstream analysis.

How to use hwe online calculator

Frequently Asked Questions

Find Quick Answers

What is Hardy-Weinberg equilibrium?
Hardy-Weinberg equilibrium describes the expected genotype frequencies under random mating with no evolutionary forces. For two alleles, p and q are allele frequencies, and expected genotype frequencies are p^2 (AA), 2pq (Aa), and q^2 (aa).
How are p and q computed from genotype counts?
From counts AA, Aa, aa with total N, p = (2*AA + Aa) / (2N) and q = 1 - p. These are used to compute expected counts under HWE and to perform the chi-square test for equilibrium.
What if some expected counts are small?
If any expected count is less than 5, the chi-square approximation may be unreliable. Consider combining genotype classes or using an exact test or permutation approach for more accurate inference.
Can I input allele frequency directly?
Yes. You can provide p (and q = 1-p) directly to compute expected genotype frequencies and counts without supplying observed genotype counts. The tool then reports p, q, and p^2, 2pq, q^2 values.

Need to run multiple calculations?

Create a free account today to unlock unlimited daily runs, access advanced parameters, save your history, and request custom features.

Register Free Account

Related Tools

Other useful calculators and utilities you might like

Science Tools

Spotify to MP3 Converter

Convert Spotify tracks and playlists to MP3 format instantly with our free online converter.

Science Tools

Road Distance Calculator

Calculate the driving distance and travel time between two addresses with our free online road dista...

Science Tools

Age Calculator

Calculate your exact age in years, months, and days from any birth date to any target date.

Science Tools

Currency Converter

Convert currencies instantly with real-time exchange rates and historical data support.

Your Feedback Matters

Help Us to Improve