Credit Card Payoff Calculator Formula
Understand the math behind the credit card payoff calculator. Each variable explained with a worked example.
Formulas Used
Months to Pay Off
months_to_payoff = monthly_rate > 0 ? ceil(-log(1 - monthly_rate * balance / monthly_payment) / log(1 + monthly_rate)) : ceil(balance / monthly_payment)Total Amount Paid
total_paid = months_to_payoff * monthly_paymentTotal Interest Paid
total_interest = total_paid - balanceVariables
| Variable | Description | Default |
|---|---|---|
balance | Current Balance(USD) | 5000 |
annual_rate | Annual Interest Rate (APR)(%) | 22 |
monthly_payment | Monthly Payment(USD) | 200 |
monthly_rate | Derived value= annual_rate / 12 / 100 | calculated |
How It Works
How Credit Card Payoff Is Calculated
The number of months to pay off is:
n = -log(1 - r × B / P) / log(1 + r)
Where B = balance, P = monthly payment, r = monthly interest rate. Your payment must exceed the monthly interest charge (B × r) or the balance will never decrease.
Worked Example
$5,000 balance at 22% APR with $200 monthly payment.
balance = 5000annual_rate = 22monthly_payment = 200
- 01Monthly rate = 22% / 12 = 1.833%
- 02Months = -log(1 - 0.01833 × 5000 / 200) / log(1.01833)
- 03= -log(1 - 0.4583) / log(1.01833)
- 04= -log(0.5417) / 0.01817 = 33.7 → 34 months
- 05Total paid = 34 × $200 = $6,800
- 06Total interest = $6,800 - $5,000 = $1,800
Ready to run the numbers?
Open Credit Card Payoff Calculator