Relative Error Calculator
If you ever wondered what's the difference between relative and absolute error, our relative error calculator is right up your alley. In the following text, you'll discover the absolute and relative error formulas, together with easy-to-follow examples. We also prepared a short section on the differences between the two types of error, as well as one on the reason why the relative error is considered to be more useful.
Absolute error formula
Absolute error, also called the approximation error, is the absolute value of the difference between the actual value and the measured value. You can express it with the following equation:
absolute error = |actual value - measured value|
The actual value is otherwise known as the real or true value. The measured value, on the other hand, is an approximation.
Very often, we speak about absolute error to indicate how inaccurate a measuring device is. For example, imagine that you have a bathroom scale that only displays the result in full pounds - it can't get more accurate than that. Hence, if you weigh e.g. 140 lbs, you can say that your weight is 140 ± 0.5 lbs, with the measured value equal to 140 lbs and the absolute error equal to 0.5 lb. The actual value will be somewhere between 139.5 and 141.5 lbs.
Remember that the absolute error is expressed in the same unit as the measured and real values. For example, if you measured the height of a tree in feet, the absolute error would also be expressed in feet.
Relative error formula
Relative error (or percent error), on the other hand, expresses the error in terms of a percentage. You can use the following formula:
relative error = |absolute error / actual value| = |(actual value - measured value) / actual value|
Both the absolute and relative errors are typically expressed as positive values, hence the use of absolute values.
The relative error compares the absolute error to the actual value of the property you're measuring. For example, let's say you measure your child's height in a doctor's office to the highest degree of accuracy, so the actual value it's equal to 121.2 cm. When you measure your child at home, you find the measured value to be 120.5 cm.
The relative error is
|(121.2 - 120.5) / 121.2| = 0.00578 = 0.578%
As you can see, the relative error is expressed as a percentage and is unitless. Whether you're analysing length, weight, or temperature, the unit doesn't influence the result.
To know more about calculating percentage error, check our percent error calculator.
How to calculate the absolute error and relative error
You can use our relative error calculator to estimate both the absolute and relative error for any measurement or calculation. Let's analyse the difference between these two types of error with an example.
Let's say you want to determine the value of the square root of two. The value you find online is 1.41421356237, but you wonder how accurate it would be to simply write it rounded to two significant figures.
To find out the absolute error, subtract the approximated value from the real one:
|1.41421356237 - 1.41| = 0.00421356237
Divide this value by the real value to obtain the relative error:
|0.00421356237 / 1.41421356237| = 0.298%
As you can see, the relative error is lower than 1%. In many cases, this is considered a good approximation.
Is my absolute error too high?
The main advantage of the relative error is that, since it can only take values between 0-100%, it's easy to evaluate whether an error is big or small. It's much more challenging to determine whether a specific absolute error is of sufficient accuracy. For example, let's imagine you take measurements of weight with an absolute error of 1 kg:
- If you are weighing apples in a grocery store, and you are planning on buying 2 kg of apples, an absolute error of 1 kg can result in buying up to 50% more or less than you need. You wouldn't want to use such scales in the store, would you?
- When you weigh yourself at home, a 1 kg error makes a substantial difference - after all, you'd like to know whether you weigh 75 or 76 kg. Nevertheless, this error feels more acceptable than in the case of apples.
- However, if you want to weigh a 20-meter-long steel beam that weighs approximately 2 tonnes, you're not interested in a difference of one kilogram - it's a relative error of about 0.05%, which can easily be neglected.
As you can see, the bigger the real value, the higher the accepted absolute error.