Skip to main content
v2026.11,986 entries · CC-BY 4.0

Tukey HSD Test: When to Use It and How to Report It

Tukey’s HSD is the post hoc test for all pairwise ANOVA comparisons under equal variance — how it differs from Games-Howell and Bonferroni, a worked post-hoc table, and the correct APA reporting line.

Written and maintained by CASRAI Editorial Board

Published · Last updated

On this page

Tukey’s HSD (honestly significant difference) test is the standard post hoc procedure for testing every possible pair of group means against each other after a significant one-way ANOVA — and it is built specifically for that all-pairwise case, not for a smaller set of planned comparisons or for groups with unequal variances. Reach for a different post hoc test the moment either of those two conditions doesn’t hold: Bonferroni (or Scheffé) when you’re testing a small, pre-specified subset of comparisons rather than all pairs, and Games-Howell when Levene’s test flags unequal variances across groups. This guide covers what Tukey HSD actually controls, the assumptions that make it valid, how it compares to the alternatives researchers reach for instead, a worked post-hoc table, and the exact line to write in a Results section.

What Tukey’s HSD test actually does

A significant omnibus one-way ANOVA tells you that at least one group mean differs from the others somewhere among the groups — it does not tell you which specific pairs differ. Tukey’s HSD, due to John Tukey, answers that follow-up question by testing every pairwise combination of group means at once, using the studentized range distribution (denoted q) rather than the ordinary t-distribution a single pairwise test would use.

That choice of distribution is the whole point of the test: the studentized range distribution accounts for the fact that, with k groups, you are implicitly evaluating k(k−1)/2 pairwise differences drawn from the same set of sample means, and the largest of those differences is expected to look bigger than any single planned comparison purely by chance. Tukey HSD sets its critical value so that the family-wise error rate — the probability of at least one false-positive pairwise conclusion across the entire set of comparisons — stays at the nominal alpha (typically .05), rather than inflating with every additional pair tested.

For exactly this job — testing all pairwise comparisons among group means, with no comparisons pre-specified in advance — Tukey HSD is more powerful than a Bonferroni correction: it holds the family-wise error rate at alpha while giving up less power, because Bonferroni’s correction isn’t built around the specific structure of an all-pairs comparison set.

The assumptions Tukey HSD depends on

Tukey HSD inherits the assumptions of the ANOVA it follows, plus one that specifically determines whether Tukey is even the right post hoc test to reach for:

  • Homogeneity of variance across groups. This is the assumption that decides whether Tukey HSD is appropriate at all. Tukey’s original test assumes the groups being compared have equal (or approximately equal) population variances, commonly checked with Levene’s test before running the post hoc comparisons. When Levene’s test is significant, the standard Tukey HSD test is the wrong tool — see the Games-Howell section below.
  • Independence of observations. Each observation is independent of every other observation, both within and across groups — the same requirement the underlying ANOVA depends on.
  • Approximately normal residuals within each group, particularly important at smaller sample sizes.
  • Equal (or reasonably close) group sizes. The original Tukey HSD formula was derived for equal n per group. With unequal group sizes the Tukey-Kramer extension (Kramer, 1956) is used: it is the same method with a standard error computed for each pair from the two group sizes involved. SciPy’s tukey_hsd documentation states that it performs Tukey’s test for equal sample sizes and the Tukey-Kramer test for unequal sizes, and NIST notes that with unequal sizes the simultaneous confidence level is at least 1 − alpha, so the procedure becomes conservative rather than anti-conservative. R’s TukeyHSD() documentation says its intervals are exact only for balanced designs and are adjusted for sample size in mildly unbalanced ones.

Tukey HSD is also only valid as a follow-up to a factor with three or more levels tested in a genuine one-way (or the relevant single factor within a factorial) ANOVA — running it after only two groups is unnecessary, since a two-group comparison is already a single pairwise test with no multiplicity problem to correct for.

The formula and critical value

NIST’s e-Handbook gives Tukey’s confidence interval for the difference between the means of groups i and j as

ȳi − ȳj ± (1/√2) · q(α; r, N − r) · σ̂ · √(2/n)

