Chris, you would pay taxes on the gain, or profit, that you make on the sale. For example:
Purchase the home for $260,000
You had deductible costs at time of purchase of $5,000
Over time, you have depreciated it $35,000 (or should have - the IRS doesn't care if you actually did or not. They calculate your taxes as if you did depreciate it)
Over time, you have put in improvements (not yet realized) worth $10,000.
According to the IRS, your basis is now $200,000.
You sold it for $265,000
You had deductible costs at closing of $5,000.
According to the IRS, your selling amount was $260,000.
So, you had a gain according to the IRS of $60,000. That is what you would pay taxes on. The amount of your mortgage does not factor into the profit amount.
This is a very complex issue, and it is really important that you get it right (the IRS frowns on "wrong"). I strongly suggest you get help from a professional with your taxes in the year you sell your property. I gave you a very high level look at it. There are pages and pages of details that you must get right.
Good luck.
--174.29.xxx.xx