calculate_with_extra_payments
Calculate how extra monthly payments for a set period shorten a loan term and cut interest. Returns an updated amortization schedule showing the earlier payoff date.
Instructions
Calculate accelerated payoff from extra monthly payments for a fixed period.
The extra amount is added to every payment for the first num_months_with_extra months. The loan then reverts to the base payment for any remaining balance, reaching payoff earlier than the original term.
Args: principal: Loan amount in dollars. annual_interest_rate: Annual interest rate as a percentage. loan_term_years: Original loan term in years. monthly_payment: Base monthly payment amount. extra_monthly_payment: Extra amount added each month during the extra period. num_months_with_extra: Number of months to make the extra payment.
Returns: JSON object with the updated amortization schedule.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| principal | Yes | ||
| loan_term_years | Yes | ||
| monthly_payment | Yes | ||
| annual_interest_rate | Yes | ||
| extra_monthly_payment | Yes | ||
| num_months_with_extra | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |