About this calculator
Rows are separated by semicolons: 20, 30; 30, 20 is a 2 × 2 table.
How to use it
- Choose the test.
- Enter the counts.
- Read χ², the p-value and the expected counts.
The formula
χ² = Σ (O − E)² ÷ E; table: E = row total × column total ÷ grand total
- O
- observed count
- E
- expected count
- df
- (rows − 1)(columns − 1), or categories − 1
Worked example
A 2 × 2 table 20, 30; 30, 20
- Every expected count is 25, so χ² = 4 × 25 ÷ 25 = 4.
- df = 1, p = 0.0455: significant at 5%.
What the result means
A significant result means the observed pattern is unlikely to be chance alone; it says nothing about the size or cause of the link.
Assumptions
- Counts, not percentages; independent observations; expected counts mostly 5 or more.
Limitations
- No Yates correction is applied to 2 × 2 tables.
Frequently asked questions
Can I enter percentages?
No. The test needs the actual counts.
What does p < 0.05 mean?
If there were no real link, a result this extreme would happen less than 5% of the time.
What if expected counts are below 5?
Combine categories, or for a 2 × 2 table use Fisher’s exact test.
Last reviewed on 6 October 2026. Found a mistake? Tell us.

