An example
Let's say your lender offers you a $200,000 mortgage at 4% interest. The lender charges one discount point ($2,000) and an origination fee of $750, making the total up-front cost $2,750.
Adding this to the loan amount gives us $202,750, which at 4% interest would produce a monthly payment of $968. Changing the loan amount in the calculator back to $200,000, and trying out a few interest rates, shows that an interest rate of 4.11% would produce that same $968 monthly payment. Therefore this loan's effective interest rate, or APR, is 4.11%.