How to Calculate the RMSE or Root Mean Squared Error

By Tricia Lobo; Updated April 24, 2017
Means and squared numbers can be quantified quickly with a calculator.

When you graph several scientific data points, you may wish to fit a best-fit curve to your points, using software. However, the curve will not match your data points exactly, and when it doesn't, you may wish to calculate the root mean squared error (RMSE), in order to gauge the extent to which your data points vary from your curve. For each data point, the RMSE formula calculates the difference between the actual value of the data point, and the value of the data point on the best-fit curve.

Find the corresponding y-value on your best-fit curve for each value of x corresponding to your original data points.

Subtract the actual value of y from the value of y on your best-fit curve, for each data point that you have. The difference between the actual value of y and the value of y on your best-fit curve is called the residual. Square each residual, then sum your residuals.

Divide the sum of your residuals by the total number of data points that you have, and take the square root of the quotient. This gives the root mean squared error.

About the Author

Tricia Lobo has been writing since 2006. Her biomedical engineering research, "Biocompatible and pH sensitive PLGA encapsulated MnO nanocrystals for molecular and cellular MRI," was accepted in 2010 for publication in the journal "Nanoletters." Lobo earned her Bachelor of Science in biomedical engineering, with distinction, from Yale in 2010.