Free Chi-Square Calculator

Test for independence between categorical variables. Get chi-square statistic, degrees of freedom, and p-value instantly.

Rows:
Columns:

Results

Chi-Square (χ²)

Degrees of Freedom

P-Value

Interpretation (α = 0.05):

Statistically significant. The p-value is less than 0.05, suggesting the variables are likely dependent (not independent).

Not statistically significant. The p-value is greater than 0.05, suggesting no strong evidence of dependence between variables.

How to Use This Chi-Square Calculator

  1. Set your table size — adjust rows and columns to match your data (2×2 up to 6×6)
  2. Enter observed frequencies — input the count for each category combination
  3. Click "Calculate χ²" to run the chi-square test
  4. Review results — check the chi-square statistic, degrees of freedom, and p-value
  5. Interpret — if p-value < 0.05, the relationship is statistically significant

What is a Chi-Square Test?

The chi-square test of independence determines whether there's a significant relationship between two categorical variables. It compares the observed frequencies in your data with the frequencies you'd expect if the variables were independent.

For example, you might test whether gender is related to product preference, or whether education level is associated with voting behavior. The test tells you if any observed pattern is likely due to a real relationship or just random chance.

A small p-value (typically < 0.05) suggests the variables are dependent — there's a statistically significant relationship between them.

The Formula

χ² = Σ [(O - E)² / E]

Where:

  • O = Observed frequency (your actual data)
  • E = Expected frequency (if variables were independent)
  • Σ = Sum across all cells

Expected frequency for each cell = (Row Total × Column Total) / Grand Total

Collecting survey responses?

Create beautiful surveys to gather the categorical data you need for your chi-square analysis. Try it yourself 👇

  • 40% higher completion rates than regular forms
  • Unlimited forms & responses — free forever
  • No credit card required
Try it yourself 👇

Frequently Asked Questions

When should I use a chi-square test?

Use a chi-square test when you have categorical data (not continuous measurements) and want to test if two variables are independent. Common examples: survey responses by demographic group, A/B test results, or comparing proportions across categories.

What's the minimum sample size for chi-square?

A rule of thumb is that expected frequencies should be at least 5 in each cell. With smaller expected counts, consider using Fisher's exact test instead, especially for 2×2 tables.

What does a significant result mean?

A p-value below 0.05 means there's likely a real relationship between your variables — they're not independent. However, significance doesn't tell you how strong the relationship is. For effect size, look at measures like Cramér's V.

Can I use percentages instead of counts?

No, chi-square requires actual frequency counts (whole numbers), not percentages or proportions. If you only have percentages, multiply by your total sample size to get counts.

What's the difference between chi-square and t-test?

Chi-square tests relationships between categorical variables, while t-tests compare means of continuous variables. Use chi-square for categories (yes/no, groups) and t-tests for measurements (scores, times, amounts).

Youform - A free Typeform alternative | Product Hunt

🔒 Data securely stored with AWS in EU 🇪🇺

🧡  Help Center 🙏  Feature Request