F-Test Calculator

Two-sample F-test for equal variances — from raw data or summary stats. Exact p-value from the F-distribution, critical value, shaded F-curve diagram and a plain-language verdict.

Sample 1
Sample 2

The F-test explained, step by step

The two-sample F-test compares two variances by taking their ratio and checking it against the F-distribution. Each card below covers one piece the calculator uses to reach its verdict.

1. The variance ratio — larger over smaller

The two-sample F-test asks whether two populations have the same variance. Divide the larger sample variance by the smaller one so F ≥ 1 and you only need upper-tail tables. The further F sits from 1, the stronger the evidence against equal variances.

F = s²larger / s²smaller
sample variance = Σ(xᵢ − x̄)² / (n − 1)
Example
Given
sA² = 10
sB² = 2.5
Substitute
F = 10 / 2.5
Answer
F = 4.0

2. Degrees of freedom — one per sample

Each sample contributes df = n − 1. The numerator df goes with the sample whose variance sits on top; the denominator df with the sample on the bottom. F(dfₙ, dfd) and F(dfd, dfₙ) are different distributions, so keep the order straight.

dfnum = nlarger − 1   dfden = nsmaller − 1
Example
Given
nA = 5
nB = 5
Substitute
df = (5 − 1, 5 − 1)
Answer
df = (4, 4)

3. One-tailed vs two-tailed — α or α/2

Two-tailed H₁: σ₁² ≠ σ₂² uses the α/2 upper critical value because the smaller-over-larger tail is already folded in by the larger-on-top convention. One-tailed H₁: σ₁² > σ₂² uses α directly. Using α for a two-tailed test doubles your false-positive rate.

reject if F ≥ Fα/2(dfnum
dfden)
Example
Given
α = 0.05 two-tailed
df = (4, 4)
Substitute
F ≥ F₀.₀₂₅(4, 4)
Answer
cutoff ≈ 9.605

4. When the F-test breaks — normality matters

Unlike the two-sample t-test, the variance F-test is very sensitive to non-normality (heavy tails, skew). If the raw data isn't roughly normal, use Levene's or Brown–Forsythe. Also don't confuse this with the ANOVA F-test — same distribution, different hypothesis.

use Levene's / Brown–Forsythe if not normal
normal samples → F-test OK
heavy tails / skew → Levene's
comparing 3+ means → ANOVA
Example
Given
skewed samples
n = 8 each
Substitute
F unreliable
Answer
switch to Levene's

Features of this calculator

  • Raw-data or summary-stats input modes on the same page.
  • Automatically puts the larger sample variance on top so F ≥ 1 and the test never depends on which sample you enter first.
  • Exact p-values from the F cumulative distribution — no table interpolation.
  • One-tailed and two-tailed decision rules with the matching critical value at your chosen α.
  • F-distribution diagram with the shaded rejection tail(s) and the observed F marked on the axis.
  • Show / hide step-by-step working covering the variances, the ratio and the p-value lookup.
+What are the assumptions of the two-sample F-test?
Independent random samples from each population and approximately normal populations. The normality assumption is important — the F-test is sensitive to violations, unlike the two-sample t-test which is fairly robust.
+Does swapping which sample is 'first' change my p-value?
No. This calculator automatically puts the larger sample variance in the numerator (the standard convention), so which sample you enter as 'Sample 1' vs 'Sample 2' has no effect on the reported F, p-value or decision.
+When should I use a one-tailed F-test?
Only when you have a directional hypothesis specified before collecting data — for example, testing that a new manufacturing process reduces variance. For general 'are these variances equal?' questions, use two-tailed.
+What if my sample sizes are very different?
The F-test still applies (the degrees of freedom differ), but its sensitivity to non-normality gets worse with unequal sample sizes. If in doubt, use Levene's test, which is more robust.
+How is this different from an ANOVA F-test?
The two-sample F-test compares two variances directly. The ANOVA F-test compares means across three or more groups by taking the ratio of between-group to within-group variance. Same distribution, different question — use the ANOVA calculator for the latter.
+Can I use raw data or just summary stats?
Both. Switch the 'Input mode' selector to 'Summary stats' and enter each sample's variance (s²) and sample size (n) directly — useful when you're working from a published table.