How can I calculate minimum payment on quick loan? [closed]

I am working on calculator for quick loans. Client can select how much he will pay monthly. Base on it payment schedule will be calculated. Payment interest depends on 1 payment period. Number of payments is limited. How can I calculate what is a minimum monthly payment if I know that number of payments should be 5, amount of loan is 250, APR is 70% and payment periods are next:

• 1 payment - 9 days,
• 2 payment - 30 days
• 3 payment - 28 days
• 4 payment - 30 days
• 5 payment - 32 days

Is it possible to calculate minimum based on this logic?

closed as off-topic by Dheer, JoeTaxpayer♦Jun 20 '14 at 12:57

• This question does not appear to be about Personal Finance within the scope defined in the help center.
If this question can be reworded to fit the rules in the help center, please edit the question.

• This question appears to be off-topic because it is about software development – Dheer Jun 20 '14 at 9:57

APR is 70%, compounded monthly (assumed). First convert to effective annual rate

``````ear = (1 + 0.7/12)^12 - 1 = 0.9746 = 97.46 %
``````

The term of the loan is 129 days, so the interest rate for the term is

``````i = (1 + ear)^(129/365) - 1 = 0.2718 = 27.18 %
``````

The log rate is

``````r = ln(1 + i) = 0.2405
``````

Without any repayments the amount owed at the end of the loan term would be

``````250 e^r = 317.955
``````

which can also be calculated from

``````250 (1 + i) = 317.955
``````

For equal payments

``````-250 e^r + p e^((120/129)r) + p e^((90/129)r) + p e^((62/129)r) + p e^((32/129)r) + p = 0
``````

therefore `-317.955 + 5.61728 p = 0`

therefore `p = 56.6031`

giving a total cost of loan of `5 * 56.6031 = 283.015`

However, if the payments do not have to be equal, the cost of the loan can be minimised by paying it all off in the first installment

``````-250 e^r + p e^((120/129)r) = 0
``````

giving a single repayment on day 9 of `p = 254.229`

Check

The daily rate is

``````d = (1 + ear)^(1/365) - 1 = 0.0018657 = 0.18657 %
``````

Cost of loan paid off after 9 days is `250 (1 + d)^9 = 254.229`