Sub topic 10
From drivers to operating profit and margin
This chapter joins the pieces built so far. You already have a revenue forecast and a view of how costs behave. Here you combine them into operating income and operating margin, and you learn to read the result as the output of your assumptions.
It assumes you know the income statement lines (revenue, COGS, gross profit, operating expenses, operating income). It also assumes you are comfortable with percentage change and with reading short Python functions.
The chain from drivers to operating income
Operating income is what remains of revenue after the direct costs of the product and the costs of running the business. Each line is derived from drivers, not typed in:
- Revenue comes from units and price, or from a growth rate on a base.
- Gross profit is revenue times the gross margin assumption. COGS is the remainder.
- Operating expenses (opex) are a fixed base that grows at its own rate, plus a variable part set as a percentage of revenue.
- Operating income is gross profit minus opex.
- Operating margin is operating income divided by revenue.
Keep inputs (the blue-sky numbers a reviewer can change), calculations (formulas only) and outputs (the table you present) in separate places. The forecast function below follows that rule. Every assumption is an argument, and every result is computed from them.
A complete forecast
This is the function from the model structure chapter, run for three years.
def forecast(years, units, price, unit_growth, price_growth,
gross_margin, fixed_opex, fixed_opex_growth, variable_opex_pct):
rows = []
for i, year in enumerate(years):
units *= 1 + unit_growth[i]
price *= 1 + price_growth[i]
fixed_opex *= 1 + fixed_opex_growth
revenue = units * price
gross_profit = revenue * gross_margin[i]
opex = fixed_opex + revenue * 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
result = forecast(
years=[2025, 2026, 2027],
units=10_000,
price=50.0,
unit_growth=[0.10, 0.08, 0.06],
price_growth=[0.03, 0.03, 0.02],
gross_margin=[0.55, 0.56, 0.57],
fixed_opex=120_000.0,
fixed_opex_growth=0.04,
variable_opex_pct=0.10,
)
for row in result:
print(row["year"], round(row["revenue"]), round(row["operating_income"]),
round(row["operating_margin"], 3))It prints:
2025 566500 130125 0.23
2026 630175 160088 0.254
2027 681345 185248 0.272Three details in the code matter.
- Compounding state.
units,priceandfixed_opexare overwritten each loop pass, so each year grows from the prior year, not from the starting value. The growth lists are therefore year-over-year rates. - Opex has two parts. The fixed part grows with its own rate (4% here), and the variable part tracks revenue. Forecasting all opex as a single percentage of revenue would hide the fixed part and is the most common shortcut error.
- Margin is a ratio of outputs.
operating_marginis not an input. It is calculated from the other results, so a reviewer can see what produced it.
Reading the result: operating leverage
Revenue grows 11.2% in 2026 (566,500 to 630,175), but operating income grows 23.0% (130,125 to 160,088). That gap is operating leverage. Fixed opex grows 4% while revenue grows faster, so each extra dollar of revenue adds more profit than the average dollar did.
A quick way to see it is the incremental margin, which is the change in operating income divided by the change in revenue.
| Year | Revenue growth | Operating income growth | Incremental margin |
|---|---|---|---|
| 2026 | 11.2% | 23.0% | 47.1% |
| 2027 | 8.1% | 15.7% | 49.2% |
The incremental margin sits well above the 23% to 27% average margin. It is close to the gross margin minus the variable opex rate (for example 0.56 - 0.10 = 0.46 in 2026), plus a small lift from the fixed base growing slower than revenue. This relationship is useful for checking a model quickly. Gross margin minus the variable opex rate is the contribution margin, the profit on one more dollar of revenue before any change in the fixed base.
Decomposing the margin
Operating margin has a simple identity:
operating margin = gross margin - opex as a percentage of revenue
This lets you explain a margin change in two parts: how much came from the gross margin assumption and how much from opex leverage.
# Revenue, gross profit and opex from the forecast above, rounded to whole units.
rows = [
{"year": 2025, "revenue": 566_500, "gross_profit": 311_575, "opex": 181_450},
{"year": 2026, "revenue": 630_175, "gross_profit": 352_898, "opex": 192_809},
{"year": 2027, "revenue": 681_345, "gross_profit": 388_367, "opex": 203_118},
]
previous = None
for r in rows:
gm = r["gross_profit"] / r["revenue"]
opex_ratio = r["opex"] / r["revenue"]
om = gm - opex_ratio
line = f'{r["year"]} gross margin {gm:.1%} opex ratio {opex_ratio:.1%} operating margin {om:.1%}'
if previous is not None:
gm_effect = (gm - previous["gm"]) * 100
opex_effect = (previous["opex_ratio"] - opex_ratio) * 100
line += f' (gross margin {gm_effect:+.1f} pts, opex leverage {opex_effect:+.1f} pts)'
print(line)
previous = {"gm": gm, "opex_ratio": opex_ratio}Expected output:
2025 gross margin 55.0% opex ratio 32.0% operating margin 23.0%
2026 gross margin 56.0% opex ratio 30.6% operating margin 25.4%
2027 gross margin 57.0% opex ratio 29.8% operating margin 27.2%The lines with a prior year also print the effects. In 2026 the margin rises 2.4 points: 1.0 from gross margin and 1.4 from opex leverage. In 2027 it rises 1.8 points: 1.0 from gross margin and 0.8 from opex leverage. The leverage effect shrinks as revenue growth fades, because the fixed base catches up in relative terms.
Common errors and edge cases
- Margin up, profit down. A margin can rise while operating income falls if revenue drops faster. Always show dollars and percentages together.
- Mixing margin bases. Gross margin is a percentage of revenue, not of COGS. A "markup" of 50% on cost is a gross margin of 33.3%. Check which one an assumption means.
- Opex as a pure percentage of revenue. This makes margin constant by construction and removes operating leverage. It is acceptable only for costs that really are variable, such as sales commissions or payment fees.
- Fixed costs that step. Semi-variable costs jump when capacity is exceeded (a new warehouse, a new support team). A smooth growth rate on fixed opex understates risk if volume grows 40%. Add a step input for those years.
- Gross margin held flat while mix changes. If revenue growth comes from a lower-margin product, a flat gross margin overstates profit. Forecast margin by product or line when the mix shifts.
- Operating income versus EBITDA. Operating income includes depreciation and amortization. If your opex lines exclude them, you have computed something closer to EBITDA. Add D&A as its own line, or label the output correctly.
- One-off items. Restructuring charges and legal settlements belong in a separate line, so the operating margin you compare across years is not distorted by them.
- Division by zero or negative revenue. In early-stage or downside cases revenue can be zero or very small. Guard
operating_income / revenueand show the margin as not meaningful in that case. - Sign conventions. Keep costs as positive numbers and subtract them, as the code does. Mixing negative costs with subtraction produces profit that is too high.
Checks before you present the result
Run these on the output table before sharing it.
- Gross profit plus COGS equals revenue in every year.
- Operating margin equals gross margin minus the opex ratio, as in the decomposition above.
- The first forecast year's growth and margin are close to the last historical year. A large jump needs a stated reason.
- The incremental margin is not above the gross margin. If it is, fixed opex is shrinking or a cost line is missing.
- The margin by the last forecast year is within the range the company or its peers have shown. A margin that rises every year with no limit is an assumption problem, not a result.
Exercises
Exercise
A business has revenue of 800,000, gross margin of 50%, fixed opex of 200,000 and variable opex of 8% of revenue. Calculate operating income and operating margin. Then revenue grows 10% with the fixed opex unchanged and the other assumptions held. Calculate the new operating income, the new margin and the incremental margin.
Show answer
Base case: gross profit = 800,000 x 0.50 = 400,000. Opex = 200,000 + 800,000 x 0.08 = 264,000. Operating income = 136,000, so the operating margin is 136,000 / 800,000 = 17.0%. Growth case: revenue = 880,000. Gross profit = 440,000. Opex = 200,000 + 70,400 = 270,400. Operating income = 169,600, and the margin is 169,600 / 880,000 = 19.3%. The incremental margin is (169,600 - 136,000) / (880,000 - 800,000) = 33,600 / 80,000 = 42%, which equals the gross margin minus the variable opex rate (0.50 - 0.08).
Exercise
A model forecasts all opex as 30% of revenue and shows a flat 25% operating margin while revenue doubles over five years. Name the problem and describe how you would change the model.
Show answer
Treating all opex as a percentage of revenue removes the fixed cost base, so there is no operating leverage and the margin cannot change except through gross margin. Split opex into a fixed part that grows at its own rate (with steps if capacity is exceeded) and a variable part set as a percentage of revenue. Then check the resulting margin path against history and peers, and decompose margin changes into gross margin and opex leverage effects.