Critical q values for Tukey’s HSD post-hoc test (α = 0.05).
The studentized range (q) table gives the critical values used in Tukey’s HSD (Honestly Significant Difference) post-hoc test, which compares every pair of group means after a significant ANOVA while controlling the family-wise error rate. Find the row for your error degrees of freedom and the column for k, the number of groups being compared. This table is for α = 0.05.
After a one-way ANOVA with k groups and error degrees of freedom dferror, the honestly-significant-difference threshold is HSD = q × √(MSerror / n), where q is read from this table and n is the per-group sample size. Any pair of means differing by more than HSD is significantly different at α = 0.05.
Example: k = 4 groups with dferror = 20 gives q = 3.96. With MSerror = 25 and n = 6 per group (4 × 6 = 24 observations, so dferror = 24 − 4 = 20), HSD = 3.96 × √(25/6) ≈ 8.08. Group means more than 8.08 apart differ significantly.
| dferror | k=2 | k=3 | k=4 | k=5 | k=6 | k=7 | k=8 | k=9 | k=10 |
|---|---|---|---|---|---|---|---|---|---|
| 5 | 3.64 | 4.60 | 5.22 | 5.67 | 6.03 | 6.33 | 6.58 | 6.80 | 6.99 |
| 6 | 3.46 | 4.34 | 4.90 | 5.30 | 5.63 | 5.90 | 6.12 | 6.32 | 6.49 |
| 7 | 3.34 | 4.16 | 4.68 | 5.06 | 5.36 | 5.61 | 5.82 | 6.00 | 6.16 |
| 8 | 3.26 | 4.04 | 4.53 | 4.89 | 5.17 | 5.40 | 5.60 | 5.77 | 5.92 |
| 9 | 3.20 | 3.95 | 4.41 | 4.76 | 5.02 | 5.24 | 5.43 | 5.59 | 5.74 |
| 10 | 3.15 | 3.88 | 4.33 | 4.65 | 4.91 | 5.12 | 5.30 | 5.46 | 5.60 |
| 11 | 3.11 | 3.82 | 4.26 | 4.57 | 4.82 | 5.03 | 5.20 | 5.35 | 5.49 |
| 12 | 3.08 | 3.77 | 4.20 | 4.51 | 4.75 | 4.95 | 5.12 | 5.27 | 5.39 |
| 13 | 3.06 | 3.73 | 4.15 | 4.45 | 4.69 | 4.88 | 5.05 | 5.19 | 5.32 |
| 14 | 3.03 | 3.70 | 4.11 | 4.41 | 4.64 | 4.83 | 4.99 | 5.13 | 5.25 |
| 15 | 3.01 | 3.67 | 4.08 | 4.37 | 4.59 | 4.78 | 4.94 | 5.08 | 5.20 |
| 16 | 3.00 | 3.65 | 4.05 | 4.33 | 4.56 | 4.74 | 4.90 | 5.03 | 5.15 |
| 17 | 2.98 | 3.63 | 4.02 | 4.30 | 4.52 | 4.70 | 4.86 | 4.99 | 5.11 |
| 18 | 2.97 | 3.61 | 4.00 | 4.28 | 4.49 | 4.67 | 4.82 | 4.96 | 5.07 |
| 19 | 2.96 | 3.59 | 3.98 | 4.25 | 4.47 | 4.65 | 4.79 | 4.92 | 5.04 |
| 20 | 2.95 | 3.58 | 3.96 | 4.23 | 4.45 | 4.62 | 4.77 | 4.90 | 5.01 |
| 24 | 2.92 | 3.53 | 3.90 | 4.17 | 4.37 | 4.54 | 4.68 | 4.81 | 4.92 |
| 30 | 2.89 | 3.49 | 3.85 | 4.10 | 4.30 | 4.46 | 4.60 | 4.72 | 4.82 |
| 40 | 2.86 | 3.44 | 3.79 | 4.04 | 4.23 | 4.39 | 4.52 | 4.63 | 4.73 |
| 60 | 2.83 | 3.40 | 3.74 | 3.98 | 4.16 | 4.31 | 4.44 | 4.55 | 4.65 |
| 120 | 2.80 | 3.36 | 3.68 | 3.92 | 4.10 | 4.24 | 4.36 | 4.47 | 4.56 |
| ∞ | 2.77 | 3.31 | 3.63 | 3.86 | 4.03 | 4.17 | 4.29 | 4.39 | 4.47 |
Computed with SciPy studentized_range.ppf(0.95, k, df). The ∞ row applies when error df is very large. See the methodology page.
Running a t-test on every pair inflates the Type I error rate: with several groups the chance of at least one false positive climbs well above 5%. Tukey’s HSD uses the studentized range distribution to hold the overall error rate at α. It is usually reported after a significant one-way ANOVA, although it controls the error rate on its own.
Following the example above (k = 4 groups of n = 6, MSerror = 25, dferror = 20, HSD ≈ 8.08), suppose the group means are A = 52, B = 58, C = 63 and D = 66. Compare every pair with the HSD:
| Pair | Difference | Larger than 8.08? |
|---|---|---|
| A vs B | 6 | No |
| A vs C | 11 | Yes |
| A vs D | 14 | Yes |
| B vs C | 5 | No |
| B vs D | 8 | No |
| C vs D | 3 | No |
Only A differs significantly from C and D. A common way to show this is with letters: groups sharing a letter do not differ, so A (a), B (ab), C (b), D (b).
When groups have different sizes, use the Tukey–Kramer version: for each pair i and j, the threshold is q × √((MSerror / 2) × (1/ni + 1/nj)). With equal sizes this reduces to the formula above. Use the same q value from this table.
The table jumps from 20 to 24, 30, 40, 60 and 120. Use the next smaller dferror: its q is slightly larger, which keeps the comparison conservative. For example, 4 groups of 10 give dferror = 36; use row 30 (q = 3.85, exact value for 36 is 3.81).
Find q in the studentized range table for k groups and the ANOVA error degrees of freedom, then compute HSD = q x sqrt(MS error / n), where n is the per-group sample size. Pairs of means differing by more than HSD are significantly different.
k is the number of group means being compared, not the number of pairs.
Yes, with the Tukey-Kramer adjustment, which uses the harmonic combination of the two group sizes for each pair.
Tukey's HSD controls the family-wise error rate on its own, so it is valid without one, but it is usually reported after a significant ANOVA.