- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Deductions & credits
All the rules you need are in publication 523.
https://www.irs.gov/forms-pubs/about-publication-523
Your mortgages are irrelevant to your gain or taxes, and what you did with the money is irrelevant.
You owe capital gains tax on your capital gain, which is the difference between the selling price and your purchase price (plus certain allowable adjustments as described in publication 523). Suppose you bought the first house for $200,000. You have a $290,000 capital gain. The fact that you only got $82K cash (or less due to commission) just means that you got most of your gain out early in the form of the second mortgage, which you didn't pay tax on.
If you owned the home at least 2 years and lived in it as your main home for at least 2 of the past 5 years, the first $250,000 of capital gain is excluded from your income (or $500,000 if married filing jointly). Any gain more than your exclusion is taxable. It doesn't matter that you bought another house.