loan amortization
loan_amortizationComputes a full loan amortization schedule given principal, annual interest rate, and term in months. Returns the fixed monthly payment, total interest, total payments, and a month-by-month breakdown of principal vs interest. Supports optional extra monthly payments — shows months saved and interest saved. Works for mortgages (30yr/15yr), auto loans, personal loans, and student loans. All currency-agnostic. Use with /run?page=1&page_size=12 to paginate the schedule array for context-friendly agent consumption.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| principal | Yes | Loan principal amount in dollars (or any currency unit). | |
| term_months | Yes | Loan term in months. Max 600 (50 years). Common values: 360 (30yr), 180 (15yr), 60 (5yr auto). | |
| extra_payment | No | Optional fixed extra monthly payment toward principal. Defaults to 0. | |
| annual_rate_pct | Yes | Annual interest rate as a percentage (e.g., 6.5 for 6.5%). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| schedule | Yes | Month-by-month amortization schedule. | |
| payoff_months | Yes | Actual number of months to pay off (may be less than term with extra payments). | |
| interest_saved | Yes | Interest saved by extra payments vs. full term. 0 if no extra payments. | |
| total_interest | Yes | Total interest paid over the life of the loan. | |
| total_payments | Yes | Sum of all payments over the life of the loan. | |
| monthly_payment | Yes | Fixed monthly payment (excluding extra payments). | |
| total_extra_paid | Yes | Total extra payments made. |