Which group means differ after a significant ANOVA? Run Tukey HSD from raw values, a summary table or means plus MSE and get q, HSD and every pair's interval and p.
Tukey HSD Calculator - Post Hoc Test With Tukey-Kramer
Which group means differ after a significant ANOVA? Run Tukey HSD from raw values, a summary table or means plus MSE and get q, HSD and every pair's interval and p.
Parameters
Enter data for calculations
💡 Fill in all required fields to unlock the calculate button
Tukey HSD: which group means differ after an ANOVA
A significant ANOVA says the group means are not all equal; it does not say which ones differ. The Tukey HSD test compares every pair at once and keeps the chance of even one false alarm across all pairs at your chosen α, 0.05 by default. This calculator accepts raw measurements, a summary table of sizes, means and SDs, or just the group means plus the MSE and error degrees of freedom from an ANOVA table. It returns the critical q, the HSD for equal groups, a simultaneous confidence interval, q and p for every pair, and switches to the Tukey-Kramer version when the groups are not the same size.
Four numbers from the NIST worked example
Setting it up in four choices
- Type of data - raw measurements, a summary per group (size, mean, SD), or group means with the MSE from an ANOVA table you already have.
- The groups - one per line with an optional name before a colon. Raw values separated by spaces, commas or semicolons (G1: 6.9 5.4 5.8 4.6 4.0), a summary as size, mean, SD (5, 5.34, 1.117), or size and mean only in the third mode (5, 5.34). From 2 to 10 groups.
- MSE and error df - only in the third mode: the mean square of the "Within groups" or "Error" row of the ANOVA table, and its degrees of freedom, N - k in a one-way design (1.331 and 16 in the NIST example).
- Significance level - the family-wise rate for all pairs together: 0.05, 0.01 or 0.10.
- Read the result - the number of significant pairs, the critical q and HSD, then one row per pair with the mean difference, the simultaneous interval, q, p and the verdict.
All six pairs of the NIST example
The NIST/SEMATECH e-Handbook prints the six 95% simultaneous intervals for this data set to two decimals. The calculator reproduces every one of them; a pair differs when its interval does not contain zero.
| Pair | Difference | 95% interval | p | Verdict |
|---|---|---|---|---|
| 2 vs 1 | 2.38 | 0.29 to 4.47 | 0.0228 | differ |
| 3 vs 1 | 3.22 | 1.13 to 5.31 | 0.0022 | differ |
| 1 vs 4 | -0.16 | -2.25 to 1.93 | 0.9961 | no difference |
| 2 vs 3 | -0.84 | -2.93 to 1.25 | 0.6645 | no difference |
| 2 vs 4 | 2.22 | 0.13 to 4.31 | 0.0352 | differ |
| 3 vs 4 | 3.06 | 0.97 to 5.15 | 0.0035 | differ |
Studentized range table: q at α = 0.05
Columns are the number of groups, rows the error degrees of freedom. The values match Table B.5 of the studentized range statistic; the calculator agrees with all 396 cells of that table (α 0.05 and 0.01, 2 to 10 groups) within rounding. To get the HSD for equal groups, multiply q by the square root of MSE / n.
| Error df | 2 | 3 | 4 | 5 | 6 | 10 |
|---|---|---|---|---|---|---|
| 10 | 3.15 | 3.88 | 4.33 | 4.65 | 4.91 | 5.60 |
| 20 | 2.95 | 3.58 | 3.96 | 4.23 | 4.45 | 5.01 |
| 30 | 2.89 | 3.49 | 3.85 | 4.10 | 4.30 | 4.82 |
| 60 | 2.83 | 3.40 | 3.74 | 3.98 | 4.16 | 4.65 |
| 120 | 2.80 | 3.36 | 3.68 | 3.92 | 4.10 | 4.56 |
| Infinite | 2.77 | 3.31 | 3.63 | 3.86 | 4.03 | 4.47 |
Four facts hiding in the q table
Three kinds of user, three ways in
Post hoc questions, briefly
Related tools
ANOVA Calculator
The overall F-test that usually comes first, with Welch's version and a variance check - See the calculator
Kruskal-Wallis Test Calculator
The rank-based route, with Dunn's pairwise comparisons in place of Tukey - See the calculator
Two-Sample T-Test Calculator
One planned comparison of two groups, with Welch and paired versions - See the calculator
Confidence Interval Calculator
An interval for a single mean, to set beside the simultaneous ones - See the calculator
P-Value Calculator
Turns an F, t, z or chi-square from a printout into a p-value - See the calculator
Standard Error Calculator
The standard error of each group mean, from data or a report - See the calculator
Sample Size Calculator
How many observations per group a planned comparison needs - See the calculator