Mendelian Ratio Calculator: Chi-Square Test for 3:1, 9:3:3:1 and More
Counted your F₂ offspring? Pick the expected ratio (3:1, 1:2:1, 9:3:3:1, an epistatic ratio such as 9:7 or 15:1, or your own) and enter the counts. You get the expected numbers, a chi-square goodness-of-fit test, the G-test and an exact test, plus a heterogeneity test when you have several families.
- PriceFree, no login or sign-up needed
- Your dataProcessed in your browser, never uploaded
- Works onPhone, tablet or computer, any modern browser
- Made byDr. Muhammad Aammar Tufail, Codanics
- Published17 November 2026
- Last updated16 November 2026
📚 How to cite this tool
This tool is free. If it helped your thesis, paper, report or assignment, please cite it. It keeps the tools free and helps other students find them.
Tufail, M. A. (2026). Mendelian ratio calculator: chi-square test for segregation ratios [Online tool]. Codanics. Retrieved 16 November 2026, from https://codanics.com/tools/mendelian-ratio-calculator/
In-text citation: (Tufail, 2026) · Narrative: Tufail (2026)
The access date is today’s date, filled in automatically. Author: Muhammad Aammar Tufail. Published 17 November 2026.
How to use the Mendelian Ratio Chi-Square Calculator
- Choose the expected ratio, for example 3:1 for a monohybrid F₂ or 9:3:3:1 for a dihybrid F₂. For any other ratio choose Custom, or add and remove classes and type the ratio parts.
- Type the name and the observed count of each phenotype class, in the same order as the ratio.
- Click Test the ratio. If p is above α (usually 0.05), your data fit the expected ratio. If an expected count is below 5, the exact test is used instead of chi-square.
- Have several families, plants or replicates? Use Several families to check that they agree (heterogeneity test) before pooling them.
How the chi-square test for Mendelian ratios works
The expected count of each class is the total number of offspring multiplied by that class’s share of the ratio. For a 3:1 ratio with 400 plants, you expect 300 and 100. The chi-square statistic adds up how far each observed count is from its expectation:
A small χ² (p ≥ 0.05) means the deviations are small enough to be due to chance, so the data are consistent with the hypothesised ratio. Remember that a non-significant test does not prove the ratio: it only shows the data do not contradict it.
Common ratios and what they mean
| Ratio | Cross and explanation |
|---|---|
| 3:1 | Monohybrid F₂, complete dominance |
| 1:2:1 | Monohybrid F₂, incomplete dominance or codominance (or genotypes scored with a marker) |
| 1:1 | Test cross (Aa × aa) or backcross |
| 2:1 | Recessive lethal allele (AA dies) |
| 9:3:3:1 | Dihybrid F₂, independent assortment |
| 1:1:1:1 | Dihybrid test cross |
| 9:3:4 | Recessive epistasis (e.g. coat colour in mice and Labrador retrievers) |
| 12:3:1 | Dominant epistasis (e.g. fruit colour in summer squash) |
| 9:7 | Complementary genes (e.g. flower colour in sweet pea) |
| 15:1 | Duplicate dominant genes (e.g. seed capsule shape in shepherd’s purse) |
| 13:3 | Dominant suppression (e.g. feather colour in chickens) |
| 9:6:1 | Duplicate genes with cumulative effect (e.g. fruit shape in summer squash) |
Worked example: Mendel’s dihybrid cross
Mendel counted 315 round yellow, 108 round green, 101 wrinkled yellow and 32 wrinkled green seeds (n = 556). Expected counts for 9:3:3:1 are 312.75, 104.25, 104.25 and 34.75. χ²(3) = 0.016 + 0.135 + 0.101 + 0.218 = 0.470, p = .925. The data fit the 9:3:3:1 ratio very well.
Several families: the heterogeneity chi-square
If you scored several families, pods or plants, first check whether they all segregate the same way. Compute χ² for each family and add them up (total χ²); compute χ² for the pooled counts; the difference is the heterogeneity χ², with df = total df − pooled df. A significant heterogeneity χ² means the families differ and should not be pooled.
Small samples
Chi-square is an approximation that needs expected counts of at least 5 in every class. For smaller samples, the exact binomial test (two classes) or exact multinomial test (more classes) gives the correct p-value by adding up the probabilities of all outcomes as likely as, or less likely than, the one observed.
References: Mendel G (1866) Versuche über Pflanzen-Hybriden · Sokal RR, Rohlf FJ (2012) Biometry, 4th ed., Freeman (G-test and heterogeneity) · Griffiths AJF et al. (2020) Introduction to Genetic Analysis, 12th ed. · Yates F (1934) J R Stat Soc Suppl 1:217.
Frequently asked questions
How do I do a chi-square test for a 3:1 ratio?
Multiply the total by 3/4 and 1/4 to get the expected counts, then calculate Σ(O − E)²/E. Compare with the chi-square distribution with 1 degree of freedom: the critical value at α = 0.05 is 3.841. Enter your two counts above and the calculator does it for you.
What are the degrees of freedom in a Mendelian chi-square test?
Number of classes minus one: 1 df for 3:1 or 1:1, 2 df for 1:2:1 or 9:3:4, 3 df for 9:3:3:1.
What does p > 0.05 mean here?
That the difference between your observed and expected counts could easily be due to chance, so your data are consistent with the expected ratio. It does not prove that the ratio is correct.
Should I use Yates' correction?
Some genetics courses use it for two classes (1 df) with small samples. It makes the test more conservative. Many statisticians prefer the exact binomial test instead, which this tool also shows.
What is the critical value for 9:3:3:1?
With 3 degrees of freedom, the critical chi-square value is 7.815 at α = 0.05 and 11.345 at α = 0.01.
Can I use percentages instead of counts?
No. The chi-square test needs the actual number of individuals. Percentages give wrong results because the test depends on sample size.
Is my data uploaded?
No. Everything is calculated in your browser and nothing is stored.
Do I need to log in or create an account to use the Mendelian Ratio Chi-Square Calculator?
No. There is no login, no sign-up and no email required. Open the page and start using it straight away, for free, on any device.
How do I cite this tool in my thesis or paper?
Use the citation box on this page. In APA 7th edition: Tufail, M. A. (2026). Mendelian ratio calculator: chi-square test for segregation ratios [Online tool]. Codanics. Retrieved [date you used it], from https://codanics.com/tools/mendelian-ratio-calculator/. BibTeX, RIS (EndNote, Mendeley, Zotero), MLA, Harvard, Chicago and Vancouver formats are also available.
Free guides and courses from Codanics
More free tools
See all free Codanics tools → · Codanics on YouTube · WhatsApp channel