June 30, 2014 at 12:01 pm
I was hoping someone could help me with doing an APR calculation in SQL. I have Loan Amount, # of months(term), additional fees, and interest rate. Been trying to find some code to figure the APR, but have been unsuccessful thus far. Any help would be greatly appreciated!
Sample Data:
Loan Amount = 1250
Term(months) = 12
Additional Fees = 115.35
Interest Rate = 0%
Payment Amount would be $113.78 with an APR of 16.6175% according to http://www.calculatorsoup.com/calculators/financial/apr-calculator-basic.php, but I need to programmatically do it. Thanks!
June 30, 2014 at 12:11 pm
murrabp (6/30/2014)
I was hoping someone could help me with doing an APR calculation in SQL. I have Loan Amount, # of months(term), additional fees, and interest rate. Been trying to find some code to figure the APR, but have been unsuccessful thus far. Any help would be greatly appreciated!Sample Data:
Loan Amount = 1250
Term(months) = 12
Additional Fees = 115.35
Interest Rate = 0%
Payment Amount would be $113.78 with an APR of 16.6175% according to http://www.calculatorsoup.com/calculators/financial/apr-calculator-basic.php, but I need to programmatically do it. Thanks!
Seems that you didn't dig very hard in google. Searching for "apr formula" returned this on the first page.
http://www.endmemo.com/financial/apr.php
Give it a shot and see if that works for you.
_______________________________________________________________
Need help? Help us help you.
Read the article at http://www.sqlservercentral.com/articles/Best+Practices/61537/ for best practices on asking questions.
Need to split a string? Try Jeff Modens splitter http://www.sqlservercentral.com/articles/Tally+Table/72993/.
Cross Tabs and Pivots, Part 1 – Converting Rows to Columns - http://www.sqlservercentral.com/articles/T-SQL/63681/
Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs - http://www.sqlservercentral.com/articles/Crosstab/65048/
Understanding and Using APPLY (Part 1) - http://www.sqlservercentral.com/articles/APPLY/69953/
Understanding and Using APPLY (Part 2) - http://www.sqlservercentral.com/articles/APPLY/69954/
July 1, 2014 at 1:40 pm
Digging wasn't the issue. Finding the correct answer is. The website to which you refer is either incorrect in it's APR calculation or I am applying it incorrectly (not sure which). When I use http://www.calculatorsoup.com/calculators/financial/apr-calculator.php with the parameters I suggested previously, I get an answer of 16.6175%. So, I cross-checked it with http://www.efunda.com/formulae/finance/apr_solver.cfm and again 16.6175%. With the site, you're referring to, the closest answer I get is 16.6087%.
July 2, 2014 at 7:30 am
murrabp (7/1/2014)
Digging wasn't the issue. Finding the correct answer is. The website to which you refer is either incorrect in it's APR calculation or I am applying it incorrectly (not sure which). When I use http://www.calculatorsoup.com/calculators/financial/apr-calculator.php with the parameters I suggested previously, I get an answer of 16.6175%. So, I cross-checked it with http://www.efunda.com/formulae/finance/apr_solver.cfm and again 16.6175%. With the site, you're referring to, the closest answer I get is 16.6087%.
So which one is right? How do you know that the first site you looked at is correct? I would find a math book and get the formula.
Remember in sql that there are rounding issues when using approximate datatypes. The values you describe sound like that is a possibility. Without seeing the code though it is hard to say.
_______________________________________________________________
Need help? Help us help you.
Read the article at http://www.sqlservercentral.com/articles/Best+Practices/61537/ for best practices on asking questions.
Need to split a string? Try Jeff Modens splitter http://www.sqlservercentral.com/articles/Tally+Table/72993/.
Cross Tabs and Pivots, Part 1 – Converting Rows to Columns - http://www.sqlservercentral.com/articles/T-SQL/63681/
Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs - http://www.sqlservercentral.com/articles/Crosstab/65048/
Understanding and Using APPLY (Part 1) - http://www.sqlservercentral.com/articles/APPLY/69953/
Understanding and Using APPLY (Part 2) - http://www.sqlservercentral.com/articles/APPLY/69954/
July 3, 2014 at 8:48 am
murrabp
"The website to which you refer is either incorrect in it's APR calculation or I am applying it incorrectly"
Not necessarily!
For a brief overview of divergences between various "official" APR calcuations, see https://en.wikipedia.org/wiki/Annual_Percentage_Rate
Chris
January 5, 2024 at 11:44 am
This was removed by the editor as SPAM
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply