Absolute and relative error

The two basic measures of the distance between an exact value and its approximation.

Definition

If x~\tilde{x} approximates xx, the absolute error is Ea=xx~E_a=|x-\tilde{x}| and the relative error is Er=xx~/xE_r=|x-\tilde{x}|/|x| (with x0x\neq0). The relative error is dimensionless and lets you compare errors across very different magnitudes.

How it is used

Use relative error to talk about accuracy (correct digits) and absolute error when the problem's scale is fixed, such as a tolerance in metres.