Sub topic 1
How a driver-based forecast is organized
A driver-based forecast does not guess revenue and profit directly. It states a few underlying assumptions, such as growth rates, price, volume and margins, and computes the financial results from them. The tutorial's later chapters cover the individual drivers. This chapter covers how the whole model is laid out, so that every later piece has a place to go.
Prerequisites
This chapter assumes you already have the following.
- Income statement basics. You know the lines revenue, COGS (cost of goods sold), gross profit, operating expenses and operating income, and how each follows from the one before.
- Percentages. You can compute a percentage change and apply a percentage to a base amount.
- Spreadsheets or basic Python. You can read a formula such as
=B2*(1+C2)and a short Python function with a loop.
You do not need to know CAGR, margin analysis or scenario methods yet. Later chapters introduce them.
What a driver is
A driver is an input that explains why a financial line moves. Revenue is the output. Units sold, price and growth rate are the drivers behind it. Gross profit is an output of revenue and gross margin. Operating expenses are an output of a fixed cost base and a percentage of revenue.
Drivers give you three things that a hard-coded forecast does not.
- Explainability. When someone asks why 2027 operating income is lower than expected, you can point to a specific assumption instead of a typed-in number.
- Testability. You can change one driver and see how far the result moves. Scenario and sensitivity analysis depend on this.
- Reuse. The same structure works for next quarter or next year. Only the inputs change.
A useful rule is that a driver should be something a person in the business can discuss and measure. "Revenue grows 8%" is a driver. "Revenue is 1,188" is a result.
The three layers: inputs, calculations, outputs
Almost every well-built forecast, in a spreadsheet or in code, separates three layers.
- Inputs are the assumptions: starting values, growth rates, margins, cost levels. They are typed in once and nowhere else.
- Calculations are formulas that turn inputs into line items. They contain no typed-in numbers other than structural constants.
- Outputs are the summary the reader looks at, such as revenue, gross profit, operating income and operating margin by period. Outputs only report. Nothing feeds back from them into the inputs.
The dashed arrow at the bottom is the only path that goes backwards, and it is done by a person. The model itself never changes an assumption because of a result. If a formula reads from an output cell, the layers have been mixed, and errors become hard to trace.
Why the separation matters
Mixing layers causes the most common forecasting errors.
- Hard-coded numbers inside formulas. A formula like
=B5*1.08hides the 8% growth assumption. Someone later changes the growth assumption in the input area and the forecast does not move. - Duplicated assumptions. If the gross margin is typed in two places, the two will drift apart.
- Unclear ownership. When inputs, calculations and outputs share one block, a reviewer cannot tell which cells are safe to change.
In a spreadsheet, the usual convention is to give inputs their own sheet or block, often with a distinct font or fill color, and to keep every calculation cell as a formula. In code, the equivalent is to keep inputs in one data structure and write calculations as functions of that structure.
The order of calculation
The order of the calculations follows the income statement, and each step depends on earlier ones.
- Revenue comes first. It depends only on drivers such as units, price and growth.
- COGS and gross profit come next. They depend on revenue and on a gross margin assumption (or on unit costs).
- Operating expenses depend on how each cost behaves. A fixed cost depends on its own base and growth. A variable cost depends on revenue.
- Operating income is gross profit minus operating expenses.
- Operating margin is operating income divided by revenue.
Revenue sits at the top because nearly everything else is linked to it. An error in revenue spreads to every line below it, so the revenue step deserves the most review time.
A first example in Python
The following program shows the three layers in a small, complete forecast. The inputs sit in one object, the calculation is a function, and the output is a table built from the result.
from dataclasses import dataclass
@dataclass
class Assumptions:
years: list
base_revenue: float
revenue_growth: list # one rate per forecast year
gross_margin: float
fixed_opex: float # base-year fixed operating expenses
fixed_opex_growth: float # yearly growth of fixed expenses
variable_opex_pct: float # variable expenses as a share of revenue
def forecast(a: Assumptions) -> list:
if len(a.years) != len(a.revenue_growth):
raise ValueError("years and revenue_growth must have the same length")
rows = []
revenue = a.base_revenue
fixed_opex = a.fixed_opex
for year, growth in zip(a.years, a.revenue_growth):
revenue *= 1 + growth
fixed_opex *= 1 + a.fixed_opex_growth
gross_profit = revenue * a.gross_margin
opex = fixed_opex + revenue * a.variable_opex_pct
operating_income = gross_profit - opex
rows.append({
"year": year,
"revenue": revenue,
"gross_profit": gross_profit,
"opex": opex,
"operating_income": operating_income,
"operating_margin": operating_income / revenue,
})
return rows
inputs = Assumptions(
years=[2025, 2026, 2027],
base_revenue=1000.0,
revenue_growth=[0.10, 0.08, 0.06],
gross_margin=0.55,
fixed_opex=250.0,
fixed_opex_growth=0.03,
variable_opex_pct=0.20,
)
print("year revenue gross_profit opex operating_income margin")
for r in forecast(inputs):
print(r["year"], round(r["revenue"], 1), round(r["gross_profit"], 1),
round(r["opex"], 1), round(r["operating_income"], 1),
round(r["operating_margin"], 3))Three design choices in this code mirror the layers described above.
- Every assumption lives in
Assumptions. Theforecastfunction contains no business numbers. It uses only structure, such as1 +. forecastreturns data and prints nothing. The printing loop at the bottom is the output layer. You could replace it with a chart or a file export without touching the calculations.- The length check at the top fails early when the growth list does not match the years. A silent mismatch would produce a forecast of the wrong length or misaligned periods.
In this example the operating margin rises over the three years, from roughly 11.6% to roughly 13.3%. The reason is visible in the structure. Fixed expenses grow at 3% while revenue grows at 6% to 10%, so the fixed cost base is spread over more revenue each year. Seeing that cause without searching through the formulas is the benefit of a driver structure. The chapter on cost behavior treats this effect in detail.
Choosing the forecast grain
Before you build, decide three structural things. Changing them later means rebuilding.
Time horizon and periods
The horizon is how many periods you forecast. Three to five years is common for annual strategic models. Short operating forecasts often run 12 to 18 months. A longer horizon makes the result depend more on the assumptions at the far end, where you know least. The seasonality chapter covers monthly versus quarterly versus annual periods. For now, pick one period length and use it everywhere in the model.
Level of detail
You can forecast total revenue with a single growth rate, or build it from units and price by product line. More detail gives more explanatory power and more places to make errors. A reasonable rule is to add detail only where the business actually behaves differently, such as two products with very different margins, and not to split lines just because the data allows it.
Units and sign conventions
Decide whether amounts are in dollars, thousands or millions, and keep that fixed. Decide whether costs are stored as positive numbers that are subtracted, or as negative numbers that are added. The code above stores costs as positive values and subtracts them. Mixing conventions inside one model is a common source of sign errors.
| Decision | Common choice | Risk if inconsistent |
|---|---|---|
| Period length | One length for the whole model | Growth rates applied to the wrong period |
| Currency unit | One unit (for example, thousands) | Values off by a factor of 1,000 |
| Cost sign | Costs positive, then subtracted | Expenses added instead of subtracted |
| Base year | One clearly labeled actual year | Forecast starts from an estimate, not a fact |
Where the inputs come from
Inputs are not guesses made in a vacuum. The next chapters show how to derive them. In outline, the sequence is as follows.
- Collect historical revenue, COGS and expenses.
- Compute historical growth rates and margins.
- Use those results, adjusted for what you know about the future, as starting assumptions.
- Record the reasoning for each assumption next to it.
Keeping a short note beside each input, with its source or reasoning, makes a model reviewable. A reviewer can accept or challenge "gross margin 55%: average of the last three years, no pricing change planned" in seconds. They cannot do that with a bare 0.55.
Common structural mistakes
- Starting from a forecast value instead of an actual. The first forecast period should grow from a confirmed base year, not from a previous estimate.
- Applying a growth rate to the wrong base. Year-over-year growth applies to the prior year's value, which is what the code does with its running
revenuevariable. - Letting one list drift out of step. Per-year inputs, such as growth rates, must have one entry per forecast period. The length check in the code guards against this.
- Burying assumptions in formulas. This hides the model's logic from every future reader, including you.
- Reading from outputs. If a calculation uses a summary cell, a later change to the layout of the summary can silently change the forecast.
Summary of the structure
A driver-based forecast keeps assumptions in one place and computes results from them in a fixed order: revenue, gross profit, operating expenses, operating income, operating margin. Outputs report the results and never feed back. You choose the period length, level of detail and units before building, and you document where each input came from. The remaining chapters fill in each box of the diagram, starting with growth rates and compounding.
Exercise
In the Python example, you want to test a downside case in which gross margin is 50% instead of 55%. Which layer do you change, which part of the code stays untouched, and why does this show the benefit of the layered structure?
Show answer
Change only the input layer: create an Assumptions object with gross_margin=0.50 (or edit that one field) and pass it to forecast. The forecast function and the printing loop stay untouched, because the function contains no business numbers and the output layer only reports what the function returns. One edit in one place changes the result everywhere, and nothing can be left out of date.
Exercise
A colleague's spreadsheet computes 2026 revenue with the formula =C10*1.08, where C10 is 2025 revenue, and the sheet has an input cell labeled "Revenue growth 2026" containing 8%. They change the input cell to 5% and the forecast does not change. What structural mistake caused this, and how do you fix it?
Show answer
The growth assumption is hard-coded inside the formula, so the input cell is not connected to the calculation. Replace 1.08 with a reference to the input cell, for example =C10*(1+B2), where B2 holds the growth rate. Then each assumption has a single home and the calculation reads from it.