Calculate F Statistic and p-Value
Use this tool for ANOVA/regression F-tests or for comparing two sample variances.
What is the F statistic?
The F statistic is a ratio used in hypothesis testing. It compares two sources of variability: the variability explained by a model (or differences between groups) and the unexplained variability (random error within groups). If the explained variability is much larger, the F value gets bigger.
You will often see the F statistic in:
- ANOVA (analysis of variance), to compare means across 3+ groups.
- Linear regression, to test whether the model explains a meaningful amount of variance.
- Variance comparison tests, to compare two sample variances.
Core formulas
ANOVA or regression form
F = MSbetween / MSwithin
- MSbetween: variation due to group differences (or model effects).
- MSwithin: variation due to noise/error.
Two-variance test form
F = s12 / s22
For a standard right-tail interpretation, people typically place the larger variance in the numerator so F ≥ 1. This calculator does that automatically.
How to use this calculator
Method 1: ANOVA / Regression
- Enter MSbetween and MSwithin.
- Enter numerator and denominator degrees of freedom (df1, df2).
- Click Calculate to get F and right-tail p-value.
Method 2: Two-Variance F Test
- Enter both sample variances and sample sizes.
- The tool computes df1 = nnumerator - 1 and df2 = ndenominator - 1.
- You receive F, p-value, and a quick interpretation at α = 0.05.
Worked example
Suppose an ANOVA summary gives MSbetween = 24.8 and MSwithin = 7.2 with df1 = 3 and df2 = 36. Then:
F = 24.8 / 7.2 = 3.444...
A value around 3.44 may indicate significant group differences depending on the exact degrees of freedom. The p-value calculation incorporates df1 and df2, which is why those fields matter.
How to interpret results
- Larger F generally suggests stronger evidence against the null hypothesis.
- p-value is the probability of observing an F this large (or larger) if the null is true.
- If p < 0.05, results are often called statistically significant at the 5% level.
Common mistakes to avoid
- Using standard deviation instead of variance in a two-variance F test.
- Entering incorrect degrees of freedom.
- Interpreting significance as practical importance (they are not the same).
- Ignoring assumptions (independence, normality, equal variances where required).
Final note
This calculator is great for fast checks and study use. For publication-quality analysis, also review assumptions, confidence intervals, effect sizes, and post-hoc tests where appropriate.