Compute a loan amortization schedule
loan_amortizationPure calculation of EMI and a month-by-month amortization schedule for a loan of amount at annual interest_rate over tenure months. Returns opening/closing balance, interest, principal and running totals per month. Pass optional prepayments to model extra principal payments beyond the EMI (each {start_month, amount, frequency: 'm'|'q'|'y'|null, step_pct?} — null frequency = one-time lump, step_pct = % the amount grows by each recurrence): the EMI stays constant, the loan shortens, and the result becomes { schedule, payoff_month, total_interest_paid, total_prepaid, interest_saved } instead of a plain array. NOTE: here start_month is loan-relative (1 = the loan's first EMI month); on a persisted loan the same fields are plan-absolute months.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| amount | Yes | Loan principal in rupees (e.g. 1500000 for ₹15,00,000). | |
| tenure | Yes | Loan tenure in months (e.g. 240 for 20 years). | |
| prepayments | No | Optional extra principal payments beyond the EMI: the EMI stays constant and the loan shortens. | |
| interest_rate | Yes | Annual interest rate in percent (e.g. 8.6). |