Post-Hoc Test Calculator
Your ANOVA came back significant, so at least one group differs from the others. It will not tell you which. This calculator runs the three standard follow-ups on your data at once: Tukey HSD, Bonferroni-corrected pairwise t-tests, and Dunn's test for data that breaks ANOVA's assumptions. Paste one row per observation, or just the group means and SDs from a paper, and get every pairwise difference with an adjusted p-value, a confidence interval and a letters display you can drop into a report.
I want to
Or start from an example
Your data
Comma, tab or space separated. You can also put a whole group on one line: Control, 21.0, 19.5, 22.3
Three groups minimum. Dunn's test needs the raw values, so it is unavailable here.
Before the pairs: the omnibus test
Which pairs differ
Dunn's test cannot run on summaries. It works by replacing every value with its rank across the whole dataset, and ranks cannot be recovered from a mean and a standard deviation: two very different datasets can share both. Switch to Raw data to use this route, or stay with Tukey and Bonferroni, which need only the means, SDs and group sizes.
dunn.test prints the raw Benjamini-Hochberg multiplier without the monotonicity step that p.adjust applies, so the printed p can disagree with the decision. The verdict follows the correct step-up rule, which is what dunn.test itself uses to mark significance.
How this was computed, with your numbers
Which route should you use?
All three answer the same question and control for the same problem: look at enough pairs and one will look significant by luck. They differ in what they assume and what they promise.
| Route | Use it when | What it controls | The catch |
|---|---|---|---|
| Tukey HSD | The default after a one-way ANOVA when you want every pairwise comparison and the groups are roughly normal with similar spread. | Family-wise error rate, exactly. The studentized range distribution knows you are taking the largest of k means. | Built for all-pairs comparisons on a balanced-ish design. It is not the tool for a handful of hand-picked contrasts. |
| Bonferroni | You have a small, specific set of comparisons, or you want a method nobody can argue with. Also fine when k is small, where it costs little. | Family-wise error rate, conservatively. Multiply each p by the number of tests. | Gets punishing fast: with 6 groups that is 15 comparisons, so every p is multiplied by 15 and real effects go missing. |
| Dunn + BH | ANOVA's assumptions fail: skew, outliers, ordinal scales such as Likert ratings, or badly unequal variances. It follows Kruskal-Wallis, not ANOVA. | False discovery rate, via Benjamini-Hochberg: the expected share of your claims that are wrong. | Needs raw values, compares mean ranks rather than means, and FDR is a weaker promise than family-wise control. |
Common questions
What is a post-hoc test and when do I need one?
An ANOVA answers one question: is there any difference among the group means? A significant F tells you at least one group differs, but not which. A post-hoc test answers the follow-up: which specific pairs differ. It is called post-hoc because you decide to look at the pairs after seeing the omnibus result, and that extra looking is exactly what has to be paid for with a correction. If you had one specific pair planned in advance, that is a planned contrast and needs no post-hoc penalty.
Should I use Tukey HSD or Bonferroni?
Use Tukey HSD when you want all pairwise comparisons after a one-way ANOVA. It is built for exactly that job: the studentized range distribution already accounts for the fact that you are picking the largest gap among k means, so it gives more power than Bonferroni while still holding the family-wise error rate. Bonferroni simply multiplies each p-value by the number of comparisons. It is more conservative, so it finds fewer differences, but it is simple, transparent and valid for any set of comparisons, not just all-pairs. With many groups the gap widens and Tukey is clearly better; with a handful of comparisons the two often agree.
When should I use Dunn's test instead?
Use Dunn's test when the ANOVA's assumptions do not hold: strong skew, heavy outliers, ordinal outcomes such as Likert ratings, or clearly unequal variances. Dunn is the follow-up to the Kruskal-Wallis test, the nonparametric counterpart of ANOVA. It replaces the values with their ranks across all observations and compares mean ranks, so only the ordering matters and extreme values cannot drag a mean around. It needs the raw values, because ranks cannot be recovered from a mean and a standard deviation.
What is the difference between family-wise error rate and false discovery rate?
Family-wise error rate (FWER) is the probability of making even one false positive across the whole family of comparisons. Tukey and Bonferroni control it, so at alpha 0.05 there is a 5% chance of any false claim at all. False discovery rate (FDR), which Benjamini-Hochberg controls, is the expected proportion of the claims you make that are wrong: if BH flags 10 pairs at 0.05, about 0.5 of them are expected to be false alarms. FDR is a weaker guarantee, so it finds more differences. FWER suits confirmatory work where one false claim is costly; FDR suits screening where you plan to follow up anyway.
How do I read a letters display?
Groups that share a letter are not significantly different from each other; groups with no letter in common are. So if group A is labelled a, group B is labelled ab and group C is labelled b, then A and C differ from each other, while B differs from neither because it shares a with A and b with C. A group can carry several letters, which simply means it sits in the overlap and the data cannot separate it from either side. It is the most compact way to report all pairwise results at once, which is why journals like it.
Can I run a post-hoc test if the ANOVA was not significant?
You can, and this calculator will show the pairs, but read them as exploratory. The classical advice is to treat a non-significant omnibus F as the end of the analysis, because running post-hoc tests only after a significant F is what protects the error rate of the whole procedure. Tukey HSD is an exception worth knowing: it controls the family-wise error rate on its own, so it is defensible without the omnibus gate. Bonferroni is likewise self-contained. What is not defensible is hunting through pairs, finding one, and reporting it as if it had been planned.
Does this post-hoc calculator match R?
Yes. The Tukey differences, family-wise confidence intervals and adjusted p-values reproduce TukeyHSD(aov()), including unbalanced designs; the Bonferroni route reproduces pairwise.t.test() with its default pooled standard deviation; and Dunn's z statistics and Benjamini-Hochberg adjusted p-values reproduce FSA::dunnTest(), including the tie correction on ratings data. The letters display matches multcompView::multcompLetters(). Verification runs across 14 datasets at three confidence levels, plus a grid of the underlying studentized range distribution.