Calculate root mean square error (RMSE), plus MSE and MAE, from lists of observed and predicted values separated by commas, spaces or new lines.
Related Calculators
- Squared Error Calculator
- Standard Error Of Measurement Calculator
- Bias Percentage Calculator
- Spearman Rank Correlation Calculator
- All Statistics Calculators
Calculator Functions
| Function | What it does | What it requires |
|---|---|---|
| Root mean squared error (RMSE) | Finds the square root of the average squared difference between observed and predicted values | Requires a list of observed values and a list of predicted values of the same length |
| Mean squared error (MSE) | Finds the average squared difference between observed and predicted values | Requires a list of observed values and a list of predicted values of the same length |
| Mean absolute error (MAE) | Finds the average size of the differences, ignoring their sign | Requires a list of observed values and a list of predicted values of the same length |
Values are separated by commas, spaces or new lines, so a spreadsheet column can be pasted in, up to 10,000 values per list. The two lists must be in the same order and units. Each function shows the other two measures under its answer, and three sample data sets are available.
RMS Error Formula
| RMSE | Root mean squared error, in the units of the data |
| oแตข | Observed value i |
| pแตข | Predicted value i |
| n | Number of pairs |
| ฮฃ | Sum over all pairs |
Root mean squared error (RMSE)
For observed values 3, 5, 6, 7 and predicted values 2.5, 4.8, 6.1, 7.2, the errors are 0.5, 0.2, โ0.1 and โ0.2. Their squares are 0.25, 0.04, 0.01 and 0.04, which add up to 0.34. Dividing by 4 gives 0.085, and the square root is 0.291548.
Mean squared error (MSE)
This is the RMSE before the square root, so it is in squared units. The same data give 0.34 รท 4 = 0.085.
Mean absolute error (MAE)
The absolute errors 0.5, 0.2, 0.1 and 0.2 add up to 1.0, so the MAE is 1.0 รท 4 = 0.25.
RMSE compared with MAE
The MAE gives every error the same weight. The RMSE gives large errors more weight than small ones, so it is never smaller than the MAE [1]. Observed values of 10, 10, 10, 10 against predictions of 9, 9, 9, 16 have errors of 1, 1, 1 and โ6: the MAE is 2.25 and the RMSE is 3.122499. The RMSE is the better summary when the errors are expected to follow a normal distribution, and reporting both says more than either alone [1].
Limits of This Estimate
- Every pair has equal weight and the sum is divided by n. There is no n โ 1 or fitted-parameter adjustment, so the result can differ from the standard error a regression program reports.
- A score of 0 means the two lists are identical. A lower score only means closer predictions for the same data and units. It does not validate a model on its own [1].
- RMSE and MAE are in the units of the data, and MSE is in squared units. Scores from data on different scales cannot be compared directly.
Sources
- Chai and Draxler, Root mean square error (RMSE) or mean absolute error (MAE)?, Geoscientific Model Development 7 (2014): RMSE and MAE formulas and how the two differ
