Chi-Square Goodness-of-Fit & Independence Test

Chi-Square (χ²) Goodness-of-Fit Test Solver

Calculate Chi-Square test statistic Σ((O - E)² / E), degrees of freedom, and statistical significance at α = 0.05.

Observed vs Expected Frequencies

Obs:
Exp:
Obs:
Exp:
Obs:
Exp:
Obs:
Exp:
Chi-Square Statistical Result Client-Side Execution
χ² Statistic

2.900

Σ (O-E)² / E
Degrees of Freedom

3

k - 1 categories
Critical Value (α=.05)

7.82

Threshold for reject
Hypothesis Test

Fail to Reject H₀

Fits Expected Distribution

At a Glance

Category
Statistics
Best For
Students and researchers testing whether counts match an expected distribution
Privacy
100% in your browser: nothing you enter is uploaded
Time Required
Under a minute
Cost
Free
Updated
November 2026

Quick Overview

What This Tool Does

Sums (observed − expected)² ÷ expected across categories and compares it with the 0.05 critical value.

Who Should Use It

Statistics students, researchers and quality analysts.

When to Use It

Testing whether dice, surveys or categories follow an expected pattern.

Why It Is Useful

It shows whether differences between observed and expected counts are bigger than chance.

Key Features & Capabilities

Any number of categories

Add or remove category rows as needed.

Critical value at 0.05

Table values for 1 to 10 degrees of freedom.

Significance verdict

Whether to reject the expected pattern.

How to Use This Tool

1

List your categories

Enter a name for each category. Tip: Use at least two categories.

2

Enter observed counts

Type the counts you saw. Tip: Use counts, not percentages.

3

Enter expected counts

Type the counts expected under your hypothesis. Tip: Each must be above zero.

4

Read the result

Compare χ² with the critical value. Tip: Larger than the critical value means significant.

Worked Real-World Example

Four categories of 20

A survey of 80 responses expects 20 in each of four categories but observes 25, 15, 18 and 22.

Sample Inputs
Observed vs expectedA 25/20; B 15/20; C 18/20; D 22/20
χ²2.900 with 3 df: not significant at 0.05
Calculation Breakdown
Contributions: (5² + 5² + 2² + 2²) ÷ 20 = (25 + 25 + 4 + 4) ÷ 20
Chi-square: 58 ÷ 20 = 2.900
Degrees of freedom: 4 − 1 = 3
Critical value at 0.05: table value for df = 3 = 7.815; the result is not significant
The differences are small enough to be explained by chance, so there is no evidence against an even distribution.

How It Works (Math & Calculation Logic)

χ² = Σ (O − E)² ÷ E. Degrees of freedom = categories − 1. The critical value at α = 0.05 comes from a table for 1 to 10 degrees of freedom (for example 3.841, 5.991, 7.815, 9.488). The result is significant if χ² exceeds it.

Formula / Algorithmχ² = Σ (O − E)² ÷ E
Variable & Logic Definitions
OObserved - Observed count (count)
EExpected - Expected count (count)
dfDegrees of freedom - Categories − 1

How to Interpret Your Results

Typical Benchmarks

Critical values at 0.05: 3.841 (1 df), 5.991 (2), 7.815 (3), 9.488 (4).

Evaluating Your Output

Expected counts should usually be at least 5.

Recommended Next Action

Combine sparse categories before testing.

Frequently Asked Questions

What is a chi-square test?
A test comparing observed counts with expected counts.
How do I calculate degrees of freedom?
Number of categories minus one.
What is the critical value?
The threshold above which the result is significant at the chosen level.
Can I use percentages?
No, enter counts rather than percentages for each category.
What if expected counts are small?
Combine categories or use an exact test.

Complementary QuickForma Utilities

Mathematics & Statistics

Probability Calculator

Calculate single-event, joint intersection P(A and B), union P(A or B), and complement probabilities.

Open Tool
Mathematics & Statistics

Hypothesis Test Calculator

Calculate test statistic Z = (xbar - mu) / (s / sqrt(n)), two-tailed p-value, and significance decision.

Open Tool
Mathematics & Statistics

Margin of Error & Survey Sample Size Solver

Calculates minimum required survey sample size based on confidence level (95%, 99%) and margin of error.

Open Tool
Mathematics & Statistics

One-Way & Two-Way ANOVA F-Test Calculator

Computes Analysis of Variance (ANOVA) table, Sum of Squares, Mean Squares, and F-statistic.

Open Tool
Mathematics & Statistics

Sample & Population Variance Standalone Solver

Calculates sample variance (s²) and population variance (σ²) with step-by-step deviation sums.

Open Tool
Mathematics & Statistics

Paired & Unpaired Two-Sample Student's t-Test

Calculates 1-sample, 2-sample independent, and paired t-test statistics and p-values.

Open Tool
Mathematics & Statistics

p-Value Calculator from Z, t, F & Chi-Square Statistics

Converts test statistics (Z, t, F, chi²) into one-tailed and two-tailed p-values.

Open Tool
Mathematics & Statistics

Pearson r & Spearman Rank Correlation

Computes Pearson product-moment correlation coefficient r and Spearman rank correlation.

Open Tool
Mathematics & Statistics

IQR, Box Plot Quartiles & Outlier Detector

Solves Q1, Q2 (Median), Q3, Interquartile Range (IQR), and identifies mild/extreme outliers (1.5 × IQR).

Open Tool