Hardy-Weinberg Equilibrium Calculator

Allele frequencies p and q, expected genotype counts, a chi-square test with p-value, carrier rates from q², several populations side by side and simulations.

Funziona nel tuo browser. I tuoi file non lasciano mai il dispositivo. Scopri come verificarlo

…

Come si usa

  1. 1
    Pick the starting point

    Choose genotype counts, the recessive phenotype share or the allele frequency p.

  2. 2
    Enter your numbers

    Type the counts or the share; rename the alleles if your question uses other letters.

  3. 3
    Read the results

    Check p, q, the expected counts, the chi-square value, the p-value and the verdict.

  4. 4
    Follow the steps

    The Worked steps list shows each formula with your numbers for your write-up.

  5. 5
    Compare samples

    Use Compare populations to test several samples at once and export them.

  6. 6
    Explore evolution

    In Selection and drift set fitness values or a population size and watch p change.

  7. 7
    Practise and save

    Answer generated questions in Practice and save problems with Save current.

Informazioni su questo strumento

The Hardy-Weinberg principle says that in a large, randomly mating population with no selection, mutation or migration, allele and genotype frequencies stay the same from one generation to the next. For one gene with two alleles, p + q = 1 and the genotype frequencies are p², 2pq and q². Students use it in three ways: to estimate carrier frequencies from the number of people with a recessive condition, to find allele frequencies from genotype counts, and to test whether a sample fits the equilibrium. This calculator handles all three. It shows every step, runs the chi-square test with one degree of freedom and an exact p-value, compares several populations at once and lets you watch allele frequencies change under natural selection or random genetic drift.

Three starting points

Genotype counts: enter the numbers of AA, Aa and aa individuals. The tool counts alleles (each AA has two A, each Aa one), finds p and q, works out expected counts and the chi-square statistic, and states whether the population is consistent with equilibrium at your chosen significance level. It also reports observed against expected heterozygosity and the inbreeding coefficient F.

Recessive share: enter how many people show the recessive phenotype out of the population. Because only aa individuals show it, q² equals that share, q is its square root and 2pq gives the proportion of carriers.

Allele frequency: enter p to see p², 2pq and q² directly. The graph of the three curves against p marks where your population sits.

Chi-square with one degree of freedom

There are three genotype classes, but one degree of freedom is lost because the totals must match and another because p was estimated from the same data, leaving one. The critical value at the 5 % level is 3.84. The tool computes the exact p-value from the chi-square distribution rather than reading a table.

Selection and drift

The selection panel applies the standard recurrence with fitness values for each genotype, so you can compare selection against a recessive allele, against a dominant allele and heterozygote advantage, as in sickle-cell trait. The drift panel samples 2N alleles at random each generation (the Wright-Fisher model) for up to ten replicate populations, showing how small populations lose or fix alleles by chance alone.

Worked example

In a classic sample of 6,129 people typed for the MN blood group there were 1,787 MM, 3,039 MN and 1,303 NN. p = (2 × 1,787 + 3,039) / 12,258 = 0.5395 and q = 0.4605. Expected counts are 1,783.8, 3,045.4 and 1,299.8, giving χ² = 0.027 with p = 0.87, far below the 3.84 cut-off, so the population is consistent with Hardy-Weinberg equilibrium.

Limits

The test needs reasonably large samples; when an expected count is below five the chi-square approximation is unreliable. A good fit does not prove that no evolution is happening, and the model covers one gene with two alleles only. Results are for study and are not a substitute for clinical genetic risk assessment.

Esempio svolto

MN blood groups 1787 / 3039 / 1303: p = 0.5395, q = 0.4605, χ² = 0.027, p-value 0.87, consistent with equilibrium.

In breve

Domande frequenti

How do I find the carrier frequency of a recessive condition?

Choose Share with the recessive phenotype and enter, for example, 1 in 2,500. The tool takes the square root to get q and reports 2pq as the carrier share, here about 3.9 %.

Why does the chi-square test have one degree of freedom?

Three genotype classes give two, and estimating p from the same data removes one more, leaving one degree of freedom.

What does the inbreeding coefficient F tell me?

F compares observed with expected heterozygotes. A positive F means fewer heterozygotes than expected, which happens with inbreeding or when samples mix separate populations.

Can I test several populations?

Yes. The Compare populations tab tests each row separately and exports the results as CSV.

How does the drift simulation work?

Each generation it draws 2N alleles at random from the previous generation's frequency, so the frequency wanders by chance and eventually reaches 0 or 1.

What are the assumptions of Hardy-Weinberg equilibrium?

A large population, random mating, no mutation, no migration and no natural selection. Breaking any of them can change the frequencies.

Completamente gratisNessun costo, nessuna registrazione
I file restano privatiTutto funziona nel tuo browser
Facile nella tua linguaDisponibile in molte lingue