Contact

CHISQ.DIST.RT and CHIDIST in ONLYOFFICE Spreadsheet Editor

Statistical Intermediate ONLYOFFICE Spreadsheet Editor

Calculate chi-square right-tail probability in ONLYOFFICE and understand its CHIDIST legacy counterpart with reproducible statistic examples.

Verification status: See the evidence and test scope described in this guide. How formula examples are checked

Quick answer: =CHISQ.DIST.RT(4,2) and the legacy =CHIDIST(4,2) have the independent expected result 0.135335283237.

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 tail meaning

=CHISQ.DIST.RT(x, deg_freedom)
=CHIDIST(x, deg_freedom)

Both names take exactly two arguments: nonnegative x and positive degrees of freedom. The result is the probability of a chi-square variable at or above x under that reference distribution. For a continuous variable, whether the boundary itself is included does not change the probability.

This is a right-tail probability, not a density and not the left cumulative probability returned by CHISQ.DIST with TRUE. A small right-tail value means a value at least this large is relatively unusual under the specified reference distribution. It does not by itself prove a cause or give the probability that a particular hypothesis is true.

Step-by-step: check a statistic of four

  1. Put statistic 4 in A2 and degrees of freedom 2 in B2.
  2. In C2 enter =CHISQ.DIST.RT(A2,B2).
  3. In D2 enter =CHIDIST(A2,B2) as a legacy-name comparison.
  4. Both have independent expected value 0.135335283237, or about 13.5335% if formatted as a percentage.

For df=2, the right tail is exactly exp(−x/2). At x=4 this is exp(−2). This elementary identity provides an independent arithmetic check without using a spreadsheet distribution implementation.

At x=0, the right-tail probability is 1 for positive df. As x increases with df fixed, the tail decreases. If a copied formula makes the tail increase while x rises, check that the degrees-of-freedom cell has not shifted and that the function is the right-tail version.

Advanced case: turn observed and expected counts into a tail

Consider observed counts 20, 30, 50 and expected counts 25, 25, 50 for three categories. The Pearson contributions are (20−25)^2/25=1, (30−25)^2/25=1 and 0. Their sum is statistic 2.

If the three expected proportions were fully specified in advance and no parameters were estimated from these observations, the usual category-count degrees of freedom is 3−1=2. The independently calculated right-tail probability is then exp(−2/2)=exp(−1), or 0.367879441171. If parameters were estimated or observations are dependent, the appropriate calibration can differ; the function does not inspect those assumptions.

A separate two-row by three-column independence table can have the same df=2 but a different statistic. Keep the origin of the statistic and df beside the formula, rather than assuming that every three-column range uses the same model.

Threshold and complement checks

For df=2, x≈5.991464547108 corresponds to a right-tail probability of 0.05. This is obtained independently by solving exp(−x/2)=0.05, so x=−2 ln(0.05). CHISQ.INV.RT goes in that inverse direction: probability to statistic.

Mathematically, CHISQ.DIST(x,df,TRUE) + CHISQ.DIST.RT(x,df) should be 1, subject to numerical approximation. Keep unrounded values for that check. If the left cumulative value is displayed as 1.0000, subtracting that display from 1 discards a potentially meaningful small tail. The source has a dedicated upper regularized-gamma helper, but extreme-tail accuracy has not been measured here.

Errors, degrees of freedom and legacy scope

The inherited calculation checks x>=0 and df between 1 and 10^10 after parsing df as an integer. Invalid numeric domains return the numeric-error category, conventionally #NUM!; conversions and unusable helper results can yield different error categories. The expected error in the table is a source prediction, not a captured editor output.

Use a whole-number df. Inputs such as 2.9 are truncated in the inspected source rather than defining a fractional-degree model. Do not silently round your statistical model to match that implementation; choose an appropriate supported analysis.

CHIDIST is the legacy right-tail name. It is not a legacy name for CHISQ.DIST’s density or left-tail branch. The official help continues to document it, and the inspected modern function inherits its calculation path. No claim of formal removal or deprecation follows merely from describing it as legacy.

Reproducible checks

These are mathematical expectations or identified implementation predictions, not observed application results.

Formula Expected result
=CHISQ.DIST.RT(4,2) 0.1353352832366127
=CHIDIST(4,2) 0.1353352832366127
=CHISQ.DIST.RT(0,2) 1
=CHISQ.DIST.RT(4,0) #NUM!

The legacy name CHIDIST is covered here with the modern name. CHISQ.DIST.RT inherits the CHIDIST calculation method in the inspected source. This is calculation-path evidence, not proof that metadata, serialization or every edge case is identical. Do not change a left-tail function to a legacy right-tail name merely because both contain “CHI.”

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