# Loan Calculator > Calculate payment, interest, total cost, and the effect of an optional extra payment. Page: https://askcalculators.com/calculator/loan-calculator/ Definition: https://askcalculators.com/calculator/loan-calculator/definition.json JSON Schema: https://askcalculators.com/calculator/loan-calculator/schema.json Version: 1.0.0 Maintained by: AskCalculators (software project; not a credentialed reviewer) Qualified review: pending. Automated checks do not establish professional approval. Page status: Live Review status: Pending ## Use Open the calculator page and enter values. Query-string parameters can restore and bookmark a calculation. Example: https://askcalculators.com/calculator/loan-calculator/?amount=25000&annualRate=7.5&years=5 ## Inputs - amount: Loan amount; type=money; required; default=25000; min=1 - annualRate: Interest rate; type=percent; required; default=7.5; min=0; max=40 - years: Loan term; type=select; required; default=5; values=1|2|3|5|7|10 - extraPayment: Extra monthly payment; type=money; optional; min=0 ## Outputs - monthlyPayment: Scheduled monthly payment; format=currency; primary - paymentWithExtra: Payment with extra; format=currency - totalInterest: Total interest; format=currency - totalPayment: Total paid; format=currency - payoffTime: Payoff time; format=text - interestSaved: Interest saved; format=currency ## Formula M = P × [r(1 + r)ⁿ] ÷ [(1 + r)ⁿ − 1] - P: loan principal - r: monthly rate - n: monthly payment count ## Rules - Empty optional inputs are undefined, not zero. - Hidden conditional inputs are ignored. - Do not invent missing required inputs.