where ȳi and ȳj are the two sample means, r is the number of groups, N is the total number of observations (so N − r is the error degrees of freedom), σ̂ is the pooled standard deviation estimate from the ANOVA, n is the per-group sample size, and q is the upper-α point of the studentized range distribution. The studentized range is the range of r independent normal values divided by an independent estimate of their standard deviation, where that estimate’s squared value is a chi-square variable divided by its degrees of freedom (R documentation for ptukey/qtukey). As a lookup example, NIST gives q(.05; 5, 10) = 4.65.

A pair differs significantly when its confidence interval excludes zero, which is equivalent to the absolute mean difference exceeding the HSD, the “honestly significant difference”, built from that critical value. With equal group sizes the simultaneous coverage is exactly 1 − α; with unequal sizes, the Tukey-Kramer form uses a separate standard error per pair and NIST notes the coverage is at least 1 − α.

Critical values: how much stricter than a plain t-test

The data table below this guide lists the Tukey critical q for 3 to 6 groups and 10 to 120 error degrees of freedom, with the equivalent threshold on the t scale (q/√2) set next to the unadjusted t critical value and the Bonferroni-adjusted t critical value for all k(k − 1)/2 pairs. Values were computed from the studentized range and t distributions with SciPy 1.18.1, and the q(5, 10) = 4.654 entry agrees with NIST’s tabulated 4.65.

Reading the table: with four groups and 20 error degrees of freedom, Tukey requires a difference of 2.799 standard errors, compared with 2.086 for an unadjusted two-sided test and 2.927 for Bonferroni across the 6 pairs. The Tukey threshold sits below the Bonferroni threshold in every row, and the gap widens as groups are added: with six groups and 10 degrees of freedom Tukey needs 3.473 against Bonferroni’s 3.827. That is the practical meaning of “more powerful than Bonferroni for all pairs”. Both rise with the number of groups, because more comparisons mean more chances for a false positive.

Tukey HSD vs. the alternatives

The post hoc test that belongs in a given analysis is determined by two design questions: how many of the possible pairwise comparisons are actually being tested, and whether the equal-variance assumption holds. Tukey HSD is the right default only when the answer to the first question is “all of them” and the second is “yes.”

Test Use it when Variance assumption Comparison set
Tukey HSD (Tukey-Kramer) Comparing every possible pair of group means; more powerful than Bonferroni for exactly this job Assumes equal variances (check with Levene’s test first) All pairwise comparisons
Games-Howell Levene’s test is significant — variances differ meaningfully across groups Does not assume equal variances; uses a Welch-type adjusted degrees of freedom per pair All pairwise comparisons
Bonferroni A small number of comparisons decided before seeing the data, not necessarily every pair No variance-homogeneity assumption built into the correction itself Any pre-specified subset — becomes very conservative as the number of comparisons grows
Scheffé’s method Testing complex contrasts beyond simple pairs (e.g., the average of two groups vs. a third) Assumes equal variances Any linear contrast, including but not limited to pairwise — the most conservative of this group for pairwise-only comparisons
Dunnett’s test Comparing several treatment groups back to a single shared control, not to each other Assumes equal variances Each treatment vs. control only, not all pairs

The practical decision rule: run Levene’s test first. If it’s not significant, and every pairwise comparison genuinely matters (not just comparisons back to a control group), Tukey HSD is the standard choice. If Levene’s test is significant, move to Games-Howell — it is built for exactly this situation and remains an all-pairwise test, so it doesn’t force you to also narrow which comparisons you’re allowed to make. Reach for Bonferroni instead when the actual research question only calls for a handful of specific, pre-specified comparisons — applying Bonferroni’s correction across all pairs when you only need three planned comparisons pays an unnecessary power cost for protection you don’t need. Reserve Dunnett’s test specifically for the many-treatments-vs-one-control design, where it is both more powerful and more directly aligned to the actual research question than treating the control as just another group in an all-pairs Tukey comparison.

Tukey’s b and the unequal-variance options in SPSS

