Whats the formula to work out the minimum monthly payment of a loan?

I'm a developer, and i'm building a snowball debt calculator.

I want a formula to work out what the minimum monthly repayment would be on a debt with a given interest.

And I really want to get the math spot on.

The snowball debt reduction method doesn't necessarily take into account the interest of a debt, as it recommends you pay of the smallest debt first.

However, what I want to use the minimum monthly payment for is error management on the debt calculator i'm building. So when someone is putting in a debt, they have 4 options to fill in:

1. Debt name
2. Total debt still owed
3. Interest
4. Monthly payment

If they enter a debt of 20,000 with an interest of 20% APR , and a monthly payment of 1p, it obviously wont cover the minimum payment required to reduce the debt. So in this example I would want to warn the user that it wouldn't meet the criteria.

Any feedback appreciated.

Thanks

Ryan

• If you'd like any clarification on my answer below or have further questions I can certainly do further explanation. – jameselmore Jan 27 '15 at 19:01
• The easiest way to look at this, is that you need to at least meet the interest repayment for each month in order to ever pay off the loan. So, using your example, the monthly interest repayment amount would be $20000\times (1.2^{1/12}-1)=306.20$ - which means that if the debtor tried paying less than \$306.20 a month, the debt would never be paid off (because they'd only be paying interest rather than principle). – mardat Feb 2 '15 at 9:48 1 Answer You can model this with the Bond evaluation formula. It states the following: $$B = \frac{P}{(1+i)} + \frac{P}{(1+i)^2} +...+ \frac{P}{(1+i)^n} = P\sum_{j=1}^n(1+i)^{-j}$$ Where$n$is the duration of the Bond/loan,$P$is the value of the payments and$B$is the value of the Bond/loan. In your example of the 20,000 with an APR of 20%, if we a consider an open agreement with no theoretical termination, you could calculate that $$B = P\sum_{j = 1}^\infty(1+i)^{-j} = \frac{1}{1-\frac{1}{1+i}}P = \frac{1+i}{i}P$$ $$P = \frac{i}{1+i}B = 20000(\frac{.0153}{1 + .0153}) \approx \301.58$$ Note that the monthly interest rate is$i = (1 + 0.2)^{\frac{1}{12}} - 1 \approx 1.53 \%\$

Any payment less than that will cause you problems. Solutions for loans with finite duration are harder to evaluate, but can be done with the exponential summation.