# Z-Score Calculator

> Standardises a value against a mean and standard deviation (z = (x − μ) / σ) and reports the corresponding percentile and tail probabilities under the normal distribution.

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

## Purpose

Standardises a value against a mean and standard deviation (z = (x − μ) / σ) and reports the corresponding percentile and tail probabilities under the normal distribution.

**Use when:** You need how many standard deviations a value lies from the mean, or the percentile a value corresponds to in a normally distributed population (test scores, measurements, quality control).

**Do not use when:** You need the probability between two values or the density (use normal-distribution), the data are clearly not normal, or you need the empirical percentile rank within an actual data set (use percentile).

## Input

| Parameter | Type | Unit | Required | Description |
| --- | --- | --- | --- | --- |
| `value` | number |  | required | The observation to standardise. |
| `mean` | number |  | required | Mean of the population or reference distribution. |
| `std_dev` | number |  | required | Standard deviation of the population or reference distribution. (> 0) |

## Output

| Field | Type | Unit | Description |
| --- | --- | --- | --- |
| `z_score` | number |  | (value − mean) / std_dev: distance from the mean in standard deviations. |
| `percentile` | number | % | Percentage of a normal population with values below x: 100 × Φ(z). |
| `probability_below` | number |  | Standard normal CDF Φ(z). |
| `probability_above` | number |  | 1 − Φ(z). |
| `interpretation` | string |  | Plain-language position relative to the mean. |

## Formula

`z = (value − mean) / std_dev; percentile = 100 × Φ(z), where Φ is the standard normal CDF`

Φ is evaluated with the Abramowitz & Stegun 7.1.26 erf approximation (absolute error below 1.5·10⁻⁷). The percentile interpretation assumes the reference population is normally distributed.

## Data Sources

- Wikipedia – Standard score — https://en.wikipedia.org/wiki/Standard_score (reference, retrieved 2026-09-23)
- NIST/SEMATECH e-Handbook of Statistical Methods, 1.3.6.6.1 Normal Distribution — https://www.itl.nist.gov/div898/handbook/eda/section3/eda3661.htm (government, retrieved 2026-09-23)

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/z-score?value=…&mean=…&std_dev=…`
- `POST https://tttkmbb.com/api/v1/calculate/z-score` 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/z-score · OpenAPI operationId `calculate_z_score` 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": "z-score", "inputs": {…}}`

## Example

- x = 1.96 on the standard normal: inputs `{"value":1.96,"mean":0,"std_dev":1}` → `{"z_score":1.96,"percentile":97.5,"probability_below":0.975,"probability_above":0.025}`
- Score 85, mean 70, SD 10: inputs `{"value":85,"mean":70,"std_dev":10}` → `{"z_score":1.5,"percentile":93.32,"probability_below":0.9332,"probability_above":0.0668,"interpretation":"1.5 standard deviations above the mean"}`

```
GET https://tttkmbb.com/api/v1/calculate/z-score?value=1.96&mean=0&std_dev=1
```

## Limitations

You need the probability between two values or the density (use normal-distribution), the data are clearly not normal, or you need the empirical percentile rank within an actual data set (use percentile). Φ is evaluated with the Abramowitz & Stegun 7.1.26 erf approximation (absolute error below 1.5·10⁻⁷). The percentile interpretation assumes the reference population is normally distributed. All values are computed from the formula above; no measurement or live data is involved.

## FAQ

**Should I use the sample or population standard deviation?**

Use the population σ when it is known (e.g. a standardised test). When only a sample is available, the sample s is the usual substitute and the percentile becomes approximate, especially for small samples.

**What is a 'significant' z-score?**

By convention |z| > 1.96 corresponds to the outer 5 % of a normal distribution (two-sided) and |z| > 2.576 to the outer 1 %; values beyond |z| = 3 are often flagged as outliers.

## Related

- [Normal Distribution Calculator](https://tttkmbb.com/statistics/normal-distribution.md) — Probabilities between two values and the density at a point.
- [Percentile Calculator](https://tttkmbb.com/statistics/percentile.md) — Empirical percentile rank within an actual list of values.
- [Descriptive Statistics Calculator](https://tttkmbb.com/statistics/descriptive-statistics.md) — Compute the mean and standard deviation from data first.
