Cohen’s d and Hedges’ g calculator with confidence intervals
Effect size between two groups or before and after, with confidence intervals, plain-language equivalents and a sentence ready for your report.
Calculator inputs
Results
Enter your values and press “Calculate” to see the result.
| x | Group 1 | Group 2 |
|---|---|---|
| 9.0148 | 0.0006 | 0 |
| 9.2471 | 0.0010 | 0 |
| 9.4793 | 0.0017 | 0 |
| 9.7116 | 0.0028 | 0 |
| 9.9438 | 0.0044 | 0 |
| 10.1761 | 0.0069 | 0 |
| 10.4083 | 0.0104 | 0 |
| 10.6406 | 0.0154 | 0 |
| 10.8728 | 0.0222 | 0.0000 |
| 11.1051 | 0.0312 | 0.0000 |
| 11.3373 | 0.0427 | 0.0000 |
| 11.5696 | 0.0572 | 0.0000 |
| 11.8018 | 0.0746 | 0.0000 |
| 12.0340 | 0.0949 | 0.0000 |
| 12.2663 | 0.1178 | 0.0001 |
| 12.4985 | 0.1426 | 0.0001 |
| 12.7308 | 0.1684 | 0.0003 |
| 12.9630 | 0.1940 | 0.0005 |
| 13.1953 | 0.2180 | 0.0009 |
| 13.4275 | 0.2389 | 0.0015 |
| 13.6598 | 0.2554 | 0.0025 |
| 13.8920 | 0.2664 | 0.0042 |
| 14.1243 | 0.2709 | 0.0066 |
| 14.3565 | 0.2688 | 0.0102 |
| 14.5888 | 0.2601 | 0.0154 |
| 14.8210 | 0.2455 | 0.0226 |
| 15.0533 | 0.2261 | 0.0322 |
| 15.2855 | 0.2030 | 0.0447 |
| 15.5178 | 0.1779 | 0.0605 |
| 15.7500 | 0.1520 | 0.0796 |
| 15.9823 | 0.1267 | 0.1019 |
| 16.2145 | 0.1030 | 0.1271 |
| 16.4468 | 0.0817 | 0.1543 |
| 16.6790 | 0.0632 | 0.1824 |
| 16.9113 | 0.0476 | 0.2097 |
| 17.1435 | 0.0351 | 0.2348 |
| 17.3758 | 0.0252 | 0.2559 |
| 17.6080 | 0.0176 | 0.2715 |
| 17.8403 | 0.0120 | 0.2803 |
| 18.0725 | 0.0080 | 0.2817 |
| 18.3048 | 0.0052 | 0.2756 |
| 18.5370 | 0.0033 | 0.2625 |
| 18.7693 | 0.0020 | 0.2433 |
| 19.0015 | 0.0012 | 0.2195 |
| 19.2338 | 0.0007 | 0.1928 |
| 19.4660 | 0.0004 | 0.1648 |
| 19.6983 | 0.0002 | 0.1372 |
| 19.9305 | 0.0001 | 0.1111 |
| 20.1628 | 0.0001 | 0.0876 |
| 20.3950 | 0.0000 | 0.0672 |
| 20.6273 | 0.0000 | 0.0502 |
| 20.8595 | 0.0000 | 0.0365 |
| 21.0918 | 0.0000 | 0.0259 |
| 21.324 | 0.0000 | 0.0178 |
| 21.5563 | 0.0000 | 0.0119 |
| 21.7885 | 0 | 0.0078 |
| 22.0208 | 0 | 0.0050 |
| 22.253 | 0 | 0.0031 |
| 22.4853 | 0 | 0.0018 |
| 22.7175 | 0 | 0.0011 |
| 22.9498 | 0 | 0.0006 |
See the working step by step
- Mean difference (group 1 − group 2) = -3.8333 (95% CI: -5.6901 to -1.9766)
- t(10) = -4.600, p < 0.001
- Equivalent r = -0.824
- Glass’s Δ (using group 2’s SD) = -2.711
In short
- What it calculates
- Effect size between two groups or before and after, with confidence intervals, plain-language equivalents and a sentence ready for your report.
- Formula used
Pooled SD: s_p = √(((n₁−1)s₁² + (n₂−1)s₂²) / (n₁+n₂−2))- Example
- Example 1. Two independent groups, from the raw data.
Cohen’s d calculator
A p value tells you whether a difference is detectable; an effect size tells you whether it is large. With huge samples, trivial differences come out significant, and with small samples an important effect can be missed. That is why journals ask for an effect size every time and, increasingly, with its confidence interval.
Paste the data of two groups (or of the same people before and after), or type the means, SDs and sample sizes from a paper. You get Cohen’s d, Hedges’ g with its interval, the easier-to-grasp equivalents and an APA-style sentence for your write-up. Everything is calculated in your browser.
How it works
The difference in means is divided by a standard deviation: the pooled SD of the two groups (independent design) or the SD of the differences (before and after). The result is in standard-deviation units, so it is comparable across studies that use different scales.
Hedges’ g corrects the small-sample bias of d. The confidence interval comes from inverting the noncentral t distribution, which is the exact method and the one style guides recommend; it is not the rough “±1.96 standard errors” some spreadsheets use.
Formula
Pooled SD: s_p = √(((n₁−1)s₁² + (n₂−1)s₂²) / (n₁+n₂−2))
d = (x̄₁ − x̄₂) / s_p (paired: d_z = mean of differences / SD of differences)
g = d × J, J = Γ(df/2) / (√(df/2) · Γ((df−1)/2)) (≈ 1 − 3/(4·df − 1))
t = d × √(n₁n₂/(n₁+n₂)) (paired: t = d_z × √n)
CI of d: find the noncentrality parameters δ_low and δ_high of a t with df degrees of freedom that place the observed t at the (1 ± level)/2 percentiles; then d = δ / √(n₁n₂/(n₁+n₂))
Glass’s Δ = (x̄₁ − x̄₂) / s₂ d_av = difference / √((s₁² + s₂²)/2)
Probability of superiority = Φ(|d| / √2) Overlap = 2 · Φ(−|d| / 2)
r = t / √(t² + df)
Cohen’s benchmarks: |d| < 0.2 trivial · 0.2 small · 0.5 medium · 0.8 large
Worked example
Example 1. Two independent groups, from the raw data.
Group 1: 12, 15, 14, 16, 13, 15 (mean 14.17). Group 2: 18, 17, 19, 16, 20, 18 (mean 18.00). The pooled SD is 1.443 and the difference −3.833, so d = −2.656 and g = −2.451, with a 95% CI for g of −3.908 to −0.934. Student’s t is −4.60 on 10 degrees of freedom (p < .001). Group 2 scores higher; the effect is very large and the interval, although wide with six people per group, stays well away from zero.
Example 2. Means and SDs from a paper.
Group 1: mean 78, SD 8, n = 40. Group 2: mean 70, SD 9, n = 35. The pooled SD is 8.48, d = 0.943 and g = 0.934, with a 95% CI for g of 0.457 to 1.405. There is a 74.8% probability that a person from group 1 scores higher than one from group 2, and the distributions overlap by 63.7%.
Example 3. Before and after in the same people.
Ten patients score 72, 65, 80, 74, 68, 77, 70, 83, 66, 75 before and 78, 70, 85, 75, 74, 84, 73, 88, 71, 80 after. The mean improvement is 4.8 points (95% CI 3.59 to 6.01), d_z = 2.846 and g = 2.601 (CI 1.280 to 3.898), t(9) = 9.00. Note that because the two measures are highly correlated (r = .963), d_z is much larger than d_av = 0.787, which uses the between-person spread. Which one to report depends on the question, and you should say which it is.
Explanation
What an effect size is
A result can be statistically significant and practically irrelevant. The p value depends on sample size; the effect size does not. It measures how far apart two groups are in standard-deviation units, which is why it can be compared across studies and pooled in a meta-analysis.
Cohen’s d, Hedges’ g, Glass’s Δ, d_z and d_av
- **Cohen’s d**: the difference in means divided by the pooled SD. The standard measure for two independent groups.
- **Hedges’ g**: the same d with a small correction that removes its small-sample bias. With more than about 20 cases per group they barely differ.
- **Glass’s Δ**: uses only the control group’s SD. Preferable if the treatment changes the spread.
- **d_z**: in a paired design, the mean of the differences divided by their SD. It grows when the two measures are highly correlated.
- **d_av**: in a paired design, the difference divided by the average of the two SDs. More comparable with d from independent groups.
Why the confidence interval matters
An effect size without an interval conveys false precision. With 10 cases per group, a d of 0.8 can, with the same confidence, be anything from almost nothing to enormous. The interval shows it, and reporting standards (APA 7, CONSORT) recommend including it.
How to interpret the magnitude
Cohen’s benchmarks (0.2 small, 0.5 medium, 0.8 large) are a last-resort guide: Cohen himself asked for them to be used only in the absence of anything better. Read the effect in context: in education, 0.4 is considered notable; in medicine, a “small” effect on mortality can save many lives. The probability of superiority helps explain it to someone who does not know d.
Common mistakes
- Reporting only the p value, with no effect size.
- Presenting the d of a paired design as if it were comparable with that of independent groups.
- Using Cohen’s benchmarks as an automatic rule, with no context.
- Forgetting the sign: it shows which group has the higher mean.
- Overlooking that d is biased with small samples: use g.
- Computing the interval with an approximate formula when there are few cases.
Limits of this calculator
- It assumes roughly normal data and, in the independent design, similar spread; if not, Glass’s Δ or a nonparametric test may be more suitable.
- The probability of superiority and the overlap are equivalents that assume normality.
- For three or more groups, use the ANOVA calculator (η² and ω²).
- It accepts up to 5,000 values per group.
Notice
This is an estimate. For publication, check the figures with your usual statistics package and cite the method.
Frequently asked questions
What Cohen’s d counts as meaningful?
Cohen’s benchmarks are 0.2 small, 0.5 medium and 0.8 large, but they depend on the field and should not be applied without context. In education, 0.4 is often considered notable.
When should I use Hedges’ g instead of d?
With small samples, below about 20 cases per group, d overestimates the effect and g corrects it. With large samples they are practically the same.
How is the confidence interval of d calculated?
By inverting the noncentral t distribution: it finds the noncentrality values that place the observed t at the ends of the chosen level. It is the exact method, and it is not symmetric.
What is the difference between d_z and d_av?
In a paired design, d_z divides by the SD of the differences and d_av by the between-person spread. d_z grows with the correlation between measures; d_av is more comparable with independent-groups studies.
Can I calculate d from means and SDs only?
Yes. Choose “Means and SDs” and enter each group’s mean, sample standard deviation and size.
What does an interval that includes zero mean?
That the data are compatible with no difference. It matches a p value above .05 at the 95% level.
What is the probability of superiority?
The probability that a randomly chosen person from one group scores higher than a randomly chosen person from the other. With d = 0.5 it is 64%. It assumes normality.
Is my data sent to a server?
No. The calculation runs in your browser.
Sources and references
The formula behind this calculator is not ours. These are the sources it comes from, in APA 7 format, in case you want to go to the original or cite them in your own work.
- Cohen, J. (1988). Statistical power analysis for the behavioral sciences (2.ª ed.). Lawrence Erlbaum Associates. The definition of d and the 0.2, 0.5 and 0.8 benchmarks.
- Hedges, L. V. (1981). Distribution theory for Glass’s estimator of effect size and related estimators. Journal of Educational Statistics, 6(2), 107–128. https://doi.org/10.3102/10769986006002107 https://doi.org/10.3102/10769986006002107 The bias correction (g) with the exact gamma-function factor.
- Lakens, D. (2013). Calculating and reporting effect sizes to facilitate cumulative science: A practical primer for t-tests and ANOVAs. Frontiers in Psychology, 4, Article 863. https://doi.org/10.3389/fpsyg.2013.00863 https://doi.org/10.3389/fpsyg.2013.00863 Differences between d, dz and d_av and how to report them.
- McGraw, K. O., & Wong, S. P. (1992). A common language effect size statistic. Psychological Bulletin, 111(2), 361–365. https://doi.org/10.1037/0033-2909.111.2.361 https://doi.org/10.1037/0033-2909.111.2.361 The probability of superiority as an intuitive effect measure.
Need to calculate something else?
These tools are often used alongside this calculator.
t-test
Compare two means (independent or paired) or one mean with a value, with p value, confidence interval and…
Power & sample size
How many participants do you need? Work out sample size for a t test, correlation, ANOVA, proportions or…
Confidence interval
The range the true mean is likely to fall in at your chosen confidence level.
ANOVA & post hoc
Compare the means of three or more groups: ANOVA, equal-variance check, Tukey or Games-Howell, effect size…
Sample size
How many responses you need to estimate a percentage or a mean, with finite population, design effect and…
Pearson correlation
Pearson’s r between two variables, with p value, confidence interval, regression line and scatter plot.