Sub topic 13
Checking that the model balances
This chapter assumes you have built the links from the earlier chapters: net income into retained earnings, depreciation add-back, working capital changes, the PP&E roll-forward, debt and interest, and ending cash returned to the balance sheet. Here you will build the check that tells you whether those links work, and learn what the check can and cannot prove.
What the check tests
The balance check is one number per period:
Balance check = Total assets - (Total liabilities + Total equity)The result should be zero. In a linked model, no cell forces this. Cash on the balance sheet comes from the cash flow statement, and retained earnings comes from the income statement. Assets and liabilities plus equity are computed along separate paths. If both paths follow the accounting equation, they agree. If a link is missing, wrong, or double counted, they diverge.
That makes the check a test of the model's structure. A zero means every change to an asset was matched by an equal change to a liability or equity. A non-zero means at least one change was recorded on one side only.
Where to put the check
Build the check into the model rather than running it by hand.
- A row directly under the balance sheet. Compute it for every forecast period, including the opening period. Round it to a sensible number of decimals so floating-point noise does not look like an error.
- A master flag on the first sheet. Sum the absolute values of the row, so that a positive error in one period cannot cancel a negative error in another. Show "OK" or "ERROR".
- A second check on cash. Compare ending cash on the cash flow statement to cash on the balance sheet. If you link the two directly, this check is trivially zero. It becomes useful if you have a separate cash schedule.
Balance check (row) = ROUND(TotalAssets - (TotalLiabilities + TotalEquity), 2)
Master flag (cell) = IF(SUMPRODUCT(ABS(CheckRow)) < 0.01, "OK", "ERROR")
Cash check (row) = ROUND(CFS_EndingCash - BS_Cash, 2)Use a tolerance such as 0.01 rather than testing for exact equality. Floating-point arithmetic can leave differences around 1e-12 even in a correct model.
The same check in code
The Python version below uses the one-period model from the spine and checks the correct case alongside two broken versions. It shows how each error shows up in the check.
def balance_difference(bs):
assets = bs["cash"] + bs["ar"] + bs["ppe"]
liabilities_and_equity = bs["ap"] + bs["debt"] + bs["common"] + bs["re"]
return assets - liabilities_and_equity
def check(label, bs, tol=0.005):
diff = balance_difference(bs)
ok = abs(diff) <= tol
print(f"{label}: diff={diff:.2f} {'OK' if ok else 'ERROR'}")
return ok
opening = {"cash": 100, "ar": 50, "ppe": 200, "ap": 30,
"debt": 100, "common": 100, "re": 120}
net_income, da, capex, debt_repaid, dividends = 60.0, 20, 30, 10, 20
ar_end, ap_end = 60, 35
# Correct cash flow statement
cfo = net_income + da - (ar_end - opening["ar"]) + (ap_end - opening["ap"])
cash_end = opening["cash"] + cfo - capex - debt_repaid - dividends
ending = {
"cash": cash_end,
"ar": ar_end,
"ppe": opening["ppe"] + capex - da,
"ap": ap_end,
"debt": opening["debt"] - debt_repaid,
"common": opening["common"],
"re": opening["re"] + net_income - dividends,
}
check("Opening", opening)
check("Correct", ending)
# Error 1: depreciation not added back in operating cash flow
bad1 = dict(ending, cash=cash_end - da)
check("No D&A add-back", bad1)
# Error 2: change in accounts receivable ignored in operating cash flow
bad2 = dict(ending, cash=cash_end + (ar_end - opening["ar"]))
check("AR change ignored", bad2)Running this prints:
Opening: diff=0.00 OK
Correct: diff=0.00 OK
No D&A add-back: diff=-20.00 ERROR
AR change ignored: diff=10.00 ERRORIn both broken cases the size of the difference equals the item that was mishandled (20 for depreciation and 10 for the AR change). That is the basis of the diagnostic method in the next section.
Reading the size of the difference
The size and pattern of the imbalance are the first clue to its cause. Before you open any formulas, look at the check row.
| What you see | Likely cause |
|---|---|
| Error appears in the opening period | The starting balance sheet does not balance, or an opening balance was typed incorrectly |
| Error starts in the first forecast period and stays constant | A one-time omission, such as a missing capex line, in the first period |
| Error grows each period | A recurring item is missing or mislinked, and the mistake is carried forward through the roll-forwards |
| Error equals one line item | That item was left out of the cash flow statement or the balance sheet |
| Error equals twice a line item | That item has the wrong sign, or was added where it should have been subtracted |
| Error is a few cents | Rounding in hard-coded values, or a tolerance that is too tight |
| Error appears only after you change an assumption | A hard-coded number or a formula that does not respond to the input |
Differences that are exact multiples of a plausible item, or exactly twice one, are strong signals. A sign error is the easiest to miss, because the item is still present and is simply counted in the wrong direction.
Errors the check cannot catch
A zero in the balance row does not prove the model is right. Some errors keep the sheet balanced.
- Offsetting mistakes. An error of +20 in one item and −20 in another cancels.
- Wrong assumptions. A tax rate of 2% instead of 20% still balances.
- Misclassified items. Capex placed in operating cash flow instead of investing leaves total cash unchanged.
- Plugs. Forcing cash or retained earnings to equal whatever makes the check zero will always pass.
For this reason, treat the check as a necessary condition. Pair it with reasonableness tests: margins, working capital days, and the interest rate implied by interest divided by debt should all stay in a sensible range across periods.
Checks that interact with circular references
If interest is calculated on average debt, the model contains a circular reference (covered in a later chapter). While iteration is on, the check may show a small non-zero value that shrinks toward zero as the calculation converges. If the check stays large, or alternates between values, the model has not converged or contains a real error that the circularity is hiding. A common practice is to switch the circularity off with a toggle, confirm the check is zero, then switch it back on.
A short routine when the check fails
- Confirm the opening balance sheet balances. If it does not, stop and fix it.
- Find the first period where the check is not zero. Ignore later periods, because errors carry forward.
- Compare the size of the difference against the line items in that period, including double and half amounts.
- Check each cash flow line against its balance sheet counterpart. Every balance sheet account other than cash should have its change reflected in the cash flow statement.
- Check signs. An increase in an asset reduces cash. An increase in a liability raises cash.
- Fix one thing at a time and watch the check row after each change.
Step 4 is the most productive. A useful rule is that every non-cash balance sheet change must appear exactly once in cash flow, either in operations, investing, or financing, or as a non-cash income statement item such as depreciation.
Exercise
In a forecast period, the balance check shows -40. Net income is 100, dividends are 20, depreciation is 20, and capex is 30. Name two plausible causes based on the size of the difference, and say which cause would produce a difference of exactly twice an item.
Show answer
A difference of -40 is twice depreciation (20), which suggests depreciation was subtracted in operating cash flow instead of added back, or the add-back was applied with the wrong sign. It is also twice the dividends (20), which suggests dividends were added to cash instead of subtracted, or deducted from retained earnings twice in the wrong direction. A sign error produces a difference of twice the item, because the correct amount is replaced by its negative, a swing of two times the amount. An item that is simply omitted would produce a difference equal to the item once, so 20 or 30, not 40.
Exercise
A colleague says the model is correct because the balance check is zero in every period. The cash line on the balance sheet is calculated as total liabilities and equity minus all other assets. What is wrong with this claim?
Show answer
The cash line is a plug. Because cash is defined from the other side of the equation, assets will always equal liabilities plus equity, so the check is zero regardless of the model's correctness. The cash line must come from the cash flow statement (opening cash plus CFO, CFI, and CFF). Once cash is linked that way, the check becomes a real test.