IBM’s documentation for the SPSS One-Way ANOVA Post Hoc dialog lists, among tests that assume equal variances, LSD, Bonferroni, Sidak, Scheffé, Tukey, Tukey’s b, S-N-K, Duncan, Hochberg’s GT2, Gabriel, Dunnett, R-E-G-W F and Q, and Waller-Duncan. It describes Tukey as using the studentized range with an experimentwise error rate for all pairwise comparisons. Tukey’s b is a different test: its critical value is an average of the Tukey HSD and Student-Newman-Keuls values, so it is less strict than Tukey HSD. When equal variances are not assumed, SPSS offers Tamhane’s T2 (described as conservative), Dunnett’s T3, Games-Howell (described as sometimes liberal) and Dunnett’s C.

A worked example

The following is a hypothetical illustrative worked example, not data from a real study, included to show what a Tukey HSD post hoc table looks like once it’s populated. Suppose a one-way ANOVA on four training methods (A, B, C, D) applied to a continuous performance score returns a significant omnibus result, F(3, 76) = 5.91, p = .001, with Levene’s test non-significant (p = .41), so the equal-variance assumption holds and Tukey HSD is the appropriate post hoc test.

Comparison Mean difference Std. error Adjusted p (Tukey) 95% CI
A vs. B 4.20 1.55 .041 [0.15, 8.25]
A vs. C 6.80 1.55 <.001 [2.75, 10.85]
A vs. D 1.10 1.55 .892 [−2.95, 5.15]
B vs. C 2.60 1.55 .343 [−1.45, 6.65]
B vs. D −3.10 1.55 .199 [−7.15, 0.95]
C vs. D −5.70 1.55 .003 [−9.75, −1.65]

Reading this table the way a Results section would: the omnibus test says at least one pair differs; the post hoc table shows exactly which ones — A significantly outperforms both B and C, C significantly underperforms D, and the remaining three pairs (A vs. D, B vs. C, B vs. D) show no significant difference once the Tukey adjustment is applied. Notice that the adjusted p-values are the ones that matter here, not an unadjusted pairwise t-test p-value — software that reports both will label the Tukey-adjusted column distinctly (SPSS’s Multiple Comparisons table and R’s TukeyHSD() output (the p adj column) both report it this way).

How to report Tukey HSD results

A complete Results section reports the omnibus ANOVA first, then the post hoc comparisons — and for each significant pairwise difference, the mean difference, the adjusted p-value, and (widely recommended in reporting guidance) a confidence interval for the difference, not the adjusted p-value alone. Using the worked example above, the standard APA-style line reads:

“A one-way ANOVA revealed a significant effect of training method on performance score, F(3, 76) = 5.91, p = .001. Tukey’s HSD post hoc comparisons indicated that Group A scored significantly higher than Group C (Mdiff = 6.80, 95% CI [2.75, 10.85], p < .001) and Group B (Mdiff = 4.20, 95% CI [0.15, 8.25], p = .041), and that Group D scored significantly higher than Group C (Mdiff = 5.70, 95% CI [1.65, 9.75], p = .003). No other pairwise comparisons reached significance (all p > .19).”

Three details that reviewers most often flag when this is done incorrectly:

  • Report which correction was used, by name. “Post hoc tests showed Group A differed from Group C” without naming Tukey HSD (or whichever correction was actually applied) leaves the reader unable to judge whether family-wise error was controlled appropriately for the comparison set actually being made.
  • Report the adjusted p-value, not the raw pairwise p-value. Some software prints both in the same output table; submitting the unadjusted figure defeats the purpose of running a correction at all.
  • State the non-significant comparisons too, at least in summary (“all other comparisons p > .19”), rather than reporting only the significant pairs and leaving the rest for the reader to infer from a table that may not even be included in the manuscript.

Reading confidence intervals from Tukey output

R’s TukeyHSD() returns a matrix with columns diff, lwr, upr and p adj. The p adj value is the Tukey-adjusted p-value for that pair, already accounting for all the comparisons in the family. The interval is a simultaneous confidence interval: a pair is significant when the interval excludes 0. With ordered = TRUE, the group means are sorted so that differences are positive, and a pair is significant when lwr is above 0 (R documentation).

Running Tukey HSD in R, Python and SPSS

R

The function is TukeyHSD(x, which, ordered = FALSE, conf.level = 0.95), where x is a fitted aov model. The R documentation’s own example is:

