Absolute and Relative Error Calculator
Written by Thierno Sadou Diallo, formula verified per our methodology • Last checked on 9/10/2026
The absolute error is the difference, in absolute value, between a measured value and the true value: |measured − true value|. The relative error expresses this gap as a percentage of the true value. For a measurement of 98 versus a true value of 100, the absolute error is 2 and the relative error is 2%.
Explanation
The absolute error simply measures the raw gap between a measured (or calculated, or approximate) value and a value considered true or reference — in the same unit as the compared values. This information alone remains hard to interpret without context: a gap of 2 on a measurement of 100,000 is negligible, while a gap of 2 on a measurement of 3 is huge. The relative error solves this problem by expressing the absolute error as a percentage of the true value, making it directly comparable from one measurement to another, whatever their scale — a principle very close to that of our percentage change calculator, which also compares two values in proportion to each other, though in a different context (a change over time rather than a gap from a reference). These two notions of error are central in experimental science and numerical analysis: they quantify the precision of a physical measurement, the quality of a numerical approximation (for example, how close a square root or nth root computed by an iterative method comes to the exact value), or the reliability of a predictive model against a real observation. One point deserves attention: the relative error is only defined if the true value is non-zero, since it involves dividing by that value — comparing a gap to a reference of zero has, by construction, no meaning as a percentage.
Example: measurement of 98 for a true value of 100
Inputs
Measured value: 98. True value: 100.
Calculation
Absolute error = |98 − 100| = 2. Relative error = (2 ÷ |100|) × 100 = 2%.
Result
This measurement has an absolute error of 2 and a relative error of 2%.
Frequently asked questions
Why use an absolute value in both formulas?
Because an error, absolute or relative, measures the size of a gap, not its direction: a measurement of 98 for a true value of 100 (underestimate) and a measurement of 102 for the same true value (overestimate) represent the same error size, 2 units in both cases. Without an absolute value, an underestimate would give a negative error, which would complicate any comparison between several measurements without adding useful information.
What should you do if the true value is zero?
The relative error is then not mathematically defined, since it would require dividing by zero: this calculator shows this case as non-computable rather than a misleading result. The absolute error, however, remains perfectly valid in that case — it simply reduces to the absolute value of the measurement itself.
Which error should you use to compare two different measurements?
The relative error is almost always the better choice for comparing measurements of different scales, since it expresses each gap proportionally to its own reference. The absolute error stays useful when the unit of measurement itself carries direct practical meaning — for example, knowing that a kitchen scale is off by 2 grams is meaningful in itself, without necessarily going through a percentage.