Sub topic 4
Average-balance interest and the loop it creates
This chapter assumes you can already build a simple debt schedule with an opening balance, a repayment line and a closing balance. It also assumes you know the cash flow waterfall (cash flow available for debt service, or CFADS, then interest, then repayment) and the Excel functions IF, MIN, MAX and AVERAGE. The chapter shows how switching interest from the opening balance to the average balance creates a circular reference. It then traces the loop step by step and shows how to recognise it in your own model.
Why average balance is attractive
Debt does not change only on the last day of the period. A cash sweep repays debt through the year, so the balance outstanding is lower on average than it was on day one. Interest on the opening balance therefore overstates the cost of debt when the debt is falling. It understates the cost when a revolver is being drawn.
Averaging the opening and closing balances is the usual approximation:
Interest = Rate × (Opening balance + Closing balance) / 2This is more accurate than using the opening balance. It also puts the closing balance inside the interest formula, and that causes the circularity.
The three formulas that form the loop
Here is the minimal debt schedule with average-balance interest:
Interest: =Rate*AVERAGE(Debt_Open, Debt_Close)
Repayment: =MIN(Debt_Open, MAX(0, CFADS - Interest))
Debt_Close: =Debt_Open - RepaymentFollow the dependencies:
InterestneedsDebt_Close.Debt_CloseneedsRepayment.RepaymentneedsInterest.
Interest depends on itself through two other cells. Excel cannot find a calculation order that works, because every cell in the chain waits for another cell in the chain. By default it shows a circular reference warning and leaves the cells at zero or at their last value.
The inputs (opening balance, CFADS and rate) sit outside the cycle. Only three cells are inside it: Interest, Repayment and Closing balance. Everything that depends on these cells inherits the circularity. That includes the income statement interest line, net income, and any cash flow line downstream of net income.
A worked example with numbers
Take an opening balance of 500, CFADS of 100 and an interest rate of 8%. Assume the sweep is not constrained: the debt is large enough that the MIN and MAX limits do not bind.
With opening-balance interest there is no loop:
- Interest = 0.08 × 500 = 40
- Repayment = 100 − 40 = 60
- Closing balance = 500 − 60 = 440
With average-balance interest, the repayment is CFADS minus interest, so the closing balance is:
Closing = 500 − (100 − Interest) = 400 + InterestInterest is then:
Interest = 0.08 × (500 + 400 + Interest) / 2 = 0.04 × (900 + Interest)The solution is Interest = 36 / 0.96 = 37.5, so Repayment = 62.5 and Closing balance = 437.5. The answer is consistent: 0.08 × (500 + 437.5) / 2 = 37.5.
The two methods differ by 2.5 of interest in one period on a 500 balance. Over several periods and on a large debt balance, that gap becomes a visible difference in net income and in cash.
What Excel does when iteration is enabled
When iterative calculation is on, Excel does not solve the equation. It recalculates the loop repeatedly, using the previous pass's values wherever a cell has not yet been recalculated. The process stops when the change falls below a threshold (default 0.001) or the iteration limit is reached (default 100).
You can reproduce this behaviour in Python. The loop below starts with interest at zero, computes the closing balance, then recomputes interest from the average balance:
def trace_iterations(opening, cfads, rate, passes=6):
interest = 0.0
for i in range(1, passes + 1):
closing = opening - (cfads - interest)
new_interest = rate * (opening + closing) / 2
print(f"pass {i}: closing={closing:.4f} interest={new_interest:.4f} change={new_interest - interest:.4f}")
interest = new_interest
trace_iterations(500.0, 100.0, 0.08)The printed values are:
| Pass | Closing balance | Interest | Change from previous pass |
|---|---|---|---|
| 1 | 400.0000 | 36.0000 | 36.0000 |
| 2 | 436.0000 | 37.4400 | 1.4400 |
| 3 | 437.4400 | 37.4976 | 0.0576 |
| 4 | 437.4976 | 37.4999 | 0.0023 |
| 5 | 437.4999 | 37.5000 | 0.0001 |
Each pass reduces the error by a factor of 0.04, which is the rate divided by two (0.08 / 2). That is why this kind of loop converges quickly. A later chapter in this tutorial covers convergence in detail. For now, note that a small ratio means fast convergence, and that the ratio comes from the model's economics, not from Excel's settings.
Where the loop hides in a real model
The simple example has three cells in the loop. A full three-statement model usually has a longer loop. Common sources are:
- Interest in net income. Interest expense reduces net income, net income feeds the cash flow statement, and cash flow feeds the cash sweep. The loop passes through several statements.
- Tax. Interest is tax deductible, so a higher interest figure lowers tax and raises CFADS after tax. If CFADS is measured after tax, CFADS itself depends on interest, and the loop contains one more link.
- Interest income on cash. If you calculate interest income on average cash, closing cash depends on net income, which depends on interest income. This is a second loop, separate from the debt loop, unless the cash balance also drives the sweep.
- Revolver draws. A revolver draws when cash is short. The draw depends on interest, and interest depends on the average of opening and closing revolver balances. The structure is the same, but MIN and MAX now cap the draw at the facility limit.
- Fees. Commitment fees on the undrawn amount use the average undrawn balance, which creates the same pattern.
You can tell a cell is inside a loop when Excel's Trace Precedents arrows eventually lead back to the same cell. Excel's Formulas tab also has an Error Checking menu with a Circular References entry that lists a cell inside the loop.
Constraints change the algebra
The example above assumed that the sweep was unconstrained. In practice the repayment formula has limits:
MAX(0, CFADS - Interest)stops a negative repayment when interest exceeds CFADS.MIN(Debt_Open, ...)stops you repaying more than the balance.
When a limit binds, the relationship between interest and repayment changes. If the sweep repays the whole balance, the closing balance is zero, and interest is 0.08 × (500 + 0) / 2 = 20, with no dependence on CFADS. The loop still exists in the formulas, but its effect is gone for that period. The algebraic shortcut that works for the unconstrained case will not apply here, which is one reason the choice of method matters.
What the loop does to the model's behaviour
Loops affect more than the numbers in one cell. Four points matter in practice:
- Calculation speed. Each recalculation runs up to the iteration limit across the whole loop. In large models this is noticeable.
- Error persistence. If a cell inside the loop returns
#DIV/0!or#VALUE!once, that error feeds back into the next pass and keeps itself alive. Fixing the original cause does not clear it. This is why a circuit-breaker switch (covered in a later chapter) is standard practice. - Application-level setting. The iteration setting belongs to the Excel application, not the workbook. If you open a workbook that needs iteration while another workbook with iteration off is already open, Excel uses the setting of the first workbook opened. The result is a warning or wrong numbers.
- Precision. The iteration stops when the change falls below Excel's maximum change (default 0.001). The stored answer can differ slightly from the exact answer. If your checks compare values to many decimal places, they may fail for no real reason.
Comparing the two interest conventions
| Feature | Opening-balance interest | Average-balance interest |
|---|---|---|
| Circular reference | No | Yes |
| Needs iteration | No | Yes, unless solved algebraically |
| Accuracy when debt falls | Overstates interest | Closer to actual cost |
| Accuracy when debt rises | Understates interest | Closer to actual cost |
| Error behaviour | Errors clear when inputs are fixed | Errors can stay stuck in the loop |
| Typical use | Quick models, early-stage drafts | Lender and investor models |
An algebraic check on the loop
For the unconstrained case you can verify the iteration with a single formula. Substituting the closing balance into the interest formula gives a linear equation. Solving it gives:
def solve_interest_algebraically(opening, cfads, rate):
interest = rate * (2 * opening - cfads) / 2 / (1 - rate / 2)
closing = opening - cfads + interest
return interest, closing
interest, closing = solve_interest_algebraically(500.0, 100.0, 0.08)
print(interest, closing)
assert abs(interest - 0.08 * (500.0 + closing) / 2) < 1e-12The result is interest of 37.5 and a closing balance of 437.5, the same as the iteration. The final assert checks that the answer satisfies the original average-balance definition. A later chapter covers this approach and its limits in depth.
Common mistakes
- Averaging the wrong cells.
AVERAGE(Debt_Open, Debt_Close)is correct.AVERAGE(Debt_Open:Debt_Close)over a range that includes other rows is not. - Using the average on a balance that does not move. If a term loan has a fixed amortisation schedule that does not depend on cash flow, the closing balance does not depend on interest. Average-balance interest then creates no loop, and iteration is not needed.
- Mixing conventions. Calculating interest expense on the average balance and the cash interest payment on the opening balance makes the cash flow statement disagree with the income statement.
- Forgetting the sign of a draw. For a revolver, the closing balance is the opening balance plus draws, so the algebra has the opposite sign from the sweep case.
Exercise
A loan has an opening balance of 800, CFADS of 150 and a rate of 6%. Interest is charged on the average of the opening and closing balances, and the full CFADS less interest is swept to repay the loan. No MIN or MAX limit binds. Find the interest and the closing balance, and name the three cells that form the loop.
Show answer
Closing = 800 − (150 − Interest) = 650 + Interest. Interest = 0.06 × (800 + 650 + Interest) / 2 = 0.03 × (1450 + Interest) = 43.5 + 0.03 × Interest. So Interest = 43.5 / 0.97 ≈ 44.845. Closing balance ≈ 694.845. The loop is formed by Interest, Repayment and Closing balance: interest uses the closing balance, the closing balance uses the repayment, and the repayment uses interest.
Exercise
In the worked example (opening 500, CFADS 100, rate 8%), the error shrinks by a factor of 0.04 each pass. Predict the size of the change in interest on pass 3, given that the change on pass 2 was 1.44. Then say what would happen to the speed of convergence if the rate were 20%.
Show answer
The change on pass 3 is 1.44 × 0.04 = 0.0576. At a 20% rate the shrink factor is 0.20 / 2 = 0.10, so each pass removes only one decimal digit of error instead of about one and a half. Convergence is slower but still reliable, because the factor is below 1.