Calculation guide
Use actual elapsed days and the contract day basis. No intermediate rounding, penalties or compounding.
Inputs
Principal outstanding
Example entry 20000 (in the selected currency).
Nominal annual interest rate
Example entry 6 %. Allowed range 0 to 100.
Elapsed days
Example entry 40. Allowed range 0 to 3660. Use whole numbers.
Contractual day basis
Example entry 365. Allowed range 360 to 366. Use whole numbers.
Payment
Example entry 500 (in the selected currency).
Worked example
| Input | Value |
|---|---|
| Principal outstanding | 20,000 |
| Nominal annual interest rate | 6% |
| Elapsed days | 40 |
| Contractual day basis | 365 |
| Payment | 500 |
| Result | Value |
|---|---|
| Interest | 131.506849 |
| Principal paid | 368.493151 |
| Remaining principal | 19,631.506849 |
| Unpaid interest | 0 |
Calculation steps
Interest = ((((Principal outstanding × Nominal annual interest rate) × Elapsed days) ÷ 100) ÷ Contractual day basis)
((((20,000 × 6) × 40) ÷ 100) ÷ 365) = 131.506849
Principal paid = min(Principal outstanding, max(0, (Payment − Interest)))
min(20,000, max(0, (500 − 131.506849))) = 368.493151
Remaining principal = (Principal outstanding − Principal paid)
(20,000 − 368.493151) = 19,631.506849
Unpaid interest = max(0, (Interest − Payment))
max(0, (131.506849 − 500)) = 0
How each input affects this example
Each row starts from the worked example and changes one input.
| Input | Original input | New input | Affected result | Original result | New result |
|---|---|---|---|---|---|
| Principal outstanding | 20,000 | 22,000 | Interest | 131.506849 | 144.657534 |
| Nominal annual interest rate | 6% | 7% | Interest | 131.506849 | 153.424658 |
| Elapsed days | 40 | 44 | Interest | 131.506849 | 144.657534 |
| Contractual day basis | 365 | 360 | Interest | 131.506849 | 133.333333 |
| Payment | 500 | 550 | Principal paid | 368.493151 | 418.493151 |
