# Loan Payment Calculator Example

Estimate a fixed-rate loan payment in Calcul.io by splitting the annual rate into a monthly rate, calculating the payment, and comparing total paid with principal.

## Loan payment estimate

Keep a fixed-rate loan formula readable by naming the principal, rate, term, and monthly rate before calculating the payment. The values are illustrative.

```calculio
principal = 24000$
annualRate = 6.5%
months = 48
monthlyRate = annualRate / 12
payment = principal * monthlyRate / (1 - (1 + monthlyRate) ^ -months)
totalPaid = payment * months
interest = totalPaid - principal
```

## How it works

1. Replace the principal, annual percentage rate, and number of months.
2. Leave the monthly rate as a named intermediate step so the formula is easy to check.
3. Compare `totalPaid` with `principal` to see the estimated interest.

This is a calculator example, not lending or financial advice. Confirm fees, compounding rules, and the final offer with your lender.

[Next: calculate a sale discount](https://calcul.io/examples/sale-discount/index.md)
