Skip to content

Tukey HSD Calculator

Paste the scores for each group and get Tukey's honestly significant difference test for every pair: the mean difference, standard error, studentized range q, an adjusted p-value, and a simultaneous confidence interval. Unequal group sizes are handled with the Tukey–Kramer adjustment, group letters mark which means are alike, and the working is shown. The results match R's TukeyHSD. Free, no sign-up.

0 values

0 values

0 values

Enter at least two numbers in each of at least two groups.

How to Use the Tukey HSD Calculator

  1. 1. Enter the groups. Name each group and paste its scores, separated by commas, spaces, or new lines. Three groups are ready; add up to ten. The groups can be different sizes.
  2. 2. Choose α. It is the family-wise error rate for all the comparisons together, and it sets the confidence level of the intervals (α = .05 gives 95%).
  3. 3. Read the pairwise table. Each row gives the mean difference, its standard error, q, the Tukey-adjusted p-value, and a simultaneous confidence interval. An interval that excludes zero is a significant pair.
  4. 4. Check the letters. Groups that share a letter are not significantly different. Copy the APA lines when you are done.

What Tukey's HSD Test Does

A one-way ANOVA tells you that at least one group mean differs; it does not say which. Comparing every pair with separate t-tests inflates the chance of a false positive — with four groups there are six pairs, and if the six tests were independent the risk of at least one false alarm at α = .05 would approach 26%, not 5%. Tukey's HSD (honestly significant difference) keeps the family-wise error rate at α for all pairwise comparisons at once.

It does this by comparing each pair with the studentized range distribution, the distribution of the gap between the largest and smallest of k sample means measured in standard errors. For groups of sizes nᵢ and nⱼ and pooled variance MSW on N − k degrees of freedom, SE = √(MSW/2 × (1/nᵢ + 1/nⱼ)) and q = |x̄ᵢ − x̄ⱼ| / SE. The adjusted p-value is P(Q ≥ q) for k means, and the simultaneous interval is x̄ᵢ − x̄ⱼ ± qcrit × SE. With equal group sizes n, every pair further apart than HSD = qcrit × √(MSW/n) is significant. With unequal sizes the same formula is the Tukey–Kramer test, which is slightly conservative.

Worked Example: Plant Growth Under Four Light Conditions

Click Try an example to load the growth (cm) of 24 seedlings under four light conditions: control (M = 12.22), blue light (M = 14.56), red light (M = 13.20), and full spectrum (M = 16.58). The group sizes are 6, 7, 5, and 6, so the Tukey–Kramer form applies.

Tukey HSD, step by step

ANOVA: MSW = 7.814 / 20 = 0.391 on 20 df; F(3, 20) = 54.24, p < .001

qcrit = 3.958 for k = 4 means and 20 df at α = .05

Control vs full spectrum: SE = √(0.391 / 2 × (1/6 + 1/6)) = 0.255, q = 4.367 / 0.255 = 17.11, p < .001

Control vs red light: SE = 0.268, q = 3.67, p = .075; interval [−2.04, 0.08]

Five of the six pairs are significant. Only control versus red light is not (Mdiff = −0.98, 95% CI [−2.04, 0.08], p = .075), so those two groups share the letter c, while blue light is b and full spectrum is a. Full spectrum beat every other condition.

Tukey HSD or Another Post Hoc Test?

SituationBetter choice
All pairwise comparisons, roughly equal variancesTukey HSD (Tukey–Kramer if sizes differ)
Every group against one control onlyDunnett's test, which is more powerful for that question
Unequal variances across groupsGames–Howell, or Welch's ANOVA with Welch t-tests
A small, planned set of comparisonsBonferroni or Holm on the planned tests
Skewed data or ordinal ratingsKruskal-Wallis followed by Dunn's test

Frequently Asked Questions

When should I use Tukey's HSD?
Use it when you want to compare every pair of group means after a one-way ANOVA and the groups have roughly equal variances. It controls the family-wise error rate, so you can report all the pairwise results without a further correction. If you only care about comparisons with a control group, Dunnett's test has more power.
Do I need a significant ANOVA before running Tukey's test?
Not strictly. Tukey's procedure controls the family-wise error rate on its own and does not depend on the omnibus F test. In practice researchers run the ANOVA first, and the two almost always agree, but a significant pairwise difference after a non-significant F is possible and is not an error.
What is the difference between Tukey HSD and Tukey–Kramer?
The original HSD assumes equal group sizes. Tukey–Kramer replaces the single standard error with one for each pair, based on that pair's sample sizes, and is the version used whenever the groups differ in size. This calculator uses the Tukey–Kramer formula, which reduces to the HSD when the sizes are equal.
How do I report Tukey's HSD in APA style?
Report the ANOVA, then the comparisons: F(3, 20) = 54.24, p < .001. Post hoc Tukey HSD tests showed that full spectrum exceeded control, Mdiff = 4.37, 95% CI [3.36, 5.38], p < .001. Give each group's mean and standard deviation, and say that p-values are Tukey-adjusted.
Tukey or Bonferroni: which is better?
Tukey is built for the family of all pairwise comparisons, so its intervals are narrower and its tests more powerful than Bonferroni's, which has to guard against any set of comparisons and is therefore more conservative here. Bonferroni becomes the better tool when you test a handful of planned contrasts that are not simply all pairs.
What if the group variances are unequal?
Tukey's test assumes equal variances, and its error rate drifts when they differ — especially with unequal group sizes. Check Levene's test in the One-Way ANOVA calculator. If variances differ, Welch's ANOVA with Games–Howell comparisons is the safer route.

Related Tools

More in Statistics Calculators

See all Statistics Calculators