Change language

Statistics

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.

Published by SolucionesAhora.com How we verify

Calculator inputs

  1. Enter your figures, or press “See example” to watch it work.
  2. If your case is unusual, open “Advanced options”.
  3. Read the result and, below it, what it means and how it was worked out.

Choose how you will enter the data. “Two groups” means different people in each group; “before and after” means the same people measured twice (a paired design changes the calculation); “means and SDs” is for when you only have the summary statistics from a paper.

The values of the first group. In a paired design it is the first measure (for example “after”), and the difference is measure 1 minus measure 2; both lists must be in the same order and the same length.

Values separated by commas or spaces

The values of the second group (or the second measure, for example “before”). The sign of the result shows which group has the higher mean: positive if it is the first.

Values separated by commas or spaces

The mean of the first group, as reported in the paper or in your descriptive table.

The sample standard deviation of the first group (the one almost every program and paper reports).

Sample SD (n − 1)

How many people or cases the first group has.

At least 2

The mean of the second group (the comparison or control group).

The sample standard deviation of the second group.

Sample SD (n − 1)

How many people or cases the second group has.

At least 2

Advanced options

The intervals are computed at this level. 95% is the standard in almost every journal; 99% gives wider intervals and 90% narrower ones.

See the result

Results

Cohen’s d-2.656
Hedges’ g (corrected)-2.451
CI of g: lower limit-3.908
CI of g: upper limit-0.934
CI of d: lower limit-4.236
CI of d: upper limit-1.012
Magnitude (Cohen’s benchmarks)large
Glass’s Δ (group 2 SD)-2.711
Equivalent r-0.824
Probability of superiority (%)97.0
Overlap of the distributions (%)18.4
Student’s t-4.600
Degrees of freedom10
p valuep < 0.001
Mean difference (group 1 − group 2)-3.8333
CI of the difference: lower-5.6901
CI of the difference: upper-1.9766
Sentence for your report (APA style)t(10) = −4.60, p < .001, g = −2.45, 95% CI [−3.91, −0.93]
See the working step by step
  1. Mean difference (group 1 − group 2) = -3.8333 (95% CI: -5.6901 to -1.9766)
  2. t(10) = -4.600, p < 0.001
  3. Equivalent r = -0.824
  4. Glass’s Δ (using group 2’s SD) = -2.711
Free, no sign-up! What if you could do this without a calculator? A five-minute game with challenges, lives and points. It clicks even when you cannot be bothered.

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.

  1. 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.
  2. 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.
  3. 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.
  4. 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.