F.TEST in Excel: Compare Sample Variances With a Two-Tailed Test
Use Excel F.TEST with numeric sample ranges, verify sample variances and two-tail arithmetic, and preserve ignored-cell and zero-value distinctions.
Verification status: See the evidence and test scope described in this guide. How formula examples are checked
Quick answer: with 2,4,6,8,10 in A2:A6 and 10,11,12,13,14 in B2:B6, =F.TEST(A2:A6,B2:B6) has independent two-sided probability 0.208.
Syntax and what is returned
=F.TEST(array1, array2)
Both arguments are required sample arrays or ranges. The function returns a two-tailed probability for a variance comparison. It does not return the variance ratio itself, an estimated difference in means or a probability that the variances are equal.
Microsoft’s introductory wording says “the probability that the variances … are not significantly different.” Read that as its description of a test output, not as a posterior probability for the truth of an equal-variance hypothesis.
An F-based variance comparison requires justified assumptions, including an appropriate sampling model. This guide demonstrates fictional arithmetic; it does not assess whether a real dataset satisfies those assumptions.
Example 1: enter two complete numeric samples
Put 2,4,6,8,10 in A2:A6 and 10,11,12,13,14 in B2:B6. Use =F.TEST(A2:A6,B2:B6) in E2.
Independent sample means are 6 and 12. Sample variances, using the n−1 denominator, are 10 and 2.5. Their ratio in first-over-second order is 4.
Each sample has five observations, so the numerator and denominator degree counts are both 4. The independent two-tailed result is 0.208. The different sample means are not what F.TEST is testing; the calculation concerns variation around each sample’s own mean.
Example 2: reconstruct the variance ratio
In C2 enter =(A2-AVERAGE($A$2:$A$6))^2 and fill down. Independent squared deviations are 16,4,0,4,16, totaling 40. Divide by four to obtain sample variance ten.
For the second sample, the squared deviations are 4,1,0,1,4, totaling ten. Dividing by four gives variance 2.5. Using population denominators would be a different variance calculation, even though equal sample sizes happen to cancel that common factor in this particular ratio.
Keep the two sample sizes visible when extending the worksheet to unequal-length samples. Each variance denominator and degree count belongs to its own sample.
Advanced application: audit the two-tail probability
For ratio four with degrees four and four, =F.DIST.RT(4,4,4) independently gives 0.104. The corresponding left-tail value is 0.896.
The standard two-sided calculation doubles the smaller tail: =2*MIN(F.DIST(4,4,4,TRUE),F.DIST.RT(4,4,4)), independently 0.208.
A right-tail probability alone is not the F.TEST output. Nor should the larger tail be doubled. Keep the ratio orientation and its numerator/denominator degrees aligned when reconstructing the calculation.
Advanced application: swap samples and shift measurements
Swapping the two samples changes the variance ratio to 0.25 and exchanges the degree counts. The two-tailed probability remains 0.208 mathematically because the left and right regions transform under the reciprocal ratio.
Adding the same constant to every observation within a sample does not change that sample’s variance. Thus a shifted sample can have a different mean while preserving this variance-test result.
Multiplying every observation in both samples by the same nonzero scale factor also leaves the variance ratio unchanged, because both variances scale by its square. These are useful consistency checks, not evidence that the statistical assumptions hold.
Reproduce the complete Microsoft example
The dedicated source uses first sample 6,7,9,15,21 and second sample 20,28,31,38,40. Their independent sample variances are 39.8 and 64.8.
The first-over-second ratio is 0.6141975309, with four degrees for each sample. The independent two-sided probability is 0.6483178468, matching the source’s displayed 0.64831785.
This example has a ratio below one and reinforces why the smaller tail must be selected rather than mechanically doubling the upper tail for every orientation.
Errors, ignored values and troubleshooting
Microsoft says text, logical values and empty cells in arrays/references are ignored, while numeric zeros are included. A missing observation and a zero measurement therefore produce different sample sizes and variances.
The reference documents #DIV/0! when either sample has fewer than two numeric observations or either variance is zero. A constant sample is not repaired by replacing that error with a probability of zero.
These examples use complete numeric ranges. Native handling of every error-cell or imported type was not executed. A p-value is not an effect-size measure or proof about equal variances; retain sample spreads, sizes and the model assumptions beside the probability.
Availability and version history
- Current documentation: the dedicated Microsoft reference lists Excel for Microsoft 365, Excel for Microsoft 365 for Mac, Excel 2024, Excel 2024 for Mac, Excel 2021, Excel 2021 for Mac, Excel 2019, Excel 2016.
- Introduced: Microsoft’s alphabetical catalog marks F.TEST as introduced in Excel 2010. Exact first build and platform-specific introduction dates remain unverified.
- Last functioning version: unknown; a current help listing is not a last-working-build test.
- Evidence checked: October 15, 2026. Official documentation was freshly retrieved; examples were independently calculated. No native Excel, Mac or web-client execution was performed.
References and verification
- Microsoft F.TEST reference.
- Microsoft function catalog and introduction-marker explanation.
- Editorial testing standards.
Examples use English function names and comma separators. Expected numbers are rounded independent mathematical calculations; documented error expectations are labeled as such. They are not captured Excel output. All illustrative data and policies are fictional.