Effect size calculator: Cohen’s d and Hedges’ g
This effect size calculator gives Cohen’s d and Hedges’ g for two independent groups: d is the difference in means divided by the pooled standard deviation, and g is d times a small-sample correction, J. Enter means and SDs, a t statistic, a P value or a reported g.
Updated
Runs in your browser. Nothing you enter is uploaded, stored or sent anywhere.
How Cohen’s d and Hedges’ g are calculated
The standardized mean difference (SMD) expresses a difference in means in units of the outcome’s standard deviation, so studies that used different scales can be combined (Cochrane Handbook, section 6.5.1.2). The SMD in Cochrane reviews is Hedges’ adjusted g. The formulas are those of Borenstein and colleagues, chapter 4, with n₁ and n₂ the group sizes.
| Step | Formula |
|---|---|
| Pooled SD | S = √[((n₁ − 1)SD₁² + (n₂ − 1)SD₂²) ÷ (n₁ + n₂ − 2)] |
| Cohen’s d | d = (M₁ − M₂) ÷ S |
| Variance of d | V_d = (n₁ + n₂) ÷ (n₁n₂) + d² ÷ (2(n₁ + n₂)) |
| Correction factor, m = n₁ + n₂ − 2 | J = Γ(m/2) ÷ (√(m/2) × Γ((m − 1)/2)) |
| Hedges’ g | g = J × d, with V_g = J² × V_d |
| 95% confidence interval | g ± 1.96 × √V_g, and the same for d |
J is Hedges’ (1981) exact correction, written with the gamma function as Lin and Aloe (2021) give it. It’s what metafor and OtterSR compute. The usual approximation, J ≈ 1 − 3 ÷ (4m − 1), is the one Borenstein and colleagues print and the one in RevMan, written there as 1 − 3 ÷ (4N − 9) with N = n₁ + n₂ (Deeks and Higgins). The two differ by less than 0.001 once there are ten or so people in all; the working shows both.
From a t statistic or a P value
When a paper gives only a t test, d follows from t: d = t × √(1/n₁ + 1/n₂) (Lakens 2013, equation 2). That’s the Cochrane Handbook’s route in section 6.5.2.3 (t to the SE of the difference, the SE to the SD) with the difference in means cancelling out. From a two-sided P value, t is first found on n₁ + n₂ − 2 degrees of freedom, as in step 1 of that section. A P value has no sign, so you say which group was higher.
Other software, other standard errors
Packages agree on g but not quite on its standard error. RevMan uses √(N ÷ (n₁n₂) + g² ÷ (2(N − 3.94))), metafor and OtterSR use √(1/n₁ + 1/n₂ + g² ÷ (2N)), and this calculator follows Borenstein’s J² × V_d. Lin and Aloe (2021) compare them. The working shows all three, so you can match whichever software the rest of your review uses.
Worked example: Hedges’ g for a small study
The calculator opens on Lakens’ (2013) example: 20 people rated one of two movies, 10 each. Movie 1 averaged 8.7 (SD 0.82) and movie 2 averaged 7.7 (SD 0.95), and an independent t test gave t(18) = 2.52.
Example: Working it through
The pooled SD is √[(9 × 0.82² + 9 × 0.95²) ÷ 18] = 0.887, so d = (8.7 − 7.7) ÷ 0.887 = 1.13. From the t statistic instead, d = 2.52 × √(1/10 + 1/10) = 1.13.
The variance of d is 20 ÷ 100 + 1.13² ÷ 40 = 0.232, so its SE is 0.481 and its 95% CI is 0.18 to 2.07.
With m = 18, J = 0.9576 (the approximation gives 0.9577), so g = 0.9576 × 1.127 = 1.08, with an SE of 0.461 and a 95% CI of 0.18 to 1.98.
Lakens reports d = 1.13 and g = 1.08. With only ten people a group, d overstates the effect by about 4%.
The tests for this page also reproduce Borenstein and colleagues’ example (means 103 and 100, SDs 5.5 and 4.5, 50 a group: d = 0.5970, g = 0.5924, SE 0.2028, as reproduced with metafor) and the Cochrane Handbook’s t of 2.78 for P = 0.008 with 25 and 22 participants.
When to be careful
- Different spreads. The pooled SD assumes the two groups vary about as much as each other (Cochrane 6.5.1.2). If an intervention changes the spread, Glass’s Δ, which divides by the comparator’s SD alone, may suit better. The calculator flags SDs that differ more than twofold.
- Scales that point opposite ways. If higher means worse on some scales and better on others, multiply one set of means by −1 before standardizing, and say so in your methods (Cochrane 6.5.1.2).
- Independent groups only. These formulas are for two separate groups. A crossover or before-and-after design needs a different standardizer, such as Lakens’ d_av or d_z.
- Converted t and P values. They assume a pooled-variance t test. A P reported as P < 0.05 gives only a bound: Cochrane suggests taking the limit (0.05) as a conservative choice, and a P reported as “not significant” can’t be used (6.5.2.3).
- Large-sample intervals. The 95% CIs use the normal approximation to d’s sampling distribution, which is rough for very small studies.
What to report
What to report: Report g with what it was built from
Give g with its 95% CI and each group’s N, and say that it’s Hedges’ g with the pooled SD. Name the variance formula or the software, since they differ slightly.
Say which studies’ g came from a t statistic or a P value rather than means and SDs, and which scales you reversed so that higher scores mean the same thing.
In OtterSR, the Write stage computes Hedges’ g with the same exact J when it pools means and SDs you’ve extracted. See how OtterSR works.
Frequently asked questions
Hedges’ g or Cohen’s d?
Hedges’ g, for a meta-analysis. Cohen’s d overestimates the population effect in small samples, and g removes that bias. Cochrane reviews use g as their SMD (6.5.1.2). The difference is very small above about 20 participants (Lakens 2013), so the choice matters most for small studies.
How do I convert Hedges’ g to Cohen’s d?
Divide by J: d = g ÷ J, with J worked out from the two group sizes. Choose “Hedges’ g” above, enter g and the two Ns, and the calculator gives d and both standard errors.
Can I calculate Cohen’s d from a t test or a P value?
Yes, for an independent-samples t test: d = t × √(1/n₁ + 1/n₂). For a P value, the calculator first finds the t that gives it on n₁ + n₂ − 2 degrees of freedom. You need an exact P, not P < 0.05, and the group sizes.
Is this a standardized mean difference calculator?
Yes. The standardized mean difference is the family name, and Cohen’s d and Hedges’ g are its two common members; the SMD in RevMan and Cochrane reviews is Hedges’ g.
Why is my g slightly different from RevMan’s?
RevMan uses the approximate J and its own standard error, with N − 3.94. g usually agrees to two or three decimals; the SE differs more in small studies. The working lists RevMan’s figures beside these.
How to cite this tool
OtterSR. Effect size calculator: Cohen’s d and Hedges’ g. https://www.ottersr.com/tools/effect-size-calculator (accessed today’s date).
Please cite the method as well:
Hedges LV. Distribution theory for Glass’s estimator of effect size and related estimators. Journal of Educational Statistics 1981;6(2):107–28.
Borenstein M, Hedges LV, Higgins JPT, Rothstein HR. Introduction to Meta-Analysis. Chichester: John Wiley & Sons, 2009. Chapters 4, 5 and 14.
Related guides
- How to do a meta-analysis: a step-by-step guideHow to do a meta-analysis: deciding whether to pool, choosing the effect measure, fixed or random effects, heterogeneity, sensitivity analyses and reporting.
- How to read a forest plot in a meta-analysisHow to read a forest plot: what the squares, lines, diamond and line of no effect mean, how to spot heterogeneity, and what the I² and P values beneath it say.
- How to design a data extraction formHow to design a data extraction form for a systematic review: which fields to collect, piloting, two extractors, and recording where each value came from.
Related tools
- Forest plot generatorUse this when you have several studies of the same comparison and want them pooled, with heterogeneity, and drawn as a forest plot.
- Funnel plot generator and Egger’s testUse this when your meta-analysis has 10 or more studies and you need to check the funnel plot for small-study effects or publication bias.
- Effect size converter: r, Fisher’s z, d, g and odds ratioUse this when some studies report a correlation, some an odds ratio and some a standardized mean difference, and you need them on one scale.
Sources
- Higgins JP, Li T, Deeks JJ (editors). Chapter 6: Choosing effect measures and computing estimates of effect [last updated August 2023]. In: Higgins JP, Thomas J, Chandler J, et al (editors). Cochrane Handbook for Systematic Reviews of Interventions version 6.5. Cochrane, 2024. https://www.cochrane.org/authors/handbooks-and-manuals/handbook/current/chapter-06
- Borenstein M, Hedges LV, Higgins JPT, Rothstein HR. Introduction to Meta-Analysis. Chichester: John Wiley & Sons, 2009. Chapters 4, 5 and 14. https://doi.org/10.1002/9780470743386
- Viechtbauer W. Borenstein et al. (2009): the book’s worked examples reproduced with the metafor package for R. https://wviechtb.github.io/meta_analysis_books/borenstein2009.html
- Hedges LV. Distribution theory for Glass’s estimator of effect size and related estimators. Journal of Educational Statistics 1981;6(2):107–28. https://doi.org/10.3102/10769986006002107
- Lin L, Aloe AM. Evaluation of various estimators for standardized mean difference in meta-analysis. Statistics in Medicine 2021;40(2):403–26. https://pmc.ncbi.nlm.nih.gov/articles/PMC7770064/
- Deeks JJ, Higgins JPT, on behalf of the Statistical Methods Group of The Cochrane Collaboration. Statistical algorithms in Review Manager 5. August 2010. https://www.cochrane.org/authors/handbooks-and-manuals/handbook/current/statistical-methods-revman5
- Lakens D. Calculating and reporting effect sizes to facilitate cumulative science: a practical primer for t-tests and ANOVAs. Frontiers in Psychology 2013;4:863. https://doi.org/10.3389/fpsyg.2013.00863