If you have ever refinanced real property such as a rental, vacant land, or even your home, and the new loan is for more than the balance of the old loan, you have essentially taken out a portion of the profits without actually selling the property. That means when you sell the property, your taxable gain may exceed the amount of cash you actually receive in the transaction.
Illustration: Suppose you originally paid $120,000 for your home ($20,000 down and a $100,000 mortgage) and then a few years later, after the property had appreciated in value, you refinanced the loan for $200,000. Later, you sell the property for $250,000 net of sales costs. Your cash from the transaction is $50,000 (the 250,000 selling price less the $200,000 mortgage). However, your taxable gain is 130,000 (the $250,000 selling price less the cost of $120,000). If this was your home, the $130,000 might not present a problem if you qualify for the home sale exclusion. If not, you are faced with $130,000 taxable income and only $50,000 cash from the transaction.