Calculate root mean square error (RMSE), plus MSE and MAE, from lists of observed and predicted values separated by commas, spaces or new lines.

Separate values with commas, spaces or new lines (paste a spreadsheet column). Don’t use thousands separators.

Same order and units as the observed values.

Selecting a sample fills both lists.

Optional settings


Related Calculators

Calculator Functions

FunctionWhat it doesWhat it requires
Root mean squared error (RMSE)Finds the square root of the average squared difference between observed and predicted valuesRequires 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 valuesRequires 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 signRequires 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 = โˆš(ฮฃ(oแตข โˆ’ pแตข)ยฒ รท n) [1]
RMSERoot mean squared error, in the units of the data
oแตขObserved value i
pแตขPredicted value i
nNumber 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)

MSE = ฮฃ(oแตข โˆ’ pแตข)ยฒ รท n

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)

MAE = ฮฃ|oแตข โˆ’ pแตข| รท n [1]

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