How to calculate a loan's true APR, with a derivation and Python code
A loan quoted at 6.5% can look identical to a competing offer even when one charges an upfront fee that the quoted rate ignores. Because the fee is deducted before the borrower receives funds, the effective cost rises; on a $20,000, five-year loan a $1,200 fee raises the APR to about 9.12%. APR is defined as the annualized internal rate of return on the cash flows the borrower actually experiences, solved numerically since no closed-form formula exists. The article implements this with a bisection search in Python, noting that the present value of payments falls monotonically as the rate rises, which guarantees a unique solution. It also shows how the same fee has a larger effect on APR for shorter loan terms.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.


Discussion (0)
Log in to join the discussion and vote.
Log in