F Statistic Calculator
An F statistic is a ratio of two variances, and this calculator runs the test that ratio belongs to. Paste two samples, enter two variances directly, or switch to one-way ANOVA for three or more groups, and you get the F statistic, degrees of freedom, an exact critical value, the p-value and the test conclusion, with every step shown. The variance test here is genuinely two-sided: the p-value and the critical value are both computed for a two-sided test at the alpha you choose.
Quick Answer
For the pre-filled samples (10, 12, 14, 16, 18 against 11, 12, 13, 14, 15), the sample variances are 10 and 2.5, so F = 4 on 4 and 4 degrees of freedom. The two-sided critical value at alpha 0.05 is 9.60453 and the two-sided p-value is 0.208, so you fail to reject the null hypothesis: these samples do not show a significant difference in spread.
Key takeaways
- F is a ratio of variances. Close to 1 means similar spread; far above 1 means one sample is much more spread out.
- The variance test here is two-sided, so the p-value is doubled from the upper tail and the critical value uses alpha/2. A calculator that skips that step overstates significance.
- ANOVA uses the same F distribution differently: an upper-tail ratio of between-group to within-group variance, testing group means rather than two variances.
- The F test for variances is fragile when data is not roughly normal. Check the assumptions before you trust a borderline result.
- Quick Answer
- How to use the F statistic calculator
- The two F formulas this calculator uses
- Worked example: two samples, tested step by step
- Checked runs: variances mode and ANOVA
- A correction in this version: the two-sided p-value
- Reading the result: F, the p-value and statistical significance
- One-way ANOVA mode: comparing group means
- Assumptions, and when to use a different test
- What competing calculators miss
How to use the F statistic calculator
Pick a mode, enter your data, then click Calculate. The results stay hidden until you do, and every result shows its working.
- Paste two samples: enter raw data as comma-separated numbers in each box. The tool computes each mean and sample variance for you, dividing by n minus 1.
- Enter variances directly: use this when a textbook, paper or spreadsheet has already given you s1 squared, s2 squared, n1 and n2.
- One-way ANOVA: one group per line, values comma-separated, when your question is about the means of two or more groups rather than the spread of two samples.
- Set alpha: 0.05 unless your field or your analysis plan says otherwise, and read the conclusion against that same alpha.
The two F formulas this calculator uses
The variance test divides the larger sample variance by the smaller one. ANOVA divides the between-group mean square by the within-group mean square. Same distribution, different question.
ANOVA: F = MSB ÷ MSW, where MSB = SSB ÷ (k − 1) and MSW = SSW ÷ (N − k)
Because the larger variance is always the numerator in the variance test, F is at least 1 by construction. That construction is also why the test needs care with its tail probabilities: a difference in either direction counts against the null hypothesis of equal variances, so the test is two-sided even though only the upper tail is ever looked up. Standard references on the F-test for comparing two population variances set the test up exactly this way, and the correction section below shows how this calculator handles the two tails.
Worked example: two samples, tested step by step
Two short samples: the first is a little more spread out than the second, and the question is whether that gap in spread is significant at alpha 0.05.
The variance arithmetic is easy to check by hand. Sample 1 deviates from its mean of 14 by −4, −2, 0, 2 and 4; the squared deviations sum to 40, and 40 ÷ 4 = 10. Sample 2 deviates from 13 by −2, −1, 0, 1 and 2; the squares sum to 10, and 10 ÷ 4 = 2.5. A variance ratio of 4 sounds large, and with bigger samples it would be significant. With only five observations per sample the F distribution on 4 and 4 degrees of freedom is wide, so a ratio of 4 sits well inside it. That is the honest lesson of this example: the F test needs data before it can call a spread difference real.
Checked runs: variances mode and ANOVA
Each row below is a real run of this calculator. Type any of them in and you will get the same figures back, including the two corrected rows explained in the next section.
| Run | F | Critical value | P-value | Verdict |
|---|---|---|---|---|
| Samples above, alpha 0.05 (df 4, 4) | 4 | 9.60453 | 0.208 | Not significant |
| Variances 25 (n 15) vs 10 (n 12), alpha 0.05 (df 14, 11) | 2.5 | 3.35881 | 0.133309 | Not significant |
| Variances 10 (n 10) vs 10 (n 10), alpha 0.05 (df 9, 9) | 1 | 4.025994 | 1 | Not significant |
| Variances 100 (n 20) vs 10 (n 20), alpha 0.01 (df 19, 19) | 10 | 3.43175 | 0.000006 | Significant |
| ANOVA groups below, alpha 0.05 (df 2, 15, upper tail) | 9.264706 | 3.68232 | 0.002399 | Significant |
A correction in this version: the two-sided p-value
The earlier version of this tool called itself a two-sided test but computed a one-sided p-value and a one-sided critical value. That combination overstates significance, and it is fixed here.
The numbers show the size of the problem. For variances of 25 (n = 15) and 10 (n = 12), F is 2.5. The old code reported a critical value of 2.738648 and a p-value of 0.066654: those are the upper-tail figures at alpha, checked against a statistical library and numerically correct as far as they go. But a two-sided test at alpha 0.05 splits alpha across both tails, so the correct critical value is the 0.975 quantile, 3.35881, and the correct two-sided p-value is double the upper tail, 0.133309. The worked conclusion for that example happens to be the same either way (fail to reject), yet on data sitting between the two critical values the old version would have declared a significant difference the two-sided test does not support. The NIST/SEMATECH e-Handbook’s F-test for equality of two variances is explicit about the two-sided framing behind both steps: double the upper-tail probability, and halve alpha for the critical value. This calculator now does both, in the samples and variances modes. ANOVA is not changed: an ANOVA F test is an upper-tail test by definition, so its p-value and critical value were already correct.
A second, smaller fix: a sample where every value is identical has a variance of zero. The samples mode used to divide by that zero and display F = NaN or F = Infinity with a p-value of NaN. It now reports the same message the variances mode has always used: variances must be positive.
Reading the result: F, the p-value and statistical significance
Read the three outputs together. F tells you the size of the ratio, the p-value tells you how surprising that ratio is under the null hypothesis, and the verdict applies your alpha to the p-value.
A p-value is not the probability that the null hypothesis is true, and a non-significant result is not proof the variances are equal: it is a statement that this much data cannot tell them apart. That distinction is the core of statistical significance testing generally, and it cuts both ways: with very large samples, a trivially small spread difference can come out significant. Report the ratio itself alongside the p-value so readers can judge the size of the effect, and where a range matters more than a yes-or-no verdict, pair the test with a confidence interval for the quantity you care about.
One-way ANOVA mode: comparing group means
Switch the mode menu to one-way ANOVA when the question changes from spread to averages. The tool builds the full ANOVA table: sums of squares, degrees of freedom, mean squares, F and the p-value.
The pre-filled groups are the checked example. Group means are 5, 9 and 10, and the grand mean is 8. SSB = 6×(5−8)² + 6×(9−8)² + 6×(10−8)² = 84; SSW = 16 + 24 + 28 = 68. With df 2 and 15, MSB = 42 and MSW = 4.533333, so F = 9.264706 with p = 0.002399. The critical value at alpha 0.05 is 3.68232, so the tool rejects the null: at least one group mean differs. It does not tell you which groups differ: that is a post-hoc question (Tukey, Bonferroni and similar follow-ups), and running many pairwise tests without a correction inflates false positives, which is exactly what the false discovery rate calculator is for. The NIST/SEMATECH e-Handbook walks through the same ANOVA table structure in its ANOVA table and tests of hypotheses about means section, including how the F ratio is formed from the table’s mean squares.
Use the F test for variances when
Your question is about spread or consistency: two machines, two labs, two batches. One ratio, two samples, null hypothesis of equal variances.
Use ANOVA when
Your question is about averages across two or more groups: three dosages, four teaching methods. The F ratio then compares variation between group means against variation inside the groups.
Assumptions, and when to use a different test
The F test for equal variances assumes independent samples drawn from approximately normal populations, and it is unusually sensitive to the normality half of that bargain. Heavy tails or strong skew can push the p-value around in either direction.
Practical checks before you rely on a borderline result: look at each sample’s shape (a histogram or a simple plot of the values), watch for outliers, which inflate variance fast, and remember that equal sample sizes make the test a little more forgiving. If the data is clearly not normal, Levene’s test or the Brown-Forsythe variant is the standard alternative for comparing spread, because both test deviations from a centre rather than raw variances. The same normality caution applies inside ANOVA, whose F test also assumes roughly normal groups with similar variances. A related preliminary use: before a pooled two-sample t test, this page’s variance test checks the equal-variance assumption that the pooled test and its critical t score rest on; if the variances differ significantly, the Welch version of the t test is the safer route.
What competing calculators miss
Most F tools online do less than this page, and a few do the tail arithmetic loosely:
- Ratio-only tools (BraveCalculator’s F Statistic Calculator): the same 25 vs 10 example, returning F = 2.5 and stopping there. No degrees-of-freedom decision, no critical value, no p-value, so the reader still does not know whether the difference is significant.
- ANOVA-only tools (Softonic, MetricGate, MiniWebTool, Pearson): solid ANOVA tables, some with effect sizes, Tukey follow-ups and charts this page does not offer. But they do not run the two-sample variance test at all, which is the other half of what “F statistic” searches are asking for.
- Coarse critical-value tables: several pages still print a small table rounded to a handful of degrees of freedom. This tool computes the critical value from the F distribution for your exact df pair, which matters on borderline data.
- The tail mistake: the quietest gap is the one this page just fixed in itself. Any variance-test calculator that reports an undoubled upper-tail probability while calling the test two-sided will call results significant too early. Check the p-value against the critical value: in a consistent two-sided test at alpha 0.05, the critical value is the 0.975 quantile.
Frequently asked questions
Placing the larger variance in the numerator keeps F at or above 1, which lets the test use the upper tail of the F distribution. The degrees of freedom follow the variances: df1 belongs to the sample with the larger variance, and df2 to the other sample.
It is the two-sided probability of seeing a variance ratio at least this far from 1 if the two population variances were truly equal. The tool doubles the upper-tail probability to get it. A two-sided p-value below your alpha means the observed difference in spread is unlikely to be chance alone.
Because the variance test is two-sided: a difference in either direction counts against the null hypothesis, so alpha is split between the two tails. With the larger variance forced on top, the test compares F against the upper alpha/2 point. At alpha 0.05 that is the 0.975 quantile, not the 0.95 quantile a one-sided test would use.
A t test compares means; an F test compares variances. In practice the F test is often a preliminary check: many two-sample t tests assume equal variances, and the F test (or Levene’s test) checks that assumption before you rely on the pooled version.
Both use the F distribution, but they test different things. The two-sample F test compares two variances directly. ANOVA uses an F ratio of between-group to within-group variance to test whether two or more group means differ, and it is an upper-tail test.
Both samples must be independent and drawn from approximately normal populations. The F test for variances is unusually sensitive to non-normality, so for heavy-tailed data Levene’s test or the Brown-Forsythe test is usually the safer check.
That sample has a variance of zero, so no F ratio can be formed: dividing by zero gives an infinite or undefined result. The calculator reports that the variances must be positive instead of showing a number. A constant sample usually means a data entry problem or a measurement scale that is too coarse.
SSB (sum of squares between) measures how far the group means sit from the grand mean; large SSB means the groups differ. SSW (sum of squares within) measures scatter inside each group; it is the noise floor. F = (SSB/df) / (SSW/df): signal over noise.
Add This Calculator to Your Website
Embed this calculator on your own site with the code below. Pick a size to preview it live, then copy the code.
Powered by Calculator Zilo
References
- Kiernan, D. Natural Resources Biometrics, Statistics LibreTexts. F-Test for Comparing Two Population Variances. Accessed October 21, 2026.
- NIST/SEMATECH e-Handbook of Statistical Methods. F-Test for Equality of Two Variances. Accessed October 21, 2026.
- OpenStax. Introductory Statistics, Statistics LibreTexts. Test of Two Variances. Accessed October 21, 2026.
- MedCalc Software. Comparison of standard deviations (F-test). Accessed October 21, 2026.
- NIST/SEMATECH e-Handbook of Statistical Methods. The ANOVA Table and Tests of Hypotheses About Means. Accessed October 21, 2026.
- NIST/SEMATECH e-Handbook of Statistical Methods. Are the Means Equal? The One-Way ANOVA F Test. Accessed October 21, 2026.
- Harvey, D. Chemometrics Using R, Chemistry LibreTexts. Using R for Significance Testing and Analysis of Variance. Accessed October 21, 2026.