fm1 <- aov(breaks ~ wool + tension, data = warpbreaks)
TukeyHSD(fm1, "tension", ordered = TRUE)

Python with SciPy

scipy.stats.tukey_hsd(*samples, equal_var=True) takes one array per group. The result object has .statistic, .pvalue and .confidence_interval(confidence_level=0.95). With equal group sizes it is Tukey’s test; with unequal sizes it is Tukey-Kramer; setting equal_var=False gives the Games-Howell test (Games & Howell, 1976). SciPy’s documentation lists the assumptions as independent observations, normally distributed data in each group and a common finite variance.

from scipy.stats import tukey_hsd
res = tukey_hsd(group_a, group_b, group_c)
print(res)
print(res.confidence_interval(confidence_level=0.95))

Python with statsmodels

pairwise_tukeyhsd(endog, groups, alpha=0.05, use_var='equal') runs the test on a long-format outcome vector and a group-label vector. Setting use_var='unequal' (added in version 0.15) switches to Games-Howell, using a Welch t statistic with Satterthwaite degrees of freedom. Its documentation warns that Tukey HSD is sensitive to unequal variances and is worse with unequal sample sizes.

SPSS

In One-Way ANOVA, open Post Hoc and tick Tukey (equal variances) or Games-Howell (equal variances not assumed). See CASRAI’s one-way ANOVA in SPSS guide for the full procedure.

Common mistakes

  • Reporting raw p-values. Use the adjusted column (p adj in R); the raw values ignore the multiple comparisons.
  • Using Tukey with clearly unequal variances. statsmodels cautions that Tukey HSD is sensitive to this; use Games-Howell, as in the decision rule above.
  • Using all-pairs Tukey for a few planned contrasts or a control comparison. A pre-specified subset calls for Bonferroni, and treatment-versus-control designs for Dunnett.
  • Confusing Tukey HSD with Tukey’s b. They are different SPSS options with different critical values; Tukey’s b is less strict.
  • Dropping the interval. The difference and its confidence interval show the size of an effect, which the adjusted p-value alone does not.

Frequently asked questions

Do I need a significant ANOVA before running Tukey HSD?

Yes. Tukey HSD is a follow-up procedure, not a standalone test — it identifies which pairs of means differ once the omnibus ANOVA has already established that some difference exists among the groups. Running post hoc pairwise tests after a non-significant omnibus ANOVA is a common source of spurious “significant” pairs and is generally discouraged, though some methodologists note the two procedures don’t test mathematically identical hypotheses and a small minority of designs report post hoc results regardless — the safer default for most manuscripts is to run post hoc comparisons only when the omnibus test is significant.

What’s the difference between Tukey HSD and Tukey-Kramer?

They’re the same underlying test. “Tukey-Kramer” specifically refers to Tukey’s method applied with unequal group sizes, using a harmonic-mean adjustment to the standard error for each pairwise comparison. SciPy’s tukey_hsd applies it automatically when group sizes differ, and R’s TukeyHSD() adjusts for sample size in mildly unbalanced designs.

Can Tukey HSD be used with unequal variances if I just want to be conservative?

No — this is a common misconception. Using Tukey HSD when variances are meaningfully unequal doesn’t make the result “conservative,” it makes the family-wise error rate calculation invalid, because the test’s critical value assumes a single shared variance across groups. Run Levene’s test first; if it’s significant, switch to Games-Howell rather than keeping Tukey HSD and treating it as an extra-safe choice.

Is Tukey HSD more or less conservative than Bonferroni?

For the specific case of testing all pairwise comparisons, Tukey HSD is less conservative (more powerful) than Bonferroni, because it is built around the studentized range of the group means rather than a general-purpose correction. The data table below shows the Tukey threshold lower than the Bonferroni threshold in every one of the 16 rows. Bonferroni becomes the better choice only when the comparison set is smaller than “every pair” and decided in advance of seeing the data.

When should I use Games-Howell instead of Tukey HSD?

Use it when group variances are unequal. SciPy (equal_var=False) and statsmodels (use_var='unequal') both implement Games-Howell as the unequal-variance counterpart of Tukey’s test, using Welch-type degrees of freedom for each pair.

What does “p adj” mean in R’s TukeyHSD output?

