← Biology

Genetics Test

Mendelian ratio chi-square test calculator

From observed counts and expected ratios (e.g., 3:1, 9:3:3:1), compute χ², df, and p-value. View expected counts, per-category contributions, and observed vs expected charts.

All calculations run in your browser. Your data is never sent.

Other languages 日本語 | English | 简体中文 | Español | Português (Brasil) | Bahasa Indonesia | Français | हिन्दी | العربية

How to use (3 steps)

  1. Select a ratio preset (3:1, etc.) or enter a custom ratio.
  2. Enter observed counts for each category (use an example to start quickly).
  3. Results (χ², p-value, expected counts, charts) appear; with auto update on, they refresh as you type.

Results are guides. Check contributions and charts together.

Inputs (ratio & observed counts)

Only available for 2 categories (df=1).

Current ratio: / Total N:

Category Observed Actions
Paste (TSV/CSV)

You can paste 2 columns (category, observed) or 1 column (observed only). 3 columns (category, observed, ratio) also work.

Results (χ² & p-value)

χ²
df
p-value
α (guide)

Observed vs expected (table & charts)

Observed Expected
Category Observed Expected O−E Contribution Pearson residual Ratio

Observed vs expected

Contribution

How it’s calculated

“Guide” on this calculator is not a definitive judgement. Review assumptions (e.g., how categories are grouped) as needed.

When to use Mendelian chi-square

Use this page when you already have observed offspring counts and want to test whether they are close to a fixed Mendelian ratio such as 3:1 or 9:3:3:1. It is the right next step after a Punnett square predicts the expected ratio and before you discuss whether sampling noise is large enough to explain the mismatch.

Recommended workflow

  1. Choose the expected ratio that matches your cross design.
  2. Enter observed counts for each phenotype or genotype class.
  3. Check the contribution column to see which class drives most of the χ² value.
  4. Review small expected-count warnings before you treat the p-value as reliable.

Common interpretation limits

How this genetics page differs from the others

FAQ

What if expected counts are small?

Small expected counts can make the χ² approximation rough. This calculator shows a warning (guide).

Does p<0.05 mean it does not fit?

It is a common guideline, but interpretation depends on context. We show it as a reference only.

What should I enter for category names?

Anything is fine (e.g., dominant/recessive, AA/Aa/aa). It works even if blank.

Does the share URL include data?

You can choose to include or exclude it. Data stays in your browser and is not sent.

Where are observed data sent?

All calculations run in your browser. Inputs are not sent anywhere.

What to compare next

If you are still building the expected ratio, start with a Punnett square. If you need population-level expected genotype frequencies instead of a single cross ratio, switch to the Hardy-Weinberg calculator. If you want to model how allele frequencies drift across generations, move to Wright-Fisher.

Related tools

Comments (optional)

To reduce load, comments are fetched only when needed.