CHISQ.DIST in ONLYOFFICE Spreadsheet Editor
Evaluate chi-square cumulative probability or density in ONLYOFFICE, with explicit tail distinctions and independent two-degree examples.
Verification status: See the evidence and test scope described in this guide. How formula examples are checked
Quick answer: =CHISQ.DIST(4,2,TRUE) is independently expected to return 0.864664716763, while =CHISQ.DIST(4,2,FALSE) gives density 0.0676676416183.
Availability and evidence scope
- Introduced: Original introduction release is not established by the sources checked.
- Available: Documented in current unversioned ONLYOFFICE function help, checked October 18, 2026.
- Implementation inspected: Official SDKJS v10.0.0.169, commit
3679e0375a758d7dc59d31337a45461be3525ed8. This establishes a source snapshot, not identical behavior in every installed editor. - Retired or deprecated: Retirement or formal deprecation is not established by these sources. A legacy spelling is not automatically a removed function.
- Testing: Examples are independently calculated or labeled source predictions. No ONLYOFFICE application or calculation-engine execution was performed. No native screenshot or general import/export guarantee is claimed.
Use English names and comma separators as shown; adapt separators outside quoted text if your locale requires semicolons. Keep full precision in calculations and round only the displayed summary.
Syntax and the cumulative switch
=CHISQ.DIST(x, deg_freedom, cumulative)
| Argument | Meaning |
|---|---|
| x | Nonnegative value of the chi-square variable or statistic |
| deg_freedom | Degrees of freedom, normally a positive integer |
| cumulative | Required selector: TRUE for left-tail cumulative probability, FALSE for density |
Exactly three arguments are registered. There is no default cumulative selector in this signature, so specify TRUE or FALSE. The cumulative result is the probability mass at or below x. The density is the height of the continuous density curve at x; it is not the probability of obtaining exactly x and is not a right-tail p-value.
Step-by-step: separate probability from density
- On a fresh worksheet put 4 in A2 and 2 in B2.
- In C2 enter
=CHISQ.DIST(A2,B2,TRUE). Expected result: 0.864664716763. - In D2 enter
=CHISQ.DIST(A2,B2,FALSE). Expected result: 0.0676676416183. - Label C2 “left-tail probability” and D2 “density” so their meanings remain visible.
For two degrees of freedom, the distribution has an especially simple independent check. The right-tail probability is exp(−x/2), the left tail is 1−exp(−x/2), and the density for x>0 is exp(−x/2)/2. At x=4, exp(−2)=0.135335283237. Subtraction from 1 and division by 2 give the two expected values above.
This check is mathematical arithmetic, not a call into the ONLYOFFICE engine. It also explains why FALSE does not mean “the other tail”: the other tail is 0.135335283237, not the density 0.0676676416183.
Advanced case: probability within an interval
For two degrees of freedom, calculate the probability between x=2 and x=4 with:
=CHISQ.DIST(4,2,TRUE)-CHISQ.DIST(2,2,TRUE)
The independent expectation is exp(−1)−exp(−2), approximately 0.232544157935. The calculation subtracts accumulated probability below the lower boundary from accumulated probability below the upper boundary. Do not subtract two density heights and call that an interval probability.
For a right-tail significance calculation, use CHISQ.DIST.RT with the same statistic and degrees of freedom. Mathematically, it complements the cumulative result. A direct right-tail routine can avoid losing a very small tail through subtraction from a rounded value near 1, although this guide does not establish extreme-tail numerical accuracy for the application.
Degrees of freedom and the zero-density boundary
The source applies parseInt to degrees of freedom. Thus an input such as 2.9 follows the df=2 branch in these ordinary examples. Enter the intended positive integer instead of relying on that conversion; the correct degrees of freedom come from the model and cannot be selected just to obtain a desired probability.
Source-specific boundary: the PDF helper returns 0 whenever x<=0. Consequently =CHISQ.DIST(0,2,FALSE) has a source-predicted result of 0, even though the mathematical right-hand density at zero for df=2 is 0.5. At df=1 the mathematical density is singular at zero, so a blanket zero-density claim would also be wrong. Keep x=0 PDF behavior separate from the mathematical limiting density. The cumulative probability at zero is correctly 0 for positive degrees of freedom.
Errors and interpretation limits
Negative x, degrees of freedom below 1 or above 10^10 trigger the implementation’s numeric-error category, conventionally #NUM!. The body validates after converting degrees of freedom, and a separate lower-bound check also appears for the cumulative/density wrapper. Nonnumeric conversions propagate errors; do not assume all text or blanks are ignored.
Use TRUE/FALSE explicitly. The body converts the cumulative input numerically and selects a branch by its truth value, but this does not justify undocumented text coercion. These scalar examples do not certify spill behavior or array imports.
A cumulative probability describes a chosen reference distribution. It is not the probability that a null hypothesis is true, and it does not validate whether a chi-square approximation is appropriate for the source data. Those questions depend on the sampling model and how the statistic and degrees of freedom were constructed.
Reproducible checks
These are mathematical expectations or identified implementation predictions, not observed application results.
| Formula | Expected result |
|---|---|
=CHISQ.DIST(4,2,TRUE) |
0.8646647167633873 |
=CHISQ.DIST(4,2,FALSE) |
0.06766764161830635 |
=CHISQ.DIST(0,2,TRUE) |
0 |
=CHISQ.DIST(0,2,FALSE) |
0 |
=CHISQ.DIST(4,2.9,TRUE) |
0.8646647167633873 |
=CHISQ.DIST(-1,2,TRUE) |
#NUM! |
Compatibility and related functions
Modern dotted names are marked as newer-format functions in the inspected SDKJS metadata. That flag does not establish their introduction date or guarantee support in older file readers. Test a small known-value example when moving a workbook between applications.
Related guides: EXP and LN reproduce the two-degree-of-freedom checks; SUM combines statistic contributions; COUNT helps inspect numeric inputs.
First-party references
- Official CHISQ.DIST help, checked October 18, 2026.
- Pinned SDKJS implementation, including chi-square helpers and argument validation.