# Formula for credit card balance as a function of payments

• I
• barryj
In summary, the conversation was about finding the financial formula for calculating the balance of a credit card debt over time. The formula involves compound interest and the variables of loan balance, payment, interest rate, and number of periods. It was suggested to look for the compound interest calculation and to solve for n using logarithms. However, solving for r can be difficult for higher values of n.

#### barryj

I have been trying to find the financial formula that will give the balance of a credit card debt as a function of time. Example, at 18% interest, if I pay \$150 a month how long will it take me to pay off my debt. When I google, I get pointers to Excello functions. I want to know the exact formula.

It all comes from the basic formula for an annuity

In your case the PV is the loan balance, P the payment, r the rate and n the number of periods - so you need to solve for n, so it’s easier to just iterate

BWV said:
It all comes from the basic formula for an annuity

In your case the PV is the loan balance, P the payment, r the rate and n the number of periods - so you need to solve for n, so it’s easier to just iterate

Taking logs is hardly difficult. $$n = \left.\log\left( \frac{P}{P - rPV}\right)\right/ \log(1 + r).$$ Having made $\lfloor n \rfloor$ payments, you will have one further payment of less than $P$ to make.

Solving for $r$ is the difficult one, as this is a polynomial of order $n + 1$ which cannot be solved analytically for $n \geq 4$ (although $r = 0$ is always a solution).

Last edited:
BWV