Tukey HSD Calculator (Post-Hoc Test)

Find which pairs of groups differ after a significant ANOVA.

What Tukey’s HSD does

When a one-way ANOVA is significant, it says that some group means differ, but not which ones. Tukey’s honestly significant difference (HSD) test compares every pair of groups and adjusts the p-values so that the chance of any false positive across all the comparisons stays at 5%. With unequal group sizes it uses the Tukey–Kramer version, which this calculator applies automatically.

Worked example

Four groups of 6, 6, 6 and 7 scores give an ANOVA of F(3, 21) = 22.76, p < .001. The Tukey comparisons show which pairs differ:

Tukey pairwise comparisons for the default data
Groups Mean difference Adjusted p Significant at 0.05?
1 − 2 -7.17 < 0.0001 Yes
1 − 3 -2.00 0.3996 No
1 − 4 2.50 0.1932 No
2 − 3 5.17 0.0025 Yes
2 − 4 9.67 < 0.0001 Yes
3 − 4 4.50 0.0062 Yes

The 95% critical value of the studentized range for 4 groups and 21 degrees of freedom is q = 3.942.

How it is calculated

  • MSW is the pooled within-group variance from the ANOVA, with N − k degrees of freedom.
  • For each pair, q = |mean difference| ÷ √((MSW ÷ 2) × (1/nᵢ + 1/nⱼ)).
  • The adjusted p-value is the right tail of the studentized range distribution with k groups and N − k degrees of freedom.
  • The 95% confidence interval for a difference is the difference ± q-critical × the same standard error.

Assumptions are the same as for ANOVA: independent observations, roughly normal data and similar variances. If variances are very unequal, use the Games-Howell test. For data that is not normal, use Kruskal-Wallis with Dunn’s test.

How to cite this page

CalcPulse. (2026). Tukey HSD Calculator. https://calcpulse.com/tukey-hsd-calculator/

Frequently asked questions

What is Tukey's HSD test?

A post-hoc test that compares all pairs of group means after an ANOVA, while controlling the overall error rate.

When should I use a post-hoc test?

After a significant ANOVA, to see which groups differ. If the ANOVA is not significant, you usually stop there.

What is the Tukey-Kramer test?

The version of Tukey's test for groups of unequal size. This calculator uses it automatically.

What is the studentized range?

A distribution that describes the largest difference between group means, in standard error units. It is used to get the adjusted p-values.

What if the group variances differ?

Use the Games-Howell test, which does not assume equal variances.

Last updated