Bbiochemtools

Chi-Square Genetic Ratio Calculator

Test whether your observed offspring counts fit an expected Mendelian ratio like 3:1 or 9:3:3:1. Get the chi-square value, degrees of freedom, a real p-value, and a clear pass or fail verdict, with every step shown.

PhenotypeObserved countRatio part
Verdict at α = 0.05
Chi-square χ²
Deg. freedom
p-value
PhenotypeObservedExpectedO − E(O−E)²/E
χ² total =

How the chi-square test works

A genetic hypothesis predicts a ratio, and real data always wander from it a little through pure chance. The chi-square test asks whether the wandering is small enough to be chance, or too big to ignore. For every category you compute (observed − expected)² / expected and add them up: that sum is χ². A small χ² means the counts hug the prediction; a large χ² means they stray. You then compare χ² against the chi-square distribution for your degrees of freedom (categories minus one) to get a p-value. By the standard 0.05 cutoff, a p-value above 0.05 means the data fit the ratio, and 0.05 or below means the deviation is significant. Note that here a high p-value is the good result, because the hypothesis is that the cross matches the ratio.

Related tools: Punnett square calculator · X-linked inheritance · Hardy-Weinberg calculator · all biochem tools.

Critical values at α = 0.05

Degrees of freedomCritical χ²Meaning
1 (2 categories, e.g. 3:1)3.84χ² above this rejects the fit
2 (3 categories, e.g. 1:2:1)5.99 
3 (4 categories, e.g. 9:3:3:1)7.81 
4 (5 categories)9.49 
5 (6 categories)11.07 

If your χ² is below the critical value (equivalently, p > 0.05), you fail to reject the hypothesis and the data fit the ratio. This calculator reports the exact p-value, so you do not have to read a table.

FAQ

What does the test tell you?
Whether the gap between observed and expected counts is small enough to be chance (data fit the ratio) or too large (significant deviation).

How do I get degrees of freedom?
Categories minus one. A 3:1 cross has df = 1; a 9:3:3:1 cross has df = 3.

Why is a high p-value good here?
The hypothesis is that the cross fits the ratio, so a high p-value (deviation is just chance) supports your genetic model.

Percentages or counts?
Always use raw counts, never percentages. Chi-square depends on sample size.

When is it unreliable?
When any expected count is very small (roughly under 5). Use larger samples or an exact test.