Statistical function

F.TEST function

Tests whether two samples have different variances and returns the two-tailed p-value, e.g. whether one supplier is less consistent.

Available in Excel 2010 and later, Microsoft 365, Excel for the web, Excel for Mac 2011 and later

Excel 2010 and laterWorks in Google Sheets

Syntax

F.TEST(array1, array2)
ArgumentWhat it means
array1RequiredThe first sample of numbers.
array2RequiredThe second sample. It can have a different number of values.

Returns: A two-tailed p-value between 0 and 1.

How F.TEST works

F.TEST compares the spread of two groups, not their averages. Two suppliers may both deliver in 6 days on average, but if one sometimes takes 3 days and sometimes 9, it is harder to plan around. F.TEST asks whether a difference in variability that large could easily happen by chance, and returns a p-value.

It divides one sample variance by the other and looks up how extreme that ratio is in the F distribution, counting both tails (one group more variable, or the other). A small p-value, typically below 0.05, means the variances really differ. A large one means the data are consistent with equal variability.

The test assumes each sample is roughly normally distributed, and it is sensitive to outliers. It is often run before a T.TEST to decide between the equal-variance (type 2) and unequal-variance (type 3) versions. It replaced the older FTEST.

Examples

1Is supplier B less consistent?

E2fx=F.TEST(B2:B8, C2:C8)
ABCDE
1OrderSupplier A (days)Supplier B (days)
21530.0219
3268
4356
5479
6564
7657
8765

Result: 0.0219

Supplier A averages 5.7 days and supplier B 6.0, similar figures, but the variances are 0.57 and 4.67. The p-value of 0.0219 (formatted to 4 decimal places) is below 0.05, so supplier B's delivery times are genuinely more variable.

2Two filling lines with similar spread

E2fx=F.TEST(B2:B7, C2:C7)
ABCDE
1PackLine 1 (g)Line 2 (g)
2112.112.20.9724
3211.811.9
4312.412.5
541211.7
6511.612
7612.312.4

Result: 0.9724

The p-value is 0.9724, far above 0.05. There is no evidence that one line is more variable than the other, so an equal-variance t-test would be reasonable for comparing their averages.

⬇Practice workbookExamples with live formulas + practice sheets · .xlsx · 14 KB

Common errors and how to fix them

ErrorWhy it happensFix
#DIV/0!A sample has fewer than two values, or its variance is zero.Each sample needs at least two different numbers.

Tips

  • F.TEST returns only the p-value. For the F ratio itself use =VAR.S(C2:C8)/VAR.S(B2:B8).
  • The Analysis ToolPak's "F-Test Two-Sample for Variances" gives a one-tailed p-value, which is half of F.TEST's result.

Google Sheets

F.TEST also exists in Google Sheets and works the same way for everyday use, so the examples above work there too.

F.TEST in other languages

In a non-English version of Excel the function has a local name. Excel translates formulas automatically when a file is opened in another language.

LanguageFunction name
FinnishF.TESTI
HungarianF.PRÓB
ItalianTESTF
Portuguese (Brazil)TESTE.F
Portuguese (Portugal)TESTE.F
RussianF.ТЕСТ
SpanishPRUEBA.F.N