Posted by Dave T on November 17, 1998 at 13:43:03:
You do not pay capital gains on borrowed money. But, the sale of your investment property will be a taxable event. Thus in your example $11K (less closing costs) would be considered taxable capital gains.
You are under no obligation to cash out the loan on your primary residence. Instead you could consider using your profit to buy another investment property. If you do a 1031 exchange, all your profits could be deferred from capital gains taxes, while your next investment increases your net worth.