 
Tukey HSD
 =
 Q_{α(k,df)
}  √
 
MS_{error
} 

n

where
 Q_{α(k,df)} is the value of the studentized range statistic for the total number of treatments (k) at the chosen type I error rate (α). df are the same as for MS_{error},
 MS_{error} is the mean square error from the ANOVA table. For oneway ANOVA df = k(N1), where k is the number of treatments, and N is the total number of observations,
 n is the sample size.

