Loan payoff calculator

Calculate loan payoff calculator with clear inputs and assumptions.

Calculate loan payoff calculator with clear inputs and assumptions.

Both dots and commas are accepted as decimal separators.

Your inputs stay in your browser. Displayed results are rounded to a maximum of 12 significant digits.

Method and assumptions

Method version 1.0.0 · Updated

Calculate

Formula: Calculate loan payoff calculator with clear inputs and assumptions.

Calculate loan payoff calculator with clear inputs and assumptions.

balance
Remaining balance
payment
Monthly payment
rate
Annual rate (%)

Results are estimates where noted and depend on the entered assumptions.

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 balance = 12000, payment = 400, rate = 0.06 / 12;
const months = Math.ceil(-Math.log(1 - balance * rate / payment) / Math.log(1 + rate));
console.log(months); // about 33 payments
TypeScript
const balance = 12000, payment = 400, rate = 0.06 / 12;
const months: number = Math.ceil(-Math.log(1 - balance * rate / payment) / Math.log(1 + rate));
console.log(months);
Python
import math
balance, payment, rate = 12000, 400, 0.06 / 12
print(math.ceil(-math.log(1 - balance * rate / payment) / math.log(1 + rate)))
Java
double b = 12000, p = 400, r = 0.06 / 12;
System.out.println(Math.ceil(-Math.log(1 - b * r / p) / Math.log(1 + r)));
C#
double b = 12000, p = 400, r = 0.06 / 12;
Console.WriteLine(Math.Ceiling(-Math.Log(1 - b * r / p) / Math.Log(1 + r)));