Skip to article
MethodsSource verified

Root Mean Square Error: Formula, Units, Interpretation and Thesis Reporting

A standards-reference-based equation record for computing RMSE from residuals, explaining why the result is expressed in the target variable's units, comparing model error, and avoiding unsupported claims from a single metric.

Reader outcome

This guide enables a student to calculate root mean square error (RMSE), interpret its units, compare models without overstating what the metric proves, and write a transparent thesis result. It is relevant to prediction, calibration, engineering simulation and model-validation tasks.

Definition

For n observed values (y_i) and corresponding predictions \hat{y}_i, define each residual as:

[ e_i = y_i - \hat{y}_i ]

The root mean square error is:

[ \mathrm{RMSE} = \sqrt{\frac{1}{n}\sum_{i=1}^{n}(y_i-\hat{y}_i)^2} ]

The calculation squares every residual, averages the squared residuals and takes the square root. NIST describes this square-root-of-average-squared-residual construction in a goodness-of-fit context. The square root returns the result to the same units as the target variable, which makes RMSE easier to interpret than mean squared error.

Worked calculation

Suppose a model predicts four temperatures in degrees Celsius.

Case Observed Predicted Residual Squared residual
1 10 11 -1 1
2 12 11 1 1
3 9 10 -1 1
4 14 13 1 1

The mean squared residual is:

[ \frac{1+1+1+1}{4}=1 ]

Therefore:

[ \mathrm{RMSE}=\sqrt{1}=1\ ^\circ\mathrm{C} ]

A plain-language interpretation is: across these four cases, the model’s errors have an RMSE of 1 °C. It is not correct to say that every prediction is wrong by exactly 1 °C; RMSE is an aggregate measure.

Why RMSE responds strongly to large errors

Squaring gives larger residuals disproportionately greater influence. A residual of 4 contributes 16 to the sum, whereas a residual of 2 contributes 4. This can be desirable when large errors are especially costly. It can also make RMSE sensitive to outliers, data errors or rare regimes.

Always inspect the residual distribution and the largest errors. A single RMSE value cannot show bias, skewness, heteroscedasticity, temporal drift or spatial structure.

What “smaller is better” actually means

Within a clearly defined comparison, a smaller RMSE indicates a lower root mean squared error. Valid comparison normally requires the same target variable, units, evaluation cases, preprocessing, prediction horizon and weighting. Comparing an RMSE of 5 for annual revenue measured in millions with an RMSE of 2 for temperature is meaningless.

Even on the same dataset, a lower RMSE does not automatically make a model preferable. Complexity, uncertainty, interpretability, computational cost, physical plausibility and performance on critical subgroups may matter.

Training error versus evaluation error

RMSE calculated on the data used to fit a flexible model can be optimistically small. Use a held-out test set, cross-validation, out-of-sample period or other design appropriate to the research question. Keep model selection separate from final performance estimation where possible.

For simulation studies, explain whether residuals compare the model with experimental measurements, a benchmark solution, field observations or another numerical method. Measurement uncertainty and numerical discretisation error should not be collapsed into one unexplained number.

  • Mean absolute error (MAE) averages absolute residuals and is less dominated by very large errors.
  • Mean squared error (MSE) is RMSE before taking the square root; it is expressed in squared units.
  • Mean error or bias preserves signs and reveals systematic over- or under-prediction, but positive and negative errors can cancel.
  • describes explained variation under a model context and does not replace an absolute error metric.
  • Normalised RMSE can aid comparison across scales, but the denominator—range, mean, standard deviation or another reference—must be stated because different definitions produce different values.

A strong evaluation often reports RMSE with at least one complementary metric and a residual plot.

Software implementation patterns

R

observed  <- c(10, 12, 9, 14)
predicted <- c(11, 11, 10, 13)
rmse <- sqrt(mean((observed - predicted)^2))
rmse

Python

import math

observed = [10, 12, 9, 14]
predicted = [11, 11, 10, 13]
rmse = math.sqrt(sum((y - y_hat) ** 2 for y, y_hat in zip(observed, predicted)) / len(observed))
print(rmse)

Confirm how a library handles missing values, weights, multi-output targets and sample denominators. Do not mix a custom calculation using n with a software function that applies a different weighting or reduction rule without explanation.

Thesis reporting template

Model performance was evaluated on the held-out 2025 test set using root mean square error, (\sqrt{n^{-1}\sum(y_i-\hat{y}_i)^2}). The model produced an RMSE of 1.0 °C across four observations. Because RMSE is expressed in the target variable’s units and gives greater influence to larger residuals, it was interpreted alongside MAE, mean error and residual plots. The result applies to the stated evaluation set and should not be generalised to untested operating conditions.

Adapt the formula to weighted or grouped designs where required. State the dataset, sample size, units, software, model version and whether the result is cross-validated or from a final holdout set.

Common mistakes

  • Omitting units.
  • Comparing RMSE values from different targets, scales or evaluation samples.
  • Calling RMSE a percentage when no percentage normalisation was used.
  • Calculating and reporting only training RMSE.
  • Ignoring missing-value or weighting rules.
  • Treating lower RMSE as proof that a model is unbiased or physically valid.
  • Reporting excessive decimal places relative to measurement precision.
  • Using “accuracy” as an undefined synonym for RMSE.

Source and verification notes

The formula and goodness-of-fit interpretation are anchored to NIST. The same-units explanation is supported by the official scikit-learn model-evaluation documentation. The table, code and reporting example are original and synthetic. Researchers must decide whether RMSE is suitable for the specific engineering or statistical application and evaluation design.

Evidence record

Sources and verification

Links are preserved so readers can inspect the controlling documentation or underlying research.

  1. Motivation: How do we construct a goodness-of-fit metric for a model?National Institute of Standards and TechnologyAccessed 27 July 2026
  2. Metrics and scoring: quantifying the quality of predictionsscikit-learn projectAccessed 27 July 2026
Human review

Authorship and review

Author
PT Writers Research and Editorial Team
Reviewer
PT Writers Editorial Review
Review scope
Factual and editorial review
Current status
Source verified
Cite this article

Copy a formatted citation

Select the required referencing style, review the generated citation and copy it without leaving the guide.

PT Writers Research and Editorial Team. (2026). Root Mean Square Error: Formula, Units, Interpretation and Thesis Reporting. PT Writers. https://ptwriters.org/blog/root-mean-square-error/