Sub topic 2
The three layers: inputs, calculations, outputs
This chapter assumes you can write spreadsheet formulas with absolute and relative references. It also assumes you know what an income statement is and how a growth rate compounds over periods. It covers the three-layer architecture itself. Later chapters cover each layer in detail.
Why a model needs layers
A financial model answers questions such as "what is profit if revenue grows 10% a year?" A model that mixes assumptions, logic, and presentation is hard to answer these with. To test a different growth rate, you must find every place a growth number was typed. To check a result, you must read formulas that contain both logic and constants. To show the result to a manager, you must copy numbers out of the middle of a working sheet.
The standard fix is to separate the model into three layers. Each layer has one job, and information moves in one direction.
- Inputs hold every assumption that a person chooses or measures.
- Calculations turn inputs into results using formulas only.
- Outputs present selected results for a reader, adding no new logic.
What belongs in each layer
Inputs
An input is a value that is not derived from anything else in the model. It is typed in or pasted in. Examples are a starting revenue figure, a growth rate, a tax rate, a number of forecast years, and a switch that selects a scenario.
Every input should be stored in exactly one place. If the tax rate appears in two cells, the two can drift apart, and nobody can tell which one the model uses.
Calculations
A calculation is a cell whose value is produced by a formula that depends on inputs or on other calculations. Revenue in year 3, gross profit, EBIT, tax, and net income are calculations.
The calculation layer holds the logic and nothing else. It should contain no typed constants of its own. A formula such as =D10*1.1 hides an assumption (10% growth) inside logic. Replace the 1.1 with a reference to a growth-rate input.
Outputs
An output is a presentation of results: a summary table, a chart, a dashboard, or a set of headline metrics. Outputs read from calculations and format them. They do not compute anything new. If an output cell needs a formula more complex than a lookup, a link, or a simple sum of already-calculated items, the logic probably belongs in the calculation layer.
A worked example in code
The following Python program mirrors the structure of a spreadsheet model. The inputs dictionary is the input layer, calculate is the calculation layer, and report is the output layer.
# INPUTS: every assumption lives in one place, with units in the name.
inputs = {
"revenue_year1": 1_000_000, # currency units
"growth_rate": 0.10, # fraction per year
"cogs_pct": 0.60, # fraction of revenue
"opex": 150_000, # currency units per year
"tax_rate": 0.25, # fraction of positive EBIT
"years": 3,
}
# CALCULATIONS: pure logic, reads only from inputs, holds no constants of its own.
def calculate(inp):
rows = []
revenue = inp["revenue_year1"]
for year in range(1, inp["years"] + 1):
if year > 1:
revenue = revenue * (1 + inp["growth_rate"])
gross_profit = revenue * (1 - inp["cogs_pct"])
ebit = gross_profit - inp["opex"]
tax = max(ebit, 0) * inp["tax_rate"]
rows.append({
"year": year,
"revenue": revenue,
"ebit": ebit,
"net_income": ebit - tax,
})
return rows
# OUTPUTS: presents calculation results, adds no new logic.
def report(rows):
for r in rows:
print(f"Year {r['year']}: revenue={r['revenue']:,.0f} EBIT={r['ebit']:,.0f} net income={r['net_income']:,.0f}")
report(calculate(inputs))Running it prints three lines. Year 1 has revenue of 1,000,000, EBIT of 250,000 (gross profit of 400,000 less operating expenses of 150,000), and net income of 187,500 after 25% tax.
Notice three properties:
calculatenever contains a literal like0.25. Every number comes frominp.reportnever performs arithmetic on business quantities. It formats what it receives.- To run a different case, you change one dictionary entry. Nothing else changes.
The max(ebit, 0) in the tax line is a modeling choice: it says no tax is charged on a loss. The 0 is a structural constant, not an assumption, so it can stay in the formula. The distinction between a structural constant and an assumption comes up again below.
The same structure in a spreadsheet
In a spreadsheet, the layers usually become separate sheets, or at least separate blocks on a sheet. The calculation cells point at input cells with absolute references, so one formula can be copied across the whole time axis.
Inputs!C5 = 0.10 (growth rate, blue input cell)
Calc!E10 = D10*(1+Inputs!$C$5) (revenue, same formula copied across every year column)
Calc!E12 = E10*(1-Inputs!$C$6) (gross profit, where Inputs!C6 is the COGS percentage)The dollar signs in Inputs!$C$5 lock the reference when the formula is copied to the right. Without them, the reference would slide to D5, E5, and so on, and pick up empty cells or the wrong values.
Classifying a cell
You should be able to look at any cell and say which layer it belongs to. Ask these questions in order:
- Is the value typed or pasted, rather than computed? It is an input.
- Does it exist only to display or format a result for a reader? It is an output.
- Otherwise, it computes something from other cells. It is a calculation.
| Cell content | Layer | Reason |
|---|---|---|
| `0.10` labeled "Growth rate" | Input | Typed assumption |
| `=D10*(1+Inputs!$C$5)` | Calculation | Formula using an input |
| `=Calc!E30` in a summary table | Output | Link that only presents a result |
| `=E10*1.1` | Calculation with a defect | A constant (an assumption) is hidden in logic |
| A chart of net income by year | Output | Presentation only |
The fourth row shows the most common failure. The cell is a calculation, but it also contains an input. The fix is to move 1.1 into an input cell and reference it.
Assumptions versus structural constants
Not every number in a formula is a hardcoded assumption. A rule of thumb:
- If a reasonable person might want to change the number to test a different case, it is an input. Examples are 0.25 for tax, 0.10 for growth, and 12 months per year if the model could switch to a different period length.
- If the number is part of the arithmetic definition, it can stay. Examples are
1in1+growth,0inMAX(x,0), and100when converting a fraction to a percent for display.
When you are unsure, make it an input. The cost is one extra row. The cost of a buried assumption is a wrong answer that nobody finds.
Rules that keep the layers honest
- One direction of flow. Inputs feed calculations, and calculations feed outputs. An output cell never feeds a calculation, and a calculation never writes to an input. If a calculation needs the value that an output displays, it should read the underlying calculation cell directly.
- No logic in outputs. Outputs may link, sum already-calculated items, and format. They should not introduce new assumptions or filters.
- No constants in calculations. Apart from structural constants, every number comes from the input layer.
- No calculations in inputs. An input cell holds a value, not a formula. A common exception is a derived helper such as "total headcount" computed next to the inputs. Place those in the calculation layer instead, so the input layer stays purely typed values.
Benefits you can check
The structure gives you several concrete benefits.
- Auditing. A reviewer can read the input sheet in a few minutes to see every assumption, then spot-check one formula per row in the calculation sheet.
- Changing. A new assumption touches one input cell and flows through. In the Python example, changing
growth_ratealone changes every year. - Reuse. The same calculation layer can run against many input sets, such as base, upside, and downside cases.
- Trust. Because outputs hold no logic, a number on the summary page can always be traced back through a link to a calculation and from there to an input.
Common mistakes
- Mixed-purpose sheets. A single sheet holds typed assumptions in column B, formulas in column C, and a chart beside them. This is workable for a toy model. It breaks down as the model grows, because you can no longer tell at a glance which cells are safe to change.
- Inputs scattered through the calculations. An assumption typed in the middle of a calculation block is easy to miss and easy to duplicate.
- Outputs that recompute. A summary table that recalculates margin with its own formula can disagree with the calculation layer. Link to the calculated margin instead.
- Backward links. An input cell that reads from a result creates a circular dependency or a hidden feedback loop. If a feedback loop is truly needed, as in interest on an average debt balance, treat it as a deliberate, documented exception.
Putting it together
Think of the three layers as a pipeline with clear contracts. Inputs promise to hold only chosen values. Calculations promise to use only those values and their own prior results. Outputs promise to show results without altering them. When every cell honors its contract, you can change, review, and present the model with confidence in what each part does.
Exercise
A spreadsheet cell on a "Summary" sheet contains =Calc!E12*(1-0.25), labeled "Net income". Which layers are involved, what is wrong with the cell, and how would you fix it?
Show answer
The cell sits on an output sheet but contains logic (it applies a tax calculation), and it hides the 0.25 tax rate as a typed constant. Both are structural defects. Fix it by adding a tax-rate input on the Inputs sheet, computing tax and net income in the calculation layer using a reference to that input, and changing the Summary cell to a plain link to the calculated net income cell.
Exercise
In the Python example, which dictionary key would you change to test a case in which the forecast covers five years, and which function or functions need editing?
Show answer
Change the years key in inputs from 3 to 5. No function needs editing, because calculate reads the number of years from its inp argument and report prints whatever rows it receives.