Jump to content

Credit Card Payoff Equation


sitestem

Recommended Posts

Hi all,

 

http://www.ditech.com/calculators/creditcard.html

 

The above site takes a person's balance, interest rate and the desired amount of months they want to pay their credit card off. It then returns a figure that shows how much this person would have to pay off per month.

 

My question is, what code could I use for this? I know it surrounds compound interest, but I haven't a clue where to start. Does anyone know how you would calculate such a thing?

 

Thanks,

Mike

Link to comment
https://forums.phpfreaks.com/topic/38517-credit-card-payoff-equation/
Share on other sites

Assuming you have the following variables:

 

$principle //total payoff amount

$periods  //Number of months (or other periods) in which to pay off the loan

$rate      //Interest rate per period. If you are dealing with an APR and months, the rate would be APR/12.

 

 

The formula to determine the payment per period would be as follows:

 

$payment = ( $rate + $rate / ( pow((1+$rate), $periods) - 1) ) * $principle;

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.