It is the p-value for that pair after adjustment for the whole family of pairwise comparisons, derived from the studentized range distribution. Compare it directly with your alpha.

What is the studentized range distribution?

It is the distribution of the range of independent normal observations divided by an independent estimate of their standard deviation. Tukey HSD uses its upper-α point, q, as the critical value; the data table below lists values of q alongside the corresponding t-scale thresholds.

How do I run Tukey HSD in R or Python?

In R, fit the model with aov() and call TukeyHSD(). In Python, use scipy.stats.tukey_hsd or statsmodels.stats.multicomp.pairwise_tukeyhsd. Examples are in the software section above.

See CASRAI’s guide to running a one-way ANOVA in SPSS for the full procedure including Tukey and Games-Howell post hoc output, running ANOVA in R and ANOVA in Stata for those platforms, and two-way ANOVA in SPSS and MANOVA in SPSS for factorial and multivariate designs where post hoc comparisons follow a different structure. For the underlying concepts, see CASRAI’s entries on p-values, confidence intervals, effect size, and the Bonferroni correction and multiple comparisons more broadly.

Sources

Sources (accessed 2026-11-15):

Data: Tukey HSD critical values versus unadjusted and Bonferroni thresholds, alpha = .05 (two-sided)

For 3-6 groups and 10-120 error degrees of freedom, the studentized range critical value q and the equivalent t-scale threshold q/sqrt(2) used by Tukey HSD, set beside the unadjusted t critical value and the Bonferroni-adjusted t critical value for all k(k-1)/2 pairwise comparisons. Values computed by the compiler from the studentized range and t distributions (SciPy 1.18.1), with the q(5,10)=4.65 value cross-checked against the NIST e-Handbook.

Period covered: 2026.

Tukey HSD critical values versus unadjusted and Bonferroni thresholds, alpha = .05 (two-sided)
Number of groups (k)Error degrees of freedomPairwise comparisonsTukey critical qTukey threshold on t scaleUnadjusted t criticalBonferroni t critical
31033.8772.7412.2282.87
32033.5782.532.0862.613
36033.3992.40322.463
312033.3562.3731.982.428
41064.3273.0592.2283.277
42063.9582.7992.0862.927
46063.7372.64322.729
412063.6852.6051.982.683
510104.6543.2912.2283.581
520104.2322.9922.0863.153
560103.9772.81222.915
5120103.9172.771.982.86
610154.9123.4732.2283.827
620154.4453.1432.0863.331
660154.1632.94423.057
6120154.0962.8961.982.995

Sources

Compiled by CASRAI from the sources above. Free to reuse under CC BY 4.0 with attribution.

Follow CASRAI

Research-administration guidance, standards updates and independent tool reviews.

Ask CASRAI · full access

Ask about Tukey HSD Test: When to Use It and How to Report It

Full access: large monthly usage, up to 10 source passages behind each answer, and MCP and API access for Claude Code, Codex and other CLIs. Cancel any time.

An AI assistant for research: funder rules, compliance, methods and publishing. It links the sources behind its answers and labels answers that come from a web search.

Answers draw on CASRAI's guides and dictionary plus the federal and funder documents we index: Federal Register, Grants.gov, Regulations.gov and UKRI.

Works on this site and inside Claude, Cursor and the AI tools you already use.

Everything CASRAI publishes — this page, the dictionary, the guides and the news — stays open to read, with no account and no card.

Referenced across the research world

University of Cambridge logoColumbia University logoCrossref logoUniversity of Edinburgh logoHarvard University logoUniversity of Oxford logoPrinceton University logoStanford School of Medicine logoUniversity College London logoORCID logoUniversity of Cambridge logoColumbia University logoCrossref logoUniversity of Edinburgh logoHarvard University logoUniversity of Oxford logoPrinceton University logoStanford School of Medicine logoUniversity College London logoORCID logo
  • University of Cambridge logo
  • Columbia University logo
  • Crossref logo
  • University of Edinburgh logo
  • Harvard University logo
  • University of Oxford logo
  • Princeton University logo
  • Stanford School of Medicine logo
  • University College London logo
  • ORCID logo

View CASRAI adoption →