LAMBDA · Financial
Loan balance LAMBDA
xl.loan.balance returns what is left after a number of fixed monthly payments. On the $25,000 car loan at 6.9% for 60 months, the balance after 12 payments is $20,663.34.
Syntax =xl.loan.balance(annual_rate, nper, principal, periods_paid)
=LAMBDA(annual_rate, nper, principal, periods_paid,
LET(
r, annual_rate / 12,
pmt, PMT(r, nper, -principal),
k, periods_paid,
principal * (1 + r) ^ k - pmt * ((1 + r) ^ k - 1) / r
)
)Arguments
| Name | Required | What to pass |
|---|---|---|
| annual_rate | Required | Annual note rate, such as 6.9%. |
| nper | Required | Total number of monthly payments. Five years is 60. |
| principal | Required | Amount borrowed, as a positive number. |
| periods_paid | Required | How many payments have already been made. 0 returns the original principal. |
Examples
The car loan from the PMT page, one year in
=xl.loan.balance(6.9%, 60, 25000, 12)Result $20,663.34
| A | B | |
|---|---|---|
| 1 | Rate | 6.90% |
| 2 | Months | 60 |
| 3 | Principal | 25000 |
| 4 | Payments made | 12 |
| 5 | Balance | 20663.34 |
xl.loan.balance is the payoff figure after a run of level payments, before any prepayment penalty. The car loan on the PMT page is $25,000 at 6.9% for 60 months. After 12 payments the balance is $20,663.34. The principal paid in that year is about $4,336.66, the same CUMPRINC result.
Zero payments returns the original principal. The rate has to be the note rate, divided by 12 inside the function.
Add it to the workbook
Copy the formula in the block above, including the line breaks. Choose Formulas, Name Manager, New. Set the name to xl.loan.balance, the scope to Workbook, and paste into Refers to. Excel Labs can do the same step: open the Advanced Formula Environment, add that name, and save it back to the workbook. A cell then calls =xl.loan.balance(...).
The name needs Microsoft 365, Excel 2024, or Excel for the web. Excel 2021 returns #NAME? for LAMBDA even when it already has XLOOKUP, FILTER, or LET.
How it works
PMT uses a negative principal so the payment is positive. The balance after k payments is the original principal grown for k months, minus the payments grown to the same date:
principal × (1 + r) ^ k − payment × ((1 + r) ^ k − 1) / r
r is the annual rate divided by 12. This is the same identity the mortgage schedule uses for each opening balance, evaluated one step later so the payment has already been applied.
Limits
Extra principal, a skipped month, and a rate change are not in the model. A 0% loan divides by zero. There is no fee and no rounding to the cent inside the formula. The displayed $20,663.34 is the currency form of 20663.341…