# Mortgage calculator

Estimate monthly mortgage payments, total repayment, and interest with an editable fixed-rate mortgage calculator. Change the loan, rate, and term.

[Home](https://calcul.io/index.md)

## Mortgage calculator

Work out the principal and interest payment on a fixed-rate mortgage. Change the loan amount, annual interest rate, or term below to compare scenarios. Every step stays visible.

Edit any line below. Results update as you type. Use the same currency for all monetary amounts.

```calculio
principal = 300000
annualRate = 6%
years = 30
months = years * 12
monthlyRate = annualRate / 12
payment = monthlyRate == 0 ? principal / months : principal * monthlyRate / (1 - (1 + monthlyRate) ^ -months)
totalPaid = payment * months
interest = totalPaid - principal
```

[Open in full calculator](/app/?c=principal%20%3D%20300000~annualRate%20%3D%206%25~years%20%3D%2030~months%20%3D%20years%20*%2012~monthlyRate%20%3D%20annualRate%20%2F%2012~payment%20%3D%20monthlyRate%20%3D%3D%200%20%3F%20principal%20%2F%20months%20%3A%20principal%20*%20monthlyRate%20%2F%20(1%20-%20(1%20%2B%20monthlyRate)%20%5E%20-months)~totalPaid%20%3D%20payment%20*%20months~interest%20%3D%20totalPaid%20-%20principal)

## How to calculate a mortgage payment

The monthly rate is the annual interest rate divided by 12. For a repayment mortgage, the payment formula spreads principal and interest over the full term. At a zero interest rate, the payment is simply the principal divided by the number of months.

## Assumptions and limits

Use a positive loan amount and term, and a nonnegative interest rate. This estimate assumes monthly payments and a fixed rate for the entire term. It excludes property taxes, insurance, lender fees, and changes in interest rates.

## Does this include a down payment?

Enter the amount you plan to borrow after subtracting your down payment. The calculator estimates payments on that loan amount, rather than the full property price.

## Related calculators and examples

- [Loan payment example](https://calcul.io/examples/loan-payment/index.md)
- [Monthly household budget](https://calcul.io/examples/monthly-budget/index.md)
- [Tax calculator](https://calcul.io/tax-calculator/index.md)
- [Estimate gross income](https://calcul.io/salary-calculator/index.md)

New to editable calculations? [Learn how to use variables and formulas](https://calcul.io/instructions/index.md).
