What it means
When an analyst builds a model to predict something, such as monthly sales from advertising spend, the model will not be perfect. The difference between each actual value and the value the model predicts is called a residual.
If the residuals were simply added up, positive and negative errors would cancel out and hide the problem. To avoid this, each residual is squared before adding, which makes every error positive and gives extra weight to large misses.
The total is the residual sum of squares, often abbreviated RSS and sometimes called the sum of squared errors. The most common method of fitting a straight line, ordinary least squares, works by choosing the line that makes this figure as small as possible.
On its own, the figure is hard to interpret because it depends on the units and the number of data points. It is therefore usually compared with the total sum of squares, which measures how much the data vary around their average, to give R-squared, a measure of the share of variation the model explains.
Finance teams meet the idea in forecasting, regression analysis, pricing models and risk models. A lower figure on new data suggests that a model predicts well, but a model can also fit its training data too closely and perform poorly on fresh data, a problem called overfitting.
Care is needed in reading the result. A tiny figure does not prove cause and effect, and the pattern of the residuals matters, since a systematic pattern suggests the model is missing something important.
In practice
Real-world examples.
Example
A retailer fits a line relating weekly advertising spend to sales across 52 weeks. The analyst compares the residual sum of squares for a model using only advertising with one that also uses seasonality, and picks the model with the lower value.
Example
A bank's risk team builds a model that predicts loan losses from unemployment and house prices. It tests the residual sum of squares on a hold-out sample the model has not seen, to check that the fit is not just a result of overfitting.
Example
A subscription business predicts customer numbers from marketing spend. The finance manager plots the residuals and notices they are all positive in December, which shows that the model misses a seasonal peak.
Formula
Calculation
Residual sum of squares = sum of (actual value - predicted value) squared; R-squared = 1 - (residual sum of squares / total sum of squares).
Suppose a regression predicts monthly sales for five months. Working in thousands of dollars, actual sales are 52, 48, 61, 55 and 64, while the model predicts 50, 49, 58, 57 and 62. The residuals are 2, -1, 3, -2 and 2, so RSS = 4 + 1 + 9 + 4 + 4 = 22. The average of actual sales = (52 + 48 + 61 + 55 + 64) / 5 = 56, and the total sum of squares = 16 + 64 + 25 + 1 + 64 = 170. R-squared = 1 - 22 / 170 = 1 - 0.1294 = 0.8706, so the model explains about 87% of the variation in sales.Case study
Seen in the real world.
Cobalt Foods is an illustrative, fictional beverage company that used a simple model to forecast monthly demand from average temperature. The model's residual sum of squares was acceptable overall, but the planners were still surprised by stock-outs.
When the analyst examined the individual residuals, she found large positive errors in every month with a public holiday. Adding a holiday variable cut the residual sum of squares from 3,400 to 1,100 on the same data, using units of squared thousands of cases.
The improved model reduced stock-outs and cut safety stock by about $250,000 in the following year. The illustrative lesson is that looking at the pattern of the residuals, and not just the total, shows what a model is missing.
Watch out
Common mistakes.
- Adding the raw residuals instead of the squared residuals, which lets positive and negative errors cancel and hides a poor fit.
- Choosing a model solely because it has the lowest residual sum of squares on past data, which can reward overfitting.
- Comparing the figure across datasets of different size or units, when it is only meaningful relative to the same data.
Questions
People also ask.
Why are the residuals squared?
Squaring removes the signs and gives bigger errors more weight, which makes the measure sensitive to large misses and mathematically convenient to minimise.
What is a good residual sum of squares?
There is no universal benchmark, because it depends on the scale of the data, so it is judged relative to the total sum of squares or against alternative models.
How is it related to R-squared?
R-squared equals one minus the residual sum of squares divided by the total sum of squares, so a smaller residual sum of squares gives a higher R-squared.
From the founder's library

Take it further with the book.
Build your financial confidence beyond this definition. Shihan's full-length guide, Accounting Fundamentals, takes the same plain-English approach and turns it into a complete, practical playbook for non-finance managers, business owners and students - with chapter-end quiz answers and presentation slides included.
25% off with code MMHQ25, applied at checkout. Priced in USD - checkout may show the equivalent in your local currency.
View the book and save 25%Related
