The penalty is usually based on percentage of the remaining mortgage balance or a certain number of months worth of interest. (ourbigfatwallet.com)
The idea is that you are less of a risk for the lender if you've got a few months worth of mortgage payments in the bank. (homebuyinginstitute.com)
However, you should generally try to keep several months worth of expenses in a savings account, plus a good $ 10,000 for a rainy day emergency. (moneychoice.org)