Deductions & credits

The cash you got out of it doesn't matter.  The mortgage doesn't matter.  How much was the full selling price?   What did you buy it for and when?   Your profit (or loss) if Selling price minus (purchase cost + improvements). 

Are you married or single?  You can exclude up to 250,000 (500,000 for married) of the profit from taxes.   For a primary home, if you owned and lived in your house for 2 out of the last 5 years when you sell you can exclude the gain up to $250,000 for single or 500,000 for married from tax.  You can not take a loss on your tax return.

 

So you might not have any tax on it.