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)| Argument | What it means | |
|---|---|---|
array1 | Required | The first sample of numbers. |
array2 | Required | The 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?
| A | B | C | D | E | |
|---|---|---|---|---|---|
| 1 | Order | Supplier A (days) | Supplier B (days) | ||
| 2 | 1 | 5 | 3 | 0.0219 | |
| 3 | 2 | 6 | 8 | ||
| 4 | 3 | 5 | 6 | ||
| 5 | 4 | 7 | 9 | ||
| 6 | 5 | 6 | 4 | ||
| 7 | 6 | 5 | 7 | ||
| 8 | 7 | 6 | 5 |
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
| A | B | C | D | E | |
|---|---|---|---|---|---|
| 1 | Pack | Line 1 (g) | Line 2 (g) | ||
| 2 | 1 | 12.1 | 12.2 | 0.9724 | |
| 3 | 2 | 11.8 | 11.9 | ||
| 4 | 3 | 12.4 | 12.5 | ||
| 5 | 4 | 12 | 11.7 | ||
| 6 | 5 | 11.6 | 12 | ||
| 7 | 6 | 12.3 | 12.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.
Common errors and how to fix them
| Error | Why it happens | Fix |
|---|---|---|
#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.
| Language | Function name |
|---|---|
| Finnish | F.TESTI |
| Hungarian | F.PRÓB |
| Italian | TESTF |
| Portuguese (Brazil) | TESTE.F |
| Portuguese (Portugal) | TESTE.F |
| Russian | F.ТЕСТ |
| Spanish | PRUEBA.F.N |