Installment plan terms
cashflow_loan_termsCompute level monthly loan payments, total paid, and interest cost, with optional amortization schedule. Handles zero-rate plans and matches spreadsheet PMT(rate/12, nper, -pv).
Instructions
Compute the level monthly payment that amortizes a principal, plus the total paid and the interest it costs.
Matches the spreadsheet PMT(rate/12, nper, -pv) convention, including the zero-rate case, so the output can be checked against Excel cell by cell.
Note the rate convention: loans divide the annual rate by 12, they do not compound it. This tool divides. Discounting elsewhere in this server compounds. Mixing the two is the most common error in a hand-built model.
Args:
principal (number): Amount financed.
term_months (integer): Number of level payments. 0 means paid in cash.
annual_rate (number): Nominal annual rate, e.g. 0.12 for 12% APR. Use 0 for an interest-free plan.
include_amortization (boolean): Return the per-month interest and principal split. Default false.
Returns: monthlyPayment, totalPaid, interestPaid, and optionally an amortization schedule of { month, payment, interest, principal, balance }.
Examples:
Use when: "What is the payment on 3.5 million over 36 months at 12%?"
Use when: "How much interest does the 36-month plan cost versus 24 months interest-free?"
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| principal | Yes | Amount financed. | |
| annual_rate | No | Nominal annual rate, divided by 12 per month. 0 is interest-free. | |
| term_months | Yes | Number of level payments. 0 means paid in cash. | |
| include_amortization | No | Return the per-month interest and principal split. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| totalPaid | Yes | ||
| monthlyRate | Yes | ||
| amortization | No | ||
| interestPaid | Yes | ||
| monthlyPayment | Yes |