Calculat.dev LogoCalculat.dev - All Calculators, One Place.devAll Calculators, One Place.
Statistics CalculatorsPopular Tool Runs Locally

Chi Square Calculator

Compute Pearson Chi-Square test of independence (χ²), degrees of freedom, p-value, expected frequencies, and Cramer’s V for 2x2 contingency tables.

2x2 Contingency Table (Observed Counts)
Chi-Square (χ²)
9.0909
df = 1
p-value
0.0018
Significant (p < 0.05)
Cramer's V
0.3015
effect size
Sample Size (N)
100
observations
Expected Cell Counts:
E(A): 22.5 | E(B): 27.5
E(C): 22.5 | E(D): 27.5
🎓

Did this calculation save you time?

Student Project

Hi! I'm a student developer building Calculat in my spare time. I was tired of searching for basic math tools and having to click through 10 spammy popups, loan ads, and cookie trackers.

I keep this website 100% free, private, and ad-free. If this helped you with your homework, project, or finances today, bookmarking this page or telling a friend helps me keep building more free tools!

Press ⌘ + D to Bookmark
Suggest What I Build Next

What Is a Chi Square Calculator?

The Chi Square Calculator performs Pearson’s Chi-Square Test of Independence on 2×2 contingency tables to determine whether there is a statistically significant association between two categorical variables.

How to Use This Calculator

  1. Enter the observed counts in the 2×2 grid (Cells A, B, C, D).
  2. Review the automatically computed expected frequencies for each cell.
  3. Analyze the resulting Chi-Square statistic (χ²), degrees of freedom (df = 1), p-value, and effect size (Cramer’s V).

Pearson’s Chi-Square Statistic & Expected Frequencies

E_{ij} = \frac{R_i \times C_j}{N}, \quad \chi^2 = \sum_{i,j} \frac{(O_{ij} - E_{ij})^2}{E_{ij}}, \quad V = \sqrt{\frac{\chi^2}{N \cdot \min(r-1, c-1)}}

Where O is observed frequency, E is expected frequency based on independent marginal totals, N is grand sample size, and V is Cramer’s V effect size.

Worked Example

Scenario: Testing preference between two website designs across 100 visitors (30 vs 20, 15 vs 35)

Row totals: R₁ = 50, R₂ = 50. Column totals: C₁ = 45, C₂ = 55. N = 100.

Expected frequencies: E₁₁ = 22.5, E₁₂ = 27.5, E₂₁ = 22.5, E₂₂ = 27.5.

Sum of (O - E)² / E across all 4 cells: 2.5 + 2.05 + 2.5 + 2.05 = 9.09.

Degrees of freedom: (2 - 1) × (2 - 1) = 1.

Result: χ² = 9.09, p-value = 0.0026. The association between website design and user preference is statistically significant (p < 0.05).

Tips & Key Notes

  • Ensure every cell in the table has an expected frequency of at least 5 to maintain mathematical validity.
  • If expected frequencies are less than 5, use Fisher’s Exact Test instead of Chi-Square.
  • Cramer’s V values above 0.3 indicate a moderate association; values above 0.5 indicate a strong relationship.

Frequently Asked Questions

What does a Chi-Square test tell you?

A Chi-Square test of independence tells you whether an observed difference between categorical groups is likely due to real relationships or mere random sampling chance.

What is the significance threshold (alpha)?

The standard scientific threshold is α = 0.05. If the calculated p-value is less than 0.05, you reject the null hypothesis of independence.

What is the minimum expected cell count required for Chi-Square?

Standard statistical guidelines recommend that all expected cell frequencies should be 5 or greater. If expected counts are less than 5, Fisher’s Exact Test is recommended.

What does Cramer’s V measure?

Cramer’s V measures the strength of association (effect size) between categorical variables on a scale from 0 (no relationship) to 1 (perfect correlation).

Related Calculators

Explore similar tools