Chi-Square Calculator

Independence • Goodness-of-fit • Critical χ²

Settings

α
α is optional. Used for critical χ² (right-tail) and decision.
Quick summary
Pick a mode and enter values.
Rows Cols
Enter counts table (observed). We compute expected counts and χ².
Observed counts
Tip: you can paste a row like: 10 12 8 into a row’s first cell.

Use counts, not percentages, and check that expected counts are large enough (often at least 5).

Results

χ² statistic
Degrees of freedom (df)
p-value (right tail)
p = P(Χ² ≥ χ²_obs)
Critical χ² (α)
Right-tail: P(Χ² ≥ χ²_crit)=α
Decision
Reject H₀ if p ≤ α (α default 0.05).
Total N
Updating…

Action

Hard reset: cancels pending updates and clears everything on the first click.

Use this Chi-Square Calculator for goodness-of-fit tests, tests of independence, or right-tail chi-square distribution calculations.

Calculation Method

The chi-square statistic is:

χ² = Σ[(O − E)² ÷ E]

Where O is the observed count and E is the expected count.

For a test of independence:

Expected count = row total × column total ÷ grand total

df = (rows − 1) × (columns − 1)

For a goodness-of-fit test with fully specified expected probabilities:

Expected count = total sample size × expected proportion

df = number of categories − 1

Example

Suppose three categories have observed counts of 20, 30, and 50, while equal frequencies are expected.

Total observations = 100, so each expected count is approximately 33.33.

χ² ≈ (20−33.33)²/33.33 + (30−33.33)²/33.33 + (50−33.33)²/33.33

χ² ≈ 14.0

With three categories:

df = 3 − 1 = 2

Important Note

Chi-square tests use counts, not percentages alone. Observations should be appropriately independent, and expected counts must be sufficiently large for the chi-square approximation to be reliable. A significant result does not prove causation.

Sources

More of our calculators...

Outlier Calculator (Tukey Fences)

Use our Outlier Calculator to find low and high outliers with Tukey fences and the IQR method. Get Q1, Q3, IQR, fences, counts, and sorted data fast.

t-test Calculator

Use our T-Test Calculator to compute t statistic, p-value, confidence interval, and conclusion for one-sample, Welch, pooled, or paired t-tests.

Z-score Calculator

Use our Z-Score Calculator to standardize a value or sample mean, convert percentile to z, convert z to percentile, and view left-tail and right-tail probabilities.

Power Analysis Calculator

Use our Power Analysis Calculator to estimate sample size per group, statistical power, and minimum detectable effect for a two-sample mean test with alpha and standard deviation.

t-statistic Calculator

Use our t-Statistic Calculator to compute the t value, degrees of freedom, and standard error for one-sample, two-sample, Welch, pooled, or paired t-tests.

Median Calculator

Use our Median Calculator to find the middle value of any data set. Supports raw numbers, value:count input, sorted preview, and instant live results.

IQ PERCENTILE CALCULATOR

Use our IQ Percentile Calculator to convert an IQ score into percentile rank, percent above, and percent below using SD 15 or SD 16 normal-distribution scales.

Margin of Error Calculator

Use our Margin of Error Calculator to find margin of error for a mean or proportion from sample size, confidence level, and z value.

Sample Size Calculator

Use our Sample Size Calculator to estimate sample size for a mean or proportion from confidence level, margin of error, and optional finite population correction.