Start typing to discover tools…

Chi-Square Calculator

Calculate chi-square statistics, degrees of freedom, expected frequencies, p-values, and hypothesis-test conclusions for goodness-of-fit and independence tests.

Chi-Square Goodness-of-Fit Test

Compare observed category counts with expected counts from a proposed distribution.

Usually 0 unless distribution parameters were estimated from the same data.
Category data

Goodness-of-Fit Results

Chi-Square 0
Degrees of Freedom 0
P-Value 0
Total Observations 0

Category Contributions

Category Observed Expected Difference Contribution

Chi-Square Test of Independence

Determine whether two categorical variables have a statistically significant association.

Observed contingency table

Independence-Test Results

Chi-Square 0
Degrees of Freedom 0
P-Value 0
Sample Size 0

Expected Frequencies and Contributions

Cell Observed Expected Difference Contribution
Simple Process

How the Chi-Square Calculator Works

Run a complete categorical-data hypothesis test in three straightforward steps.

1

Select the Test

Choose goodness of fit to compare a sample with an expected distribution, or independence to analyze two variables.

2

Enter Frequency Data

Add observed and expected category counts, or build a contingency table containing your observed frequencies.

3

Interpret the Results

Review the chi-square statistic, degrees of freedom, p-value, expected frequencies, and test conclusion.

What Is a Chi-Square Test?

A chi-square test is a nonparametric statistical method used to analyze frequency or count data. It evaluates whether differences between observed and expected frequencies are large enough to be considered statistically significant.

The test works with categories rather than continuous measurements. Common applications include surveys, marketing research, genetics, education, product testing, medical studies, and social science research.

χ² = Σ ((O − E)² ÷ E) O represents an observed frequency, while E represents an expected frequency.

Goodness-of-Fit Test

A goodness-of-fit test determines whether observed frequencies follow a specified theoretical distribution. For example, it can test whether a six-sided die produces each result equally often.

Test of Independence

A test of independence evaluates whether two categorical variables are associated. For example, it can test whether product preference is related to a customer's age group.

Test Requirements

Chi-Square Test Assumptions

Check these conditions before relying on the result of a chi-square analysis.

Frequency Data

Enter actual counts of cases or observations. Do not enter percentages, averages, proportions, or measured values.

Independent Observations

Each observation should belong to only one category or contingency-table cell and should not be counted repeatedly.

Adequate Expected Counts

Expected frequencies should generally be at least 5. Sparse tables may require categories to be combined or a different statistical test.

Common Questions

Chi-Square Calculator FAQs

Helpful answers about chi-square statistics, p-values, expected counts, and interpretation.

A high chi-square statistic indicates a relatively large difference between observed and expected frequencies. Whether that difference is statistically significant depends on the degrees of freedom and resulting p-value.

At a 5% significance level, a p-value below 0.05 indicates statistically significant evidence against the null hypothesis. The null hypothesis is therefore rejected.

In a contingency table, each expected frequency equals the row total multiplied by the column total, divided by the overall sample size. In a goodness-of-fit test, expected counts come from the proposed distribution.

The chi-square test should use frequency counts. Convert percentages into actual counts using the sample size before entering your data.

Very small expected frequencies can make the chi-square approximation unreliable. Consider combining appropriate categories, collecting more data, or using an exact test such as Fisher's exact test for a small 2 × 2 table.

For a goodness-of-fit test, degrees of freedom usually equal the number of categories minus 1 minus the number of estimated parameters. For an independence test, they equal rows minus 1 multiplied by columns minus 1.

No. A significant test of independence suggests an association between variables, but it does not establish that one variable causes the other.