Math

Chi-Square Calculator

Live

Calculate a chi-square goodness-of-fit statistic.

About Chi-Square Calculator

Calculate a chi-square goodness-of-fit statistic. Enter observed counts, expected counts in a purpose-built chi square interface designed for this subject. The sum of squared observed-minus-expected differences divided by expected counts produces the statistic. The result includes chi-square statistic, degrees of freedom, approximate p-value, cell contributions, supporting detail, and clear units or diagnostics. Results depend on the entered assumptions and rounding. Check important decisions against the original records or an authoritative source. Processing stays in your browser, and UtilityPages does not store the values you enter.

Set up Chi-Square Calculator

Workspace

Structured calculation

Follow the input-to-result path; the fields below remain the source of every value.

Complete the fields to prepare a result.

Enter observed counts for this calculation.

Enter expected counts for this calculation.

Chi-Square Calculator result

Enter the values above, then calculate to see a detailed result.

How Chi-Square Calculator works

The sum of squared observed-minus-expected differences divided by expected counts produces the statistic.

How it works

The sum of squared observed-minus-expected differences divided by expected counts produces the statistic. Results depend on the entered assumptions and rounding. Check important decisions against the original records or an authoritative source.

Examples

Chi-Square Calculator worked example

Example input
{
    "observed": "48, 52, 61, 39",
    "expected": "50, 50, 50, 50"
}
Expected result
{
    "chi_square": 5,
    "degrees_of_freedom": 3,
    "p_value_approx": 0.16998671,
    "rows": [
        {
            "category": 1,
            "observed": 48,
            "expected": 50,
            "contribution": 0.08
        },
        {
            "category": 2,
            "observed": 52,
            "expected": 50,
            "contribution": 0.08
        },
        {
            "category": 3,
            "observed": 61,
            "expected": 50,
            "contribution": 2.42
        },
        {
            "category": 4,
            "observed": 39,
            "expected": 50,
            "contribution": 2.42
        }
    ]
}

Privacy

This tool does not store your inputs or results on UtilityPages.org.

Citations & sources

  1. NIST/SEMATECH e-Handbook of Statistical Methods

Frequently asked questions

How does the Chi-Square Calculator work?

The sum of squared observed-minus-expected differences divided by expected counts produces the statistic.

What information should I enter?

Enter observed counts, expected counts. Use values and units from the same scenario so the result is internally consistent.

What results does this tool provide?

It reports chi-square statistic, degrees of freedom, approximate p-value, cell contributions, including intermediate context where it helps you review the answer.

What limitations should I know about?

Results depend on the entered assumptions and rounding. Check important decisions against the original records or an authoritative source.