Skip to content
simstat.com Statistics by simulation

Effect size calculator: Cohen's d, Hedges' g

This effect size calculator gives Cohen's d, Hedges' g and Glass's Δ for two independent groups, from means, standard deviations and group sizes or from raw data, each with a confidence interval from the noncentral t distribution. It also converts d to r and turns an F test into partial η². Everything runs in your browser.

Enter
Group 1
Group 2

The example is the movie ratings from Lakens (2013, Table 3), ten people per movie. Every effect size uses the difference group 1 − group 2.

Choose the average of the two variances when you report a Welch t-test rather than Student's t-test.

Result

Effect sizes with 95% confidence intervals
Measure Estimate 95% CI
Cohen's d––
Hedges' g––
Glass's Δ––
Glass's Δ, bias-adjusted––

Partial η² from F, and d ↔ r

Partial η² from an F test

Convert d and r

Without group sizes the conversion assumes two equal, large groups (h = 4).

Which effect size?

All three are standardised mean differences: the gap between two group means divided by a standard deviation, so results on different scales can be compared. Cohen's d divides by the pooled SD of both groups. It overestimates the population value in small samples; Lakens (2013) recommends Hedges' g, which corrects that bias, when you report an effect size for a future meta-analysis. Glass's Δ divides by the control group's SD only, and Lakens advises it whenever the two SDs differ substantially.

d=xˉ1−xˉ2sp,sp=(n1−1)s12+(n2−1)s22n1+n2−2d = \frac{\bar{x}_1 - \bar{x}_2}{s_p}, \qquad s_p = \sqrt{\frac{(n_1 - 1)s_1^2 + (n_2 - 1)s_2^2}{n_1 + n_2 - 2}}
g=J(ν) d,J(ν)=Γ(ν/2)ν/2  Γ((ν−1)/2),Δ=xˉ1−xˉ2scontrolg = J(\nu)\,d, \qquad J(\nu) = \frac{\Gamma(\nu/2)}{\sqrt{\nu/2}\;\Gamma((\nu - 1)/2)}, \qquad \Delta = \frac{\bar{x}_1 - \bar{x}_2}{s_{\text{control}}}

Here ν = n₁ + n₂ − 2. The tool uses this exact gamma-function J, as the R package effectsize does by default (Ben-Shachar, Lüdecke and Makowski, 2020), not the shortcut J ≈ 1 − 3/(4ν − 1); the two differ by less than 0.001 once ν is above about 10. With the Welch option, d and g divide by √((s₁² + s₂²)/2) and ν is the Welch degrees of freedom, which the effectsize documentation recommends for effect sizes that accompany a Welch test.

How the confidence interval is computed

The t statistic of the two-sample test follows a noncentral t distribution whose noncentrality parameter δ is the true d (with the pooled SD) times √(n₁n₂/(n₁ + n₂)). The tool finds the two values of δ that put your observed t at the 1 − α/2 and α/2 points of that distribution, then rescales them to d. Kelley (2007) explains why this pivoting gives an exact interval for a standardised effect, and effectsize uses the same method. The interval for g is the d interval times J. For Glass's Δ the tool follows effectsize, whose documentation cites Algina, Keselman and Penfield (2006); the bias adjustment uses J with nc − 1 degrees of freedom, and effectsize 1.0.3 reports the bias-adjusted Δ by default, so the table shows both.

The noncentral t distribution is computed in your browser as a Poisson-weighted sum of incomplete beta functions, summed outwards from its largest term. Our tests check it against R to about 12 decimal places. The tool also shows a normal-approximation interval, d ± z × SE with the large-sample formula the metafor package uses by default, SE = √(1/n₁ + 1/n₂ + d²/(2N)), applied here to d (Viechtbauer, n.d.). It ignores the skew of the noncentral t, so treat it as a rough check only. For an interval around a single mean or proportion rather than an effect size, use our confidence interval calculator.

d to r, and η² from F

r=dd2+h,h=N−2n1+N−2n2,ηp2=F ν1F ν1+ν2r = \frac{d}{\sqrt{d^2 + h}}, \quad h = \frac{N - 2}{n_1} + \frac{N - 2}{n_2}, \qquad \eta_p^2 = \frac{F\,\nu_1}{F\,\nu_1 + \nu_2}

With the group sizes, r is exactly the point-biserial correlation between group membership and the outcome (N = n₁ + n₂), as in effectsize's d_to_r(). Without them h = 4, which assumes two equal, large groups. Partial η² (partial eta squared) comes from F with ν₁ and ν₂ degrees of freedom; Lakens (2013) cautions that for designs with measured factors or covariates it cannot be recovered from the reported results in this way. In a one-way between-subjects ANOVA partial η² equals η². In a design with more factors, η² divides by the total sum of squares, which F alone does not give, so the tool reports partial η² only.

Worked example

Lakens (2013) uses artificial ratings of two movies by 10 people each: means 8.70 (SD 0.82) and 7.70 (SD 0.95). The pooled SD is 0.888, so d = 1.13, with t(18) = 2.52, p = 0.022. The noncentrality limits are [0.36, 4.61], giving a 95% interval for d of [0.16, 2.06]; the normal approximation gives [0.18, 2.07]. With J = 0.9576, Hedges' g = 1.08, 95% CI [0.16, 1.97]. Glass's Δ with movie 2 as control is 1.05, 95% CI [0.08, 1.98]. Converted to a correlation, r = 0.51 (0.49 with h = 4). Rounded to two decimals, d, its interval and g are the values Lakens reports. His F example, F(1, 38) = 7.21, gives partial η² = 0.159.

Small, medium or large?

Cohen (1988, as cited by Lakens, 2013) suggested d = 0.2, 0.5 and 0.8 as small, medium and large. Lakens (2013) cautions that these values are arbitrary and should not be interpreted rigidly, that small effects can have large consequences, and that the benchmarks are only a fallback when there are no related findings to compare with. Compare your effect with others in your field instead. Our guide to effect size explains the measures, the benchmarks and how to interpret them in more detail.

How to report it

Give the means, SDs and group sizes, the test, the effect size with its interval, and how both were computed. For example: “Movie 1 was rated higher than movie 2, t(18) = 2.52, p = 0.022, Hedges' g = 1.08, 95% CI [0.16, 1.97] (pooled SD, exact bias correction, noncentral t interval).”

References