F.TEST and FTEST in ONLYOFFICE Spreadsheet Editor
Compare two sample variances in ONLYOFFICE with a two-sided F-test p-value, explicit sample counts and independently checked examples.
Verification status: See the evidence and test scope described in this guide. How formula examples are checked
Quick answer: for samples 2, 4, 6 and 1, 2, 3, =F.TEST(H2:H4,I2:I4) has the independent expected two-sided p-value 0.4. It does not return the variance ratio itself.
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 statistical meaning
=F.TEST(array1, array2)
=FTEST(array1, array2)
Exactly two sample ranges are required. They contain individual numeric observations, not precomputed variances or expected counts. The samples need not have the same number of observations. This is not a paired-row test: the function calculates each sample’s variance separately.
The classical reference model compares variances from independent samples of normal populations. The method is sensitive to departures from that model; a numeric p-value does not establish that the assumptions hold. NIST’s explanation of the two-variance F test distinguishes one-sided and two-sided alternatives. The ONLYOFFICE function implements a two-sided calculation, with no tails argument.
Step-by-step: compute the ratio and p-value separately
On a fresh sheet enter:
| Row | H: sample 1 | I: sample 2 |
|---|---|---|
| 2 | 2 | 1 |
| 3 | 4 | 2 |
| 4 | 6 | 3 |
In B2 enter =F.TEST(H2:H4,I2:I4). The independent expected value is 0.4. The legacy formula =FTEST(H2:H4,I2:I4) follows the same inspected calculation method.
Sample 1 has mean 4 and squared deviations 4, 0, 4, giving sample variance 8/(3−1)=4. Sample 2 has mean 2 and squared deviations 1, 0, 1, giving sample variance 2/(3−1)=1. The larger-over-smaller variance ratio is 4, with numerator and denominator degrees of freedom both 2.
For F(2,2), the right tail at 4 is 1/(1+4)=0.2. The inspected test returns twice the smaller of that tail and its complement: 2*min(0.2,0.8)=0.4. This independent arithmetic distinguishes the three quantities: variance ratio 4, one-sided upper area 0.2 and two-sided p-value 0.4.
Advanced case: unequal sample sizes and reordered degrees of freedom
Put 1, 2, 3, 4, 5 in J2:J6. This third sample has mean 3, squared deviations summing to 10 and sample variance 10/(5−1)=2.5.
Compare H2:H4 with J2:J6. The larger sample variance is 4, so the ratio is 1.6. The numerator sample has three observations and df=2; the denominator sample has five and df=4. The right tail is (1+1.6/2)^−2 = 25/81. Twice that smaller tail gives 50/81 = 0.617283950617.
The implementation orders the ratio by the larger variance and moves its associated sample df into the numerator position. It does not sort only the variances while leaving degrees of freedom attached to the original argument positions. Reversing the two input ranges should therefore preserve the mathematical two-sided result for these clean examples.
The simple first example also remains p=0.4 when its ranges are swapped. This is a useful independent symmetry check, not evidence that every import or coercion path has been tested in the native application.
What is counted, ignored and rejected
The inspected helper includes numeric cells, including numeric zeros, and skips nonnumeric entries when accumulating each sample. Official help likewise describes text, logical and empty cells as ignored. This does not make it safe to use a dirty dataset: a number stored as text may disappear from a sample without the intended numeric meaning being recovered.
Each sample must retain at least two numeric observations and have nonzero sample variance. The source returns the division-by-zero category, conventionally #DIV/0!, for too few numeric observations or an exactly zero variance. For example, put 2 in K2:K4 and compare that constant range with H2:H4; the table’s error is a source prediction for the zero-variance branch.
Ranges may have different lengths because they are independently summarized. They are not required to match cell-by-cell. Headings can remain outside the selected data ranges for clarity even though ordinary nonnumeric entries are skipped. Embedded errors, malformed array objects and file-import conversions are not comprehensively characterized by these examples.
Interpretation and numerical cautions
A p-value of 0.4 is not a 40% probability that the population variances are equal. It is a probability calculated under the null reference model for a statistic as extreme in the relevant two-sided sense. Failure to reject a chosen threshold does not prove equality, and a small p-value would not by itself quantify the practical importance of a variance difference.
The source calculates sample variance from sums and sums of squares. For very large values with tiny spread, subtracting nearly equal quantities can lose numerical precision. The small integer examples avoid that cancellation issue; they do not establish precision for every scale of data. Inspect sample counts, means and variances independently before interpreting a surprising output.
The expression is specifically 2*min(q,1−q), not an unconditional 2*q, where q is the larger-variance ratio’s right-tail probability. Retaining that minimum matters when the df are unequal. A one-sided variance question needs a deliberately chosen tail and associated df; it cannot be obtained by arbitrarily relabeling the built-in two-sided result.
Reproducible checks
These are independent mathematical expectations or identified source-error predictions, not native application results. Preserve full input precision when reproducing them.
| Formula | Expected result |
|---|---|
=F.TEST(H2:H4,I2:I4) |
0.4 |
=FTEST(H2:H4,I2:I4) |
0.4 |
=F.TEST(I2:I4,H2:H4) |
0.4 |
=F.TEST(H2:H4,J2:J6) |
0.6172839506172839 |
=F.TEST(H2:H4,H2:H4) |
1 |
=F.TEST(H2:H4,K2:K4) |
#DIV/0! |
Compatibility and related functions
The legacy name FTEST is covered in this guide. The modern name inherits FTEST’s calculation method. This source relationship does not establish identical metadata, file serialization or every imported-workbook behavior. Legacy does not by itself mean formally deprecated or removed.
Use the exact probability direction, parameter order and data meaning above when moving a workbook between products. Similar names are not a general cross-version or file-format compatibility guarantee.
AVERAGE and COUNT help audit each sample; SUM combines squared deviations for an independent variance check.
First-party references
- Official F.TEST help, checked October 18, 2026.
- Pinned SDKJS implementation, including parameter validation and numerical helpers.
- Official FTEST help.