Intermediate

Residual Calculator — Observed minus Predicted

Enter your observed values and the corresponding predicted values from a regression or forecast model. The calculator computes each residual (observed − predicted), the residual sum of squares (RSS), mean squared error (MSE) and root mean squared error (RMSE), plus a residual plot so you can visually check for patterns.
RMSE (Root Mean Squared Error)
0,8367

Typical magnitude of prediction error — in the same units as your data

Residual Sum of Squares (RSS)
3,5
Mean Squared Error (MSE)
0,7
Mean residual
0
Max absolute residual
1
Datapisteet
5
Residuals
1.00, -1.00, 0.50, -1.00, 0.50
1.00-1.000.50-1.000.50
Step by step
  1. 1

    Residual sum of squares (RSS)

    3,5
    Sum of (observed − predicted)² for each data point.
  2. 2

    Mean squared error (MSE)

    3,5 ÷ 5 = 0,7
  3. 3

    RMSE

    √0,7 = 0,8367
    Square root of MSE — the typical prediction error in the original data units.
Tulokset ovat arvioita ja tarkoitettu vain yleiseen tiedoksi, eivätkä ne ole ammattilaisen neuvoja — varmista aina tärkeät tulokset itsenäisesti ennen kuin luotat niihin. Lue koko vastuuvapauslauseke.
Pikavastaus

Miten tämä laskin toimii?

Residual = observed − predicted. RSS = sum of squared residuals; RMSE = √(RSS/n) measures typical prediction error in the original units. Enter your observed and predicted value lists to get residuals, error metrics and a residual plot to diagnose model fit.

Kaava
Residual eᵢ = yᵢ − ŷᵢ • RSS = Σeᵢ² • MSE = RSS/n • RMSE = √MSE
How this is calculated

A residual is the difference between an observed data point and the value predicted by a model: eᵢ = yᵢ − ŷᵢ. Positive residuals mean the model under-predicted; negative residuals mean it over-predicted. A perfect model would have all residuals equal to zero.

The residual sum of squares (RSS) accumulates the squared residuals: RSS = Σeᵢ². Squaring has two effects: negative and positive errors are treated equally, and larger errors are penalised more heavily than small ones. Dividing RSS by the number of data points n gives the mean squared error (MSE), and taking the square root converts it back to the original data units to give the root mean squared error (RMSE). RMSE is the most intuitive single-number summary of model accuracy — an RMSE of 2.5 means the model is off by about 2.5 units on average.

The residual plot (residuals vs. observation index) is a diagnostic tool. In a well-fitted model residuals should look random and roughly centred on zero. A clear pattern — such as a curve, a trend, or growing spread — suggests the model is missing structure in the data (non-linearity, heteroscedasticity) and may need to be revised.

Usein kysytyt kysymykset

A residual of exactly zero means the model predicted that data point perfectly. In practice this is unusual; small non-zero residuals are normal and expected. A model with all zero residuals on training data is likely overfitted.

MSE (mean squared error) averages the squared residuals, so its unit is the square of the data unit (e.g. metres² if data is in metres). RMSE is the square root of MSE, returning the error to the original data unit, which makes it easier to interpret as "typical prediction error."

For ordinary least squares (OLS) linear regression fitted with an intercept, the sum of residuals is exactly zero by construction, making the mean residual zero. For other models (no-intercept regression, non-linear models, manual predictions) this is not guaranteed. A non-zero mean residual signals systematic bias — the model consistently over- or under-predicts.

Tunnetaan myös nimellä

observed minus predicted
residual sum of squares
rmse calculator
regression residuals
prediction error
mean squared error
model fit residuals

APA

TG we-Calculate Editorial Team. (2026). Residual Calculator — Observed minus Predicted [Online calculator]. TG we-Calculate. https://we-calculate.com/fi/calculator/residual-calculator

Chicago

TG we-Calculate Editorial Team. "Residual Calculator — Observed minus Predicted." TG we-Calculate. 2026. https://we-calculate.com/fi/calculator/residual-calculator.

IEEE

TG we-Calculate Editorial Team, "Residual Calculator — Observed minus Predicted," TG we-Calculate, 2026. [Online]. Available: https://we-calculate.com/fi/calculator/residual-calculator

BibTeX

@misc{wecalculate_residual_calculator, title = {Residual Calculator — Observed minus Predicted}, author = {{TG we-Calculate Editorial Team}}, howpublished = {\url{https://we-calculate.com/fi/calculator/residual-calculator}}, year = {2026}, note = {TG we-Calculate} }

Oliko tästä laskimesta sinulle apua?