Regression Analysis: Forecast Sales from Your Own Data
Regression analysis finds the straight line that best explains how one number moves with another, for example how monthly sales rise when marketing spend rises. In Excel you can do it in four formulas: SLOPE, INTERCEPT, RSQ and FORECAST.LINEAR. The result gives you a forecast and, just as important, a measure of how much to trust it.
What is regression analysis in plain words?
You have pairs of numbers: spend and sales, temperature and ice cream sales, hours worked and jobs finished. Plot them as dots and draw the line that passes as close to all the dots as possible. That line has two parts. The slope tells you how much the outcome changes when the input rises by one unit. The intercept is the starting level when the input is zero. With these two numbers you can predict the outcome for an input you have not seen yet.
This is the simplest form of forecasting from causes rather than from the calendar. If you only want a trend over time, a rolling average will do. If you want to know what happens to sales when you spend more, you need regression. Both feed the plan in a cash flow forecast for a small business.
How do you run a regression in Excel?
- Put the input (X) in one column and the outcome (Y) in the next, one row per month.
- Use SLOPE(Y range, X range) for the slope.
- Use INTERCEPT(Y range, X range) for the intercept.
- Use RSQ(Y range, X range) for R-squared, the share of the ups and downs in Y explained by X.
- Use FORECAST.LINEAR(new X, Y range, X range) to predict Y for a new input. Like SLOPE, it takes the known Y values first and the known X values second.
You can also add a trendline to a scatter chart and tick the boxes that show the equation and R-squared. The Analysis ToolPak adds a full regression report if you want standard errors.
Worked example: a Galway wholesaler
Ciarán runs a food wholesaler in Galway. For five months he recorded marketing spend (in thousands of euro) and sales (in thousands of euro):
- Month 1: spend 1, sales 22
- Month 2: spend 2, sales 26
- Month 3: spend 3, sales 29
- Month 4: spend 4, sales 35
- Month 5: spend 5, sales 38
The averages are 3 for spend and 30 for sales. The slope is the sum of (spend minus 3) times (sales minus 30), divided by the sum of (spend minus 3) squared:
- Top line: (-2 x -8) + (-1 x -4) + (0 x -1) + (1 x 5) + (2 x 8) = 16 + 4 + 0 + 5 + 16 = 41.
- Bottom line: 4 + 1 + 0 + 1 + 4 = 10.
- Slope = 41 / 10 = 4.1.
- Intercept = 30 minus (4.1 x 3) = 30 minus 12.3 = 17.7.
So the line is: sales = 17.7 + 4.1 x spend, in thousands of euro. Each extra €1,000 of marketing went with about €4,100 of extra sales. For a planned spend of €6,000 the forecast is 17.7 + (4.1 x 6) = 17.7 + 24.6 = 42.3, or about €42,300. R-squared works out at 0.99, meaning the line explains almost all the movement in these five months.
How far should you trust the result?
An R-squared near 1 on five data points proves very little. Five points can line up by chance, and Ciarán's sales may also have been rising because of the season or a new customer. Treat the answer as a sensible estimate, not a promise. Some good habits:
- Use enough data. Twenty-four months is far more convincing than five.
- Stay inside the range. A forecast for €6,000 of spend is only a small step beyond €5,000. A forecast for €50,000 is a guess, because the pattern may not continue.
- Remember that correlation is not cause. Spend and sales may both rise in December for the same reason.
- Look at the dots. Plot the data. One unusual month, such as a big one-off order, can twist the line.
- Add more inputs carefully. Multiple regression adds a second or third driver (price, weather, number of staff). Each extra input needs more data to support it.
Where do Irish small businesses use regression?
Common uses are forecasting sales from marketing spend, estimating energy costs from production volume, predicting fuel costs from kilometres, and testing whether price changes moved volumes. In a practice, hours spent per client can be regressed on turnover and number of transactions to price fixed-fee work fairly. It also underpins many of the scoring tools described in data analytics for finance teams, and it is the base on which budgets in small business budgeting can be improved.
Our Strategic Management programme teaches you to use numbers like these in planning and pricing, so that you can test your own assumptions without paying for an analyst every time.
Key points
- Regression fits a line: slope shows the effect, intercept the starting level.
- In Excel use SLOPE, INTERCEPT, RSQ and FORECAST.LINEAR.
- Check R-squared, but do not trust a few data points.
- Forecast only a little beyond the range you have seen.
- Correlation is not cause: ask what else changed.
Questions people ask
- What is regression analysis used for in business?
- It estimates how one number changes when another changes, for example how sales respond to marketing spend. Businesses use it to forecast sales, costs and demand, and to test whether a price change or campaign really moved results.
- What is a good R-squared value in regression?
- R-squared runs from 0 to 1 and shows how much of the variation in your outcome the line explains. There is no single good value. In business data 0.6 can be useful, while a value near 1 on very few data points may be coincidence. Always look at the chart and the number of observations.
- How do I do a regression forecast in Excel?
- Put your input and outcome in two columns, then use SLOPE and INTERCEPT to get the line, RSQ to see how well it fits, and FORECAST.LINEAR to predict a new value. A scatter chart with a trendline shows the same result visually.
- Does a strong regression prove that spending causes sales?
- No. A strong fit shows that two numbers move together, not that one causes the other. Season, a new customer or a price change may be driving both. Use regression to estimate and to test ideas, then check the result against what you know about the business.