# Cohen's d Effect Size Calculator

> Computes the standardised difference between two group means with the pooled standard deviation (Cohen's d), the small-sample corrected Hedges' g, Glass's Δ and the common-language effect size, with Cohen's small/medium/large interpretation.

- Calculator id: `cohens-d` · Category: Statistics & Probability (`statistics`) · Tool name: `calculate_cohens_d`
- Canonical page: https://tttkmbb.com/statistics/cohens-d · This document: https://tttkmbb.com/statistics/cohens-d.md · JSON definition: https://tttkmbb.com/statistics/cohens-d.json

## Purpose

Computes the standardised difference between two group means with the pooled standard deviation (Cohen's d), the small-sample corrected Hedges' g, Glass's Δ and the common-language effect size, with Cohen's small/medium/large interpretation.

**Use when:** You want to express how large the difference between two groups is in standard-deviation units, e.g. for reporting alongside a t-test, power analysis or meta-analysis.

**Do not use when:** You need to know whether the difference is statistically significant (use t-test), the outcome is binary (use odds-ratio), or the groups are paired (d for paired designs uses the SD of the differences).

## Input

| Parameter | Type | Unit | Required | Description |
| --- | --- | --- | --- | --- |
| `mean_a` | number |  | required | Sample mean of the first (treatment) group. |
| `sd_a` | number |  | required | Sample standard deviation (n − 1) of group A. (> 0) |
| `n_a` | integer |  | required | Sample size of group A. (min 2) |
| `mean_b` | number |  | required | Sample mean of the second (control) group. |
| `sd_b` | number |  | required | Sample standard deviation of group B (used alone for Glass's Δ). (> 0) |
| `n_b` | integer |  | required | Sample size of group B. (min 2) |

## Output

| Field | Type | Unit | Description |
| --- | --- | --- | --- |
| `cohens_d` | number |  | (mean_a − mean_b) / pooled SD. Positive when A is higher. |
| `hedges_g` | number |  | d × (1 − 3 / (4(n_a + n_b) − 9)): bias-corrected d for small samples. |
| `glass_delta` | number |  | (mean_a − mean_b) / sd_b: uses only the control group's SD. |
| `pooled_sd` | number |  | √(((n_a − 1) sd_a² + (n_b − 1) sd_b²) / (n_a + n_b − 2)). |
| `mean_difference` | number |  | mean_a − mean_b in the original units. |
| `common_language_effect_size` | number |  | Φ(d / √2): probability that a random member of A scores higher than a random member of B (normal, equal variances). |
| `interpretation` | string |  | Cohen's benchmarks on \|d\|: < 0.2 negligible, 0.2 small, 0.5 medium, 0.8 large. |

## Formula

`pooled_sd = √(((n_a − 1)·sd_a² + (n_b − 1)·sd_b²) / (n_a + n_b − 2)); d = (mean_a − mean_b) / pooled_sd; g = d × (1 − 3 / (4(n_a + n_b) − 9)); Δ = (mean_a − mean_b) / sd_b; CLES = Φ(d / √2)`

Hedges' correction uses the Hedges (1981) approximation of the exact gamma-function factor (difference below 0.1 % for n_a + n_b ≥ 20). Cohen's benchmarks are conventions, not thresholds of practical importance.

## Data Sources

- Cohen J (1988) Statistical Power Analysis for the Behavioral Sciences, 2nd ed., Lawrence Erlbaum — https://doi.org/10.4324/9780203771587 (textbook, retrieved 2026-09-24)
- Wikipedia – Effect size — https://en.wikipedia.org/wiki/Effect_size (reference, retrieved 2026-09-24)

Data freshness: `static`. Deterministic formula with fixed constants; results never go stale. Inputs supplied by the caller determine the output.

## API

- `GET https://tttkmbb.com/api/v1/calculate/cohens-d?mean_a=…&sd_a=…&n_a=…&mean_b=…&sd_b=…&n_b=…`
- `POST https://tttkmbb.com/api/v1/calculate/cohens-d` with JSON body `{"inputs": {…}}`
- Response: unified envelope (`success`, `request`, `result.values`, `result.units`, `sources`, `freshness`, `timestamp`, `next_actions`, `links`); see https://tttkmbb.com/docs/response-format.md
- Schema: https://tttkmbb.com/api/v1/calculators/cohens-d · OpenAPI operationId `calculate_cohens_d` in https://tttkmbb.com/openapi.json
- Authentication: none. Rate limit: fair use, see https://tttkmbb.com/docs/rate-limits.md.

## MCP

- Server: `https://tttkmbb.com/mcp` (Streamable HTTP, JSON-RPC 2.0, no auth)
- Tool:  `run_calculator` with `{"calculator_id": "cohens-d", "inputs": {…}}`

## Example

- 105 vs 100, SD 15, n = 30 each: inputs `{"mean_a":105,"sd_a":15,"n_a":30,"mean_b":100,"sd_b":15,"n_b":30}` → `{"cohens_d":0.3333,"hedges_g":0.329,"glass_delta":0.3333,"pooled_sd":15,"mean_difference":5,"common_language_effect_size":0.5932,"interpretation":"Small"}`
- 12 (SD 2, n 20) vs 10 (SD 3, n 25): inputs `{"mean_a":12,"sd_a":2,"n_a":20,"mean_b":10,"sd_b":3,"n_b":25}` → `{"cohens_d":0.7675,"hedges_g":0.754,"glass_delta":0.6667,"pooled_sd":2.6059,"common_language_effect_size":0.7063,"interpretation":"Medium"}`

```
GET https://tttkmbb.com/api/v1/calculate/cohens-d?mean_a=105&sd_a=15&n_a=30&mean_b=100&sd_b=15&n_b=30
```

## Limitations

You need to know whether the difference is statistically significant (use t-test), the outcome is binary (use odds-ratio), or the groups are paired (d for paired designs uses the SD of the differences). Hedges' correction uses the Hedges (1981) approximation of the exact gamma-function factor (difference below 0.1 % for n_a + n_b ≥ 20). Cohen's benchmarks are conventions, not thresholds of practical importance. All values are computed from the formula above; no measurement or live data is involved.

## FAQ

**d or g?**

They differ only by the small-sample correction; report Hedges' g when either group has fewer than about 20 observations, otherwise the two are practically identical.

**When is Glass's Δ preferred?**

When the intervention changes the spread of the treated group, so the control group's SD is the better yardstick.

**Can d be larger than 1?**

Yes. d is a ratio of the mean difference to the SD and is unbounded; d = 1 means the means are one standard deviation apart.

## Related

- [T-Test Calculator](https://tttkmbb.com/statistics/t-test.md) — Test whether the same difference is statistically significant.
- [Descriptive Statistics Calculator](https://tttkmbb.com/statistics/descriptive-statistics.md) — Get each group's mean and SD from raw data.
