How to Calculate Root Mean Squared Error (RMSE) – Excel and Google Sheets

Written by

Editorial Team

Reviewed by

Steve Rynearson

Last updated on August 29, 2022

This tutorial will demonstrate how to calculate Root Mean Squared Error (RMSE) in Excel and Google Sheets.

How to Calculate Root Mean Square Error Main

The Root Mean Squared Error (RMSE) is an estimate that measures the square root of the average squared difference between the estimated values and the actual values of a dataset.In regression analysis, the RMSE calculates the square root of the average squared differences between the points and the regression line. That is, the square root of the mean of the squares of the residuals.

The RMSE measures the accuracy of forecasting errors produced by different forecasting models for a particular dataset and not between datasets. The RMSE is always positive, and decreases as the error in the forecasts decrease. That is, the closer the predicted values are to the actual values, the smaller the RMSE.

The Root Mean Squared Error (RMSE) is the square root of the Mean Squared Error (MSE). The RMSE of a set of observations is calculated using the formula:

How to Calculate-Root Mean Square Error 001

where Oi are the observed values;

Ei are the expected values;

∑ is a Greek letter called sigma which represents ‘sum’; and

n is the sample size (the number of observations).

 

How to Calculate Root Mean Squared Error in Excel

Background: The table below shows the biannual expected and the actual spending, in thousands of dollars, on residential and non-residential building construction for a certain state in the United States from January 2015 to July 2020.

Using the data in the table, calculate the root mean squared error (RMSE) of the actual data from the forecasted data.

How to Calculate Root Mean Square Error 002

Method 1: SUMSQ Function

First, obtain the difference between the predicted values and the actual values.

How to Calculate Root Mean Square Error 003

Note: Double-Click the bottom right corner of the cell to fill-down the data to the rest of the column.

rmse difference column

Next, calculate the MSE using the SUMSQ Function.

=SUMSQ(D2:D13)/COUNT(D2:D13)

How to Calculate Root Mean Square Error 004

Finally, calculate the RMSE by taking the square root of the MSE.

=SQRT(G3)

How to Calculate Root Mean Square Error 005

 

Method 2: AVERAGE Function

Another method you can use to obtain the RMSE of a dataset is using the AVERAGE function. This method is described below.

First, perform the steps described in the method illustrated in the SUMSQ Function method above to obtain the difference between the predicted values and the actual values as shown in the picture below.

How to Calculate Root Mean Square Error 003

Next, calculate the square of the differences between the actual and the predicted values.

=D2^2

How to Calculate Root Mean Square Error 006

Next, calculate the MSE by taking the average of the Square of Differences column.

=AVERAGE(E2:E13)

How to Calculate Root Mean Square Error 007

Finally, calculate the RMSE by taking the square root of the MSE.

How to Calculate Root Mean Square Error 008

 

Method 3: The RMSE Formula

Another method you can use to calculate the RMSE of a dataset is using the RMSE formula. This is done by taking sum of the Square of Differences and dividing it by the count (sample size), and then taking the square root of the result as shown in the picture below.

How to Calculate Root Mean Square Error 009

 

Root Mean Squared Error in Google Sheets

The Root Mean Squared Error (RMSE) can be calculated in Google Sheets in the exact same way as it is calculated in Excel as shown in the pictures below.

First, calculate the MSE as shown in the pictures below.

How to Calculate Root Mean Square Error G001

How to Calculate Root Mean Square Error G002

Then, calculate the RMSE by taking the square root of the MSE.

How to Calculate Root Mean Square Error G003

AI Formula Generator

Try for Free