In general, a lender will utilize two interest rates: the rate set in your mortgage contract and the rate they extend to current borrowers. They multiply the difference between the two rates by your remaining principal and divide the resulting figure by 12 months. They then take this figure and multiply it by the number of months left on your mortgage term, which results in the IRD penalty amount.