About Chi-Square Genetics Calculator
A chi-square goodness-of-fit test asks whether observed counts are close enough to an expected genetic ratio to be explained by chance. It is the standard follow-up to a Punnett square: the square predicts 3 : 1 or 9 : 3 : 3 : 1, and the test turns the gap between prediction and data into a p-value.
This calculator accepts observed counts with either expected counts or an expected ratio, derives expected counts from the observed total, and reports χ², degrees of freedom, the p-value and critical values at α = 0.05 and 0.01. The p-value is computed from the chi-square survival function, and the conclusion is worded as fail to reject or reject rather than as proof.
What this tool does
Ratio or expected counts
Enter a ratio such as 3:1 or 9:3:3:1 and expected counts are calculated from the observed total, or type expected counts for each class directly.
Every class contribution
χ² = Σ (O − E)² / E is shown with a table of observed, expected and per-class contributions that add up to the statistic.
p-value without lookup tables
The p-value comes from the regularized upper incomplete gamma function, implemented in the tool, so no distribution table or external library is needed.
Critical values
Critical χ² values at α = 0.05 and α = 0.01 are computed for the actual degrees of freedom and compared with the statistic.
Cautious conclusion
The result says reject or fail to reject at each level and states that failing to reject is not proof that the data fit the expected ratio.
Input validation
Mismatched class counts, zero expected counts and non-integer observed counts are caught with clear messages before the test runs.
How to use Chi-Square Genetics Calculator
- 01
Enter the observed counts
Type one whole-number count per class, separated by lines or commas; zero is allowed for a class with no observations.
- 02
Choose expected ratio or counts
Switch modes and either type a ratio such as 3:1 or enter an expected count for every class.
- 03
Check that the class counts match
The ratio or expected list must have the same number of values as the observed list, otherwise the tool explains the mismatch.
- 04
Read χ², degrees of freedom and p
The summary shows the statistic, degrees of freedom and p-value, with the substitution written out in full.
- 05
Interpret the conclusion
Compare the statistic with the critical values, read the cautious conclusion and check the assumptions before reporting it.
How this tool works
- Works with
- COUNTS + RATIO → χ²
- Processing
- Client-side, in your browser. Nothing is uploaded.
- Requirements
- Chrome, Edge, Firefox or Safari · JavaScript enabled
Limitations worth knowing
- Assumes independent observations and a fixed total; it does not apply a continuity correction or an exact test for small expected counts.
- A p-value does not prove or disprove a model, and small samples have low power to detect real deviations from the expected ratio.
- Only the standard Pearson goodness-of-fit test is implemented; Yates correction, Monte Carlo tests and homogeneity tests for contingency tables are not included.
Privacy and file handling
The counts you enter stay in this browser tab. Parsing, the chi-square statistic, the p-value and the critical values all run with JavaScript on your device, so nothing is uploaded, stored or logged, and closing the page discards the data.
Read the full privacy policy