# Percent Error Calculator

> Compares a measured or estimated value with the accepted (true) value and reports the absolute error, relative error, percent error and whether the measurement over- or underestimates.

- Calculator id: `percent-error` · Category: Math (`math`) · Tool name: `calculate_percent_error`
- Canonical page: https://tttkmbb.com/math/percent-error · This document: https://tttkmbb.com/math/percent-error.md · JSON definition: https://tttkmbb.com/math/percent-error.json

## Purpose

Compares a measured or estimated value with the accepted (true) value and reports the absolute error, relative error, percent error and whether the measurement over- or underestimates.

**Use when:** You have an experimental, estimated or approximated value and a reference value and need the error as a percentage of the reference, e.g. in a physics lab or to judge an approximation.

**Do not use when:** You want the percentage change between two values over time (use percentage-change) or the symmetric percent difference between two equally valid measurements (also percentage-change).

## Input

| Parameter | Type | Unit | Required | Description |
| --- | --- | --- | --- | --- |
| `measured` | number |  | required | The observed, estimated or approximate value. |
| `accepted` | number |  | required | The reference, theoretical or exact value. Must not be 0. |

## Output

| Field | Type | Unit | Description |
| --- | --- | --- | --- |
| `absolute_error` | number |  | \|measured − accepted\|, in the units of the values. |
| `relative_error` | number |  | \|measured − accepted\| / \|accepted\|, as a plain ratio. |
| `percent_error` | number | % | Relative error × 100. |
| `signed_error` | number |  | measured − accepted (negative when the measurement is too low). |
| `signed_percent_error` | number | % | (measured − accepted) / \|accepted\| × 100. |
| `direction` | string |  | 'overestimate', 'underestimate' or 'exact'. |
| `accuracy_percent` | number | % | 100 − percent error (can be negative for errors above 100%). |

## Formula

`absolute_error = |measured − accepted|; relative_error = absolute_error / |accepted|; percent_error = relative_error × 100; signed_percent_error = (measured − accepted) / |accepted| × 100`

## Data Sources

- Wikipedia – Approximation error — https://en.wikipedia.org/wiki/Approximation_error (reference, retrieved 2026-09-24)
- Wolfram MathWorld – Relative Error — https://mathworld.wolfram.com/RelativeError.html (reference, retrieved 2026-09-24)
- Wolfram MathWorld – Percentage Error — https://mathworld.wolfram.com/PercentageError.html (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/percent-error?measured=…&accepted=…`
- `POST https://tttkmbb.com/api/v1/calculate/percent-error` 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/percent-error · OpenAPI operationId `calculate_percent_error` 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": "percent-error", "inputs": {…}}`

## Example

- g measured 9.5 vs 9.81 m/s²: inputs `{"measured":9.5,"accepted":9.81}` → `{"absolute_error":0.31,"relative_error":0.0316,"percent_error":3.16,"signed_error":-0.31,"signed_percent_error":-3.16,"direction":"underestimate","accuracy_percent":96.84}`
- 105 vs 100: inputs `{"measured":105,"accepted":100}` → `{"absolute_error":5,"relative_error":0.05,"percent_error":5,"signed_error":5,"direction":"overestimate","accuracy_percent":95}`

```
GET https://tttkmbb.com/api/v1/calculate/percent-error?measured=9.5&accepted=9.81
```

## Limitations

You want the percentage change between two values over time (use percentage-change) or the symmetric percent difference between two equally valid measurements (also percentage-change). All values are computed from the formula above; no measurement or live data is involved.

## FAQ

**Is percent error the same as percent difference?**

No. Percent error divides by the accepted value (one value is the reference); percent difference divides by the average of two values that are equally valid. Use percentage-change for the latter.

**Should percent error be reported with a sign?**

Most lab conventions report the absolute (unsigned) value; signed_percent_error is provided when the direction of the bias matters.

## Related

- [Percentage Change Calculator](https://tttkmbb.com/math/percentage-change.md) — Relative change and symmetric percent difference.
- [Percentage Calculator](https://tttkmbb.com/math/percentage.md) — General percent-of and what-percent questions.
- [Rounding Calculator](https://tttkmbb.com/math/rounding.md) — Round the reported error to significant figures.
