Assuming the first payment is due one month after the loan is made:
Dim APR As Double = Rate(5 * 12, 1486, -70000, 0, DueDate.EndOfPeriod) * 12
gives a result of .0996244, or 9.962%.
If you want to be able to solve for this based just on the loan, fees, and stated interest rate, then you first need to calculate the payment, and feed that into this function:
Dim LoanPmt As Double = Math.Round(Pmt(0.0675 / 12, 5 * 12, -75495), 2)
Dim APR As Double = Rate(5 * 12, LoanPmt, -70000) * 12
Don't need to be that complex for a loan with a single payment level. Use the Rate() method. The VB documentation gives a pretty clear example of how to use it. Note that the money in one direction or the other (payment or initial value) needs to be negative, and that you'll probably want to get a rate per month (assuming payments are made monthly), which then needs to be multiplied by 12.
I can't give you an exact formula, because you haven't provided all the information needed: We need to know the length of time the loan lasts and the payment per month (or other payment period).
0
EdAuthor Commented:
Here are the full details. I want to work out the apr with the below variables on a button click event. Thanks
Dim APR As Double = Rate(5 * 12, 1486, -70000, 0, DueDate.EndOfPeriod) * 12
gives a result of .0996244, or 9.962%.
If you want to be able to solve for this based just on the loan, fees, and stated interest rate, then you first need to calculate the payment, and feed that into this function:
Dim LoanPmt As Double = Math.Round(Pmt(0.0675 / 12, 5 * 12, -75495), 2)
Dim APR As Double = Rate(5 * 12, LoanPmt, -70000) * 12