Skip to content

Mortgage

Payments, amortization, and principal/interest splits.


calculate_mortgage_monthly_payment

Calculate the fixed monthly payment for a mortgage loan.

Parameter Type Default Description
principal_cents int required Loan principal amount in cents (e.g., 40000000 = $400,000)
annual_interest_rate float required Annual interest rate as decimal (e.g., 0.0675 for 6.75%)
term_months int required Loan term in months (e.g., 360 for 30 years)

Returns the monthly payment amount and helpful summary information.


generate_mortgage_amortization_schedule

Generate a complete or partial mortgage amortization schedule.

Parameter Type Default Description
original_principal_cents int required Original loan amount in cents at origination
annual_interest_rate float required Annual interest rate as decimal (e.g., 0.0675 for 6.75%)
term_months int required Total loan term in months (e.g., 360 for 30 years)
monthly_payment_cents int required Fixed monthly payment in cents (principal + interest)
max_months int null Optional limit on months to generate (default: full term). Use for projections.

Returns file URLs + compact inline summary. Full schedule data is written