Evaluate regression model performance using MSE, RMSE, MAE, MAPE, and R². Enter your actual and predicted values, then visualize the fit with scatter and residual plots.
Mean Squared Error (MSE) is a fundamental metric in statistics and machine learning that quantifies the average squared difference between actual values and predicted values. It measures the quality of a regression model or forecasting method: the lower the MSE, the better the model fits the data. MSE is widely used because it penalizes large errors more heavily than small ones, making it sensitive to outliers — a feature that can be both an advantage and a limitation.
MSE = (1/n) ∑ (yi − ŷi)2
where yi is the actual value, ŷi is the predicted value, and n is the number of observations.
Beyond MSE, this calculator also provides RMSE (Root Mean Squared Error), MAE (Mean Absolute Error), MAPE (Mean Absolute Percentage Error), and R² (Coefficient of Determination). Together, these metrics offer a comprehensive view of model performance, helping you diagnose bias, variance, and overall predictive power.
MSE is the average of the squared residuals. Because the errors are squared, MSE gives more weight to large errors. This makes it sensitive to outliers — a single large error can significantly inflate the MSE. Mathematically, MSE is always non‑negative, and a value of 0 indicates a perfect fit.
RMSE is the square root of MSE. It has the same units as the target variable, making it more interpretable. For example, if you are predicting house prices in dollars, RMSE is expressed in dollars. RMSE is often preferred over MSE because it is on the same scale as the data.
MAE is the average of the absolute residuals. Unlike MSE, MAE does not square the errors, so it treats all errors equally and is less sensitive to outliers. MAE is robust and easy to interpret: it tells you the average absolute deviation of predictions from actuals.
MAPE expresses the error as a percentage of the actual values. It is scale‑independent, making it useful for comparing models across different datasets. However, MAPE can be undefined or highly skewed when actual values are close to zero. In this calculator, MAPE is computed only over observations where the actual value is non‑zero; if all actual values are zero, MAPE is shown as N/A.
R² measures the proportion of variance in the dependent variable that is predictable from the independent variable(s). It ranges from 0 to 1 (or negative in some cases). An R² of 1 means the model explains all the variance, while an R² of 0 means the model explains none. R² is widely used but should be interpreted with caution, especially with nonlinear relationships or overfitting.
A retail company uses a time‑series model to forecast weekly sales. After deploying the model, the data science team computes the following metrics on a hold‑out set: MSE = 1250, RMSE = 35.36, MAE = 28.50, MAPE = 4.2%, and R² = 0.92. The RMSE of $35.36 indicates that, on average, the predictions deviate from actual sales by about $35. The MAPE of 4.2% is excellent for retail forecasting. However, the residual plot reveals a slight pattern — residuals are larger for high‑volume weeks — suggesting the model may benefit from a log‑transformation or a more sophisticated architecture. This kind of diagnostic insight is exactly what our interactive MSE calculator empowers you to discover.