← All text tools

Chi-square test calculator

Enter a contingency table or observed and expected counts to get the chi-square statistic, degrees of freedom, p-value and each cell's contribution.

  • Free
  • No sign-up
  • Works on any device

About Chi-square test calculator

The chi-square test compares counts you observed with counts you would expect. For a contingency table it tests whether two categories are independent, using expected = row total x column total / grand total. For goodness of fit it tests whether counts match a pattern such as equal shares or a 1 : 2 : 1 ratio. Type your table, get the statistic, degrees of freedom and p-value, plus each cell's contribution so you can see which cells drive the result. Warnings appear when expected counts fall below 5.

How to use Chi-square test calculator

  1. Choose a test of independence or a goodness-of-fit test.
  2. Type the observed counts, one table row per line, and for goodness of fit optionally the expected values.
  3. Read the statistic, degrees of freedom and p-value, then look at the contribution table for the cells that stand out.

Why use this tool?

Also known as

Frequently asked questions

What does a small p-value mean in a chi-square test?

It means the observed counts would be unlikely if the null hypothesis were true, such as no link between the two categories. Below 0.05 is the usual threshold.

What is the minimum expected count for a valid test?

A common rule is that all expected counts should be at least 5. If many are smaller, merge categories or use an exact test.

How are degrees of freedom worked out?

For a table it is (rows - 1) x (columns - 1). For goodness of fit it is the number of categories minus 1.

Is Chi-square test calculator free?

Yes. Chi-square test calculator on Toolipedia is free to use, with no sign-up and no watermark.

Is it safe to use?

Yes. Everything is worked out in your browser, and nothing you enter is sent to our server.

Does it work on my phone?

Yes. It works in any modern browser on Android and iPhone, as well as on tablets and computers. There's nothing to install.

Do I need an account?

No. Just open the page and use the tool. There's no sign-up and no email needed.

Can I put Chi-square test calculator on my own website?

Yes. Use the Embed on your site button under the tool to copy a short piece of code and paste it into your page. It is free, needs no account, and the tool keeps working inside your page.

Related tools