
Loan payment calculator
Estimate the theoretical payment for a fixed-rate amortizing loan.
Your inputs stay in your browser.
Method and assumptions
Method version 1.0.0 · Updated
Estimate payments
Formula: Payment calculated from principal, monthly rate and number of payments.
Illustrative estimate, excluding insurance and fees.
- principal
- Loan amount
- annualRatePercent
- Annual rate (%)
- months
- Term (months)
Assumes a fixed annual rate, equal monthly payments and monthly periods. Insurance, fees, penalties and eligibility terms are excluded. This estimate is not a loan offer or credit advice.
Calculate with code
These short examples use the same inputs and core calculation as this tool. Adapt validation and formatting to your application.
JavaScript
const principal = 200000, monthlyRate = 0.04 / 12, months = 25 * 12;
const payment = principal * monthlyRate / (1 - (1 + monthlyRate) ** -months);
console.log(payment.toFixed(2)); // monthly paymentTypeScript
const principal = 200000, rate = 0.04 / 12, months = 300;
const payment: number = principal * rate / (1 - (1 + rate) ** -months);
console.log(payment.toFixed(2));Python
p, r, n = 200000, 0.04 / 12, 25 * 12
print(round(p * r / (1 - (1 + r) ** -n), 2))Java
double p = 200000, r = 0.04 / 12, n = 300;
System.out.printf("%.2f%n", p * r / (1 - Math.pow(1 + r, -n)));C#
double p = 200000, r = 0.04 / 12, n = 300;
Console.WriteLine(Math.Round(p * r / (1 - Math.Pow(1 + r, -n)), 2));