How apr is calculated
Find the monthly discount rate at which the present value of the scheduled payments equals net loan proceeds. Multiply that monthly rate by twelve for nominal annual APR; this differs from an effective annual yield.
Worked example
A $20,000 loan at 6.5% with no fees has a modeled APR of 6.5%. With upfront financing fees, the same payments repay smaller net proceeds, so the modeled APR rises.