1
$\begingroup$

I need to programmatically calculate APR based on the following inputs:

  • Principal Amount
  • Number of payments (for example, 3 months loan is 3 if paying monthly, or 6 bi-weekly payments)
  • Payment each period

From this, I need the formula for APR.

Second, the customer may have an odd number of days before their first payment. I need to be able to plug this in as a variable in to calculation and get an adjusted APR.

Can someone help me with the formula for this?

  • 0
    For the principal amount $a$, number of payments $n$ to be made, the payment amount $p$, are you assume that after $n$ payments the loan will be paid off? You will also need an extra input that helps distinguish between 6 monthly payments and 6 biweekly payments, as the APR will be different for these cases.2012-05-23

1 Answers 1