What it means
The method starts with pairs of observations, such as units produced and total cost for each month. It then calculates two values: the slope, which shows how much the outcome changes for each extra unit of the driver, and the intercept, which is the value of the outcome when the driver is zero.
Together they define the best-fit line. In cost accounting, the slope is interpreted as the variable cost per unit and the intercept as the fixed cost.
This is more reliable than the high-low method, which uses only two data points and ignores all the others. Using every observation makes the least squares estimates steadier and less affected by one unusual month.
The calculations can be done by hand with a table of sums, but spreadsheets do it instantly with functions such as SLOPE and INTERCEPT, or with a chart trendline. The manager's job is not the arithmetic but the judgement: whether the driver chosen is sensible, whether the data cover a realistic range, and whether the fit is close.
A measure called R-squared tells you how much of the variation in the outcome is explained by the line, from 0% to 100%. A high figure suggests the line is a good summary, while a low figure warns that other factors matter.
Even a high figure does not prove cause and effect. Typical uses include cost estimation, sales forecasting, valuation, working out a share's beta and estimating how sensitive revenue is to price.
One limit is that the method assumes a straight-line relationship, so curved relationships need other treatment. Another is that forecasts outside the observed range become less trustworthy the further they go.
In practice
Real-world examples.
Example
A hotel group regresses monthly energy cost on rooms occupied over 24 months. The intercept shows the energy cost of an empty hotel and the slope shows the cost of each additional room. The finance team uses these figures to budget next year's energy bill.
Example
A software firm fits a line between marketing spend and new subscribers over 18 months. The slope suggests each extra $1,000 of spend brings about 12 new subscribers. The marketing director uses the figure to set the next quarter's budget.
Example
A credit analyst fits a line to a company's quarterly revenue over five years to project a trend. The line fits well, with a high R-squared. The analyst still checks for one-off events before relying on the projection.
Formula
Calculation
Slope b = sum of (x - mean of x) x (y - mean of y) / sum of (x - mean of x) squared. Intercept a = mean of y - b x mean of x
A factory records production in thousands of units (x) and total cost in thousands of dollars (y) over five months: (1, 14), (2, 18), (3, 22), (4, 25), (5, 31). The mean of x is 3 and the mean of y is 110 / 5 = 22. The cross products (x - 3)(y - 22) are 16, 4, 0, 3 and 18, which total 41, and the squared deviations (x - 3) squared are 4, 1, 0, 1 and 4, which total 10. The slope is 41 / 10 = 4.1 and the intercept is 22 - 4.1 x 3 = 9.7, so the cost line is y = 9.7 + 4.1x, meaning fixed costs of $9,700 and variable costs of $4,100 per thousand units. For a planned output of 6 thousand units, the estimated cost is 9.7 + 4.1 x 6 = 34.3, which is $34,300.Case study
Seen in the real world.
Maple & Stone Printing is an illustrative, fictional print shop that used a rule of thumb that each print job cost $40 to produce. The new financial controller suspected the figure was wrong and applied the least squares method to 12 months of data on jobs completed and total monthly costs.
The line showed fixed costs of $18,000 a month and a variable cost of just $22 per job. The old figure of $40 was hiding the fact that fixed costs were being spread over the jobs, which led to underpricing of big orders and overpricing of small ones. After repricing based on the new analysis, illustrative annual profit rose by $75,000, and the lesson is that separating fixed and variable cost properly changes pricing decisions.
Watch out
Common mistakes.
- Using too few data points, so that one unusual month distorts the slope and the intercept.
- Treating the intercept as meaningful when the data never come near a value of zero for the driver.
- Forecasting far beyond the range of the data, where costs may behave differently, such as stepping up when new capacity is needed.
Questions
People also ask.
How is the least squares method better than the high-low method?
It uses every data point instead of just the highest and lowest, so the result is usually more reliable.
What does R-squared tell me?
It shows the share of the variation in the outcome that the line explains, with higher figures suggesting a better fit.
Which spreadsheet functions perform the method?
Functions such as SLOPE, INTERCEPT and RSQ, or the trendline option in a chart, apply the calculation to your data.
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%