Back to Glossary

Sum Of Squares

The sum of squares is a statistical measure of how spread out a set of numbers is, found by taking each value's distance from the average, squaring that distance and adding the results together. A small total means the numbers cluster tightly around the average, while a large total means they are scattered widely.

It is the building block behind variance, standard deviation and the fit of a forecasting model.

From the Money Master HQ dictionary, founded by Shihan Sheriff (FCMA, VP of Finance at Nomod, CFO at Esanjo Ventures). How these definitions are written.

What it means

Imagine five months of sales figures and ask how far each month sits from the average month. Some are above and some are below, so if you simply added the gaps they would cancel out and tell you nothing.

Squaring each gap makes every number positive and gives extra weight to the biggest misses, and the sum of those squares is the result. In finance and business analysis, this quantity sits underneath several tools that managers use every day.

Dividing the sum of squares by the number of observations (minus one for a sample) gives the variance, and the square root of the variance gives the standard deviation, which is the usual way of describing how volatile a return or a sales line is. A fund with a high standard deviation is one whose individual results swing far from its average.

The sum of squares also underpins regression, the technique of fitting a line through data to explain or predict something, such as sales from advertising spend. The total sum of squares measures all the variation in the outcome, the explained part measures what the model accounts for, and the residual part (the leftover error) measures what the model misses.

The model that leaves the smallest residual is generally the better fit. A common summary of this split is R-squared, which is the explained sum of squares divided by the total.

An R-squared of 0.80 says that 80% of the variation in the outcome is accounted for by the model. It does not say the model is correct, only that it tracks the data closely.

One nuance is that squaring makes the measure sensitive to extreme values. A single unusually large month can dominate the total, so analysts check for one-off events before drawing conclusions.

Another is that the units are squared, so a sum of squares in dollars is expressed in dollars squared, which is why people convert it back to a standard deviation for reporting.

In practice

Real-world examples.

1

Example

A retail finance manager compares two stores that both average $50,000 in monthly profit. Store A has a sum of squares of 250,000,000 and Store B has 900,000,000, so she knows Store B is far more erratic and needs a larger cash buffer.

2

Example

A marketing analyst fits a line relating weekly ad spend to online orders. The total sum of squares is 40,000 and the residual sum of squares is 10,000, so the model explains 30,000 of the 40,000, an R-squared of 0.75.

3

Example

A portfolio manager at an investment firm measures how far each month's return has strayed from the fund's average. The sum of squares feeds into the fund's standard deviation, which she reports to clients as its volatility.

Formula

Calculation

Sum of squares = (x1 - mean)^2 + (x2 - mean)^2 + ... + (xn - mean)^2 Suppose a shop records monthly profit of $40,000, $45,000, $50,000, $55,000 and $60,000 over five months. The mean is (40,000 + 45,000 + 50,000 + 55,000 + 60,000) / 5 = $50,000. The gaps from the mean are -10,000, -5,000, 0, 5,000 and 10,000, and their squares are 100,000,000, 25,000,000, 0, 25,000,000 and 100,000,000. The sum of squares is 100,000,000 + 25,000,000 + 0 + 25,000,000 + 100,000,000 = 250,000,000. The sample variance is 250,000,000 / 4 = 62,500,000, and the standard deviation is the square root of that, about $7,906.

Case study

Seen in the real world.

Brightline Couriers is an illustrative, fictional delivery company that wanted to forecast weekly fuel costs. The finance team built a simple model linking fuel spend to the number of deliveries and compared it with a plain average of past weeks.

The plain average left a total sum of squares of 1,200,000 across the sample weeks. The delivery-based model cut the leftover residual sum of squares to 300,000, so it explained 900,000 of the variation, which is 75%.

The finance manager adopted the model for budgeting but kept a margin of safety, because two storm weeks had inflated the figures. In this illustrative story, the sum of squares did not give the answer by itself, but it showed clearly which forecasting method tracked reality better.

Watch out

Common mistakes.

  • Adding the raw gaps from the average without squaring them, which always produces zero and tells you nothing about spread.
  • Reading a large sum of squares as bad in itself, when it grows with the number of data points and the size of the units, so it only means something in comparison.
  • Assuming a high R-squared proves one thing causes another, when it only shows how closely the model follows the data.

Questions

People also ask.

Why do we square the gaps rather than take their absolute values?

Squaring is mathematically convenient and penalises large misses more heavily, and it leads directly to variance and standard deviation, which have well-known properties.

Is the sum of squares the same as variance?

No, variance is the sum of squares divided by the number of observations (or by one fewer for a sample), so it is an average squared gap rather than a total.

What is the residual sum of squares?

It is the total of the squared differences between actual values and the values a model predicted, so a smaller figure means the model fits better.

Was this explanation helpful?

From the founder's library

Accounting Fundamentals: A Non-Finance Manager's Guide to Finance and Accounting, by Shihan Sheriff

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.

US$2.24US$2.99

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%
Last updated · October 8, 2026
Browse all terms →

Disclaimer

The information provided in this finance dictionary is for educational and informational purposes only. It should not be construed as financial, investment, legal, or tax advice. Always consult with a qualified professional before making any financial decisions. Money Master HQ makes no representations or warranties about the accuracy, completeness, or suitability of this information. Use of this content is at your own risk.