APR vs the interest rate
The interest rate is the cost of borrowing the principal. The APR (annual percentage rate) is broader: it folds in upfront fees and points, so it reflects the true yearly cost of the loan. Because fees mean you receive less than you repay against, the APR is always at least the interest rate, and usually higher.
First the monthly payment is found from the loan amount and nominal rate using the standard amortization formula. Then the APR is the annualized rate that makes the present value of those payments equal to the amount you actually received (loan minus fees).
Worked example
$20,000 at 6% over 60 months, with $600 in fees:
How the APR is solved
There's no neat closed-form for APR with fees, so the calculator solves it numerically (a bisection search) for the monthly rate that balances the equation, then multiplies by 12 to annualize. This mirrors how lenders must disclose APR under truth-in-lending rules so borrowers can compare offers on a like-for-like basis. Two loans with the same headline rate can have very different APRs if one charges heavier fees — which is exactly why APR exists.