Skip to main content
Library homepage
Engineering LibreTexts

3.3: Absolute and Relative Error

  • Page ID
  • \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \) \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)\(\newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\) \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\) \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\) \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\) \( \newcommand{\Span}{\mathrm{span}}\) \(\newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\) \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\) \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\) \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\) \( \newcommand{\Span}{\mathrm{span}}\)\(\newcommand{\AA}{\unicode[.8,0]{x212B}}\)

    There are two ways of thinking about numerical errors. The first is absolute error, or the difference between the correct value and the approximation. We often write the magnitude of the error, ignoring its sign, when it doesn’t matter whether the approximation is too high or too low.

    The second way to think about numerical errors is relative error, where the error is expressed as a fraction (or percentage) of the exact value.

    For example, we might want to estimate \(9!\) using the formula \(\sqrt {18 \pi} ( 9 / e)^9\). The exact answer is \(9 \cdot 8 \cdot 7 \cdot 6 \cdot 5 \cdot 4 \cdot 3 \cdot 2 \cdot 1 = 362,880\). The approximation is \(359,536.87\). So the absolute error is \(3,343.13\).

    At first glance, that sounds like a lot—we’re off by three thousand—but we should consider the size of the thing we are estimating. For example, $3,000 matters a lot if we’re talking about an annual salary, but not at all if we’re talking about the national debt.

    A natural way to handle this problem is to use relative error. In this case, we would divide the error by \(362,880\), yielding \(0.00921\), which is just less than 1 percent. For many purposes, being off by 1 percent is good enough.

    This page titled 3.3: Absolute and Relative Error is shared under a CC BY-NC-SA 4.0 license and was authored, remixed, and/or curated by Carey Smith via source content that was edited to the style and standards of the LibreTexts platform; a detailed edit history is available upon request.