CHIDIST in Google Sheets returns the right-tailed probability of the chi-squared distribution for a given value and degrees of freedom. In plain terms, it tells you how likely it is to see a chi-squared statistic at least as large as the one you entered, assuming the null hypothesis is true. You need a numeric test statistic and the degrees of freedom for your test; no add-ons or special setup are required because CHIDIST is a built-in function.
What You'll Need
- A Google account with access to Google Sheets (desktop browser or the mobile app).
- A spreadsheet where you can enter your test statistic and degrees of freedom.
- Your chi-squared test statistic as a positive number. If you are starting from raw counts, calculate the statistic first; CHIDIST does not compute it for you.
- The correct degrees of freedom for your test. For a goodness-of-fit test this is usually categories minus 1; for a contingency table it is (rows − 1) × (columns − 1).
Step-by-Step
- Open your spreadsheet at sheets.google.com or in the Google Sheets app. Create a new sheet or use an existing one.
- Put your chi-squared test statistic in one cell, for example A2. Enter it as a plain number such as 3.84, not as text. If the cell shows a green triangle or is left-aligned, it may be stored as text; retype it or format the cell as a number.
- Put the degrees of freedom in another cell, for example B2. This must be a positive whole number. For a test with 1 degree of freedom, enter 1.
- Click the cell where you want the probability to appear, for example C2.
- Type the formula
=CHIDIST(A2, B2)and press Enter. You can also type=CHIDIST(3.84, 1)to test with literal values. - Read the result. It is a probability between 0 and 1. A small result (commonly below 0.05) suggests the observed data are unlikely under the null hypothesis, which is the usual basis for rejecting it. The exact threshold depends on your field and study design, so state it before you look at the result.
- Format the result cell as a percentage or with more decimal places if you want to read it more easily. Select the cell, then use Format > Number > Percent, or the increase-decimal-places button in the toolbar.
- Copy the formula down if you have several test statistics or degrees of freedom. Relative references adjust automatically; use dollar signs such as
$B$2if a value should stay fixed.
Menu labels and toolbar buttons can differ slightly by Google Sheets version, device and region, but the function name and argument order are the same everywhere.
Common Mistakes
- Using the wrong tail. CHIDIST gives the right-tailed probability. If your textbook or software reports a left-tailed or two-tailed value, you need a different calculation, not CHIDIST alone.
- Entering degrees of freedom as a decimal. CHIDIST expects a positive integer for degrees of freedom. A value like 2.5 will produce an error or an unexpected result.
- Passing text instead of numbers. Quotation marks around a number, or a cell formatted as plain text, can cause a #VALUE! error. Remove the quotes and check the cell format.
- Confusing the test statistic with the p-value. CHIDIST takes the statistic, not the probability. If you already have a p-value, you do not need CHIDIST.
- Forgetting that CHIDIST is right-tailed only. There is no third argument to switch tails. For a left-tailed probability, use 1 − CHIDIST(statistic, degrees of freedom).
- Using a negative statistic. Chi-squared statistics are non-negative. A negative input returns an error.
Tips
- Keep the statistic and degrees of freedom in separate cells so you can change one without rewriting the formula.
- Use
CHISQ.DIST.RTif you prefer the newer function name; it behaves the same way for the right-tailed probability. CHIDIST remains available for compatibility with older spreadsheets. - Label your columns clearly, for example "Chi-squared statistic" and "Degrees of freedom", so the sheet is readable months later.
- Round only for display. Keep full precision in the cell and format the display separately, otherwise small p-values can look like zero.
- If you are building a report, put the threshold you are using in its own cell and compare with a formula such as
=C2<0.05so the decision updates automatically.
Troubleshooting
- #NUM! error: usually means the statistic is negative or the degrees of freedom is zero or negative. Check both inputs and make sure the degrees of freedom is at least 1.
- #VALUE! error: one of the arguments is text or an empty cell that Sheets cannot convert. Retype the value without quotes and confirm the cell contains a number.
- Result looks wrong: confirm you entered the statistic, not the p-value, and that the degrees of freedom match your test. Recalculate the statistic from the raw counts if you are unsure.
- Formula shows as text: the cell may be formatted as plain text. Change the format to automatic or number, then re-enter the formula.
- Mobile app behaves differently: the function works the same, but formula entry and cell formatting are accessed through different menus. If you cannot find a formatting option, finish the formatting on a desktop browser.
- Still stuck: put the statistic and degrees of freedom in fresh cells, type the formula again from scratch, and test with a known example such as
=CHIDIST(3.84, 1)to confirm the function itself is working.
Frequently Asked Questions
What does CHIDIST actually return?
It returns the right-tailed probability of the chi-squared distribution: the chance of observing a statistic at least as large as the one you entered, given the degrees of freedom.
Is CHIDIST the same as CHISQ.DIST.RT?
For the right-tailed probability they are equivalent. CHISQ.DIST.RT is the newer name; CHIDIST is kept for compatibility with older spreadsheets.
Can I get a left-tailed probability with CHIDIST?
Not directly. Use 1 minus the CHIDIST result, or use the appropriate cumulative function for the left tail.
What degrees of freedom should I use?
It depends on your test. For goodness of fit it is usually the number of categories minus 1; for a contingency table it is (rows − 1) × (columns − 1). Use the value your test procedure specifies.
Why does CHIDIST return an error for a negative number?
Chi-squared statistics cannot be negative, so the function rejects negative inputs. Recheck how you calculated the statistic.
Does CHIDIST work in the Google Sheets mobile app?
Yes, the function is available in the mobile app. Only the surrounding menus and formatting options differ from the desktop version.