Get your taxes done using TurboTax

The state doesn't matter and what you do with the money doesn't matter.  You must pay tax on the capital gain from the sale, unless you qualify for the exclusion.

 

First, your gain is the difference between the selling price and your cost basis.  You can reduce the selling price by costs of selling, such as the real estate commission you paid and any inspections or things that the seller is required to pay in your market.  Your cost basis is what you originally paid, plus the cost of permanent improvements you might have made, minus any adjustments for business use, rental use, or casualty loss deductions.  

 

Then, you can exclude from tax, the first $250,000 of your gain, or the first $500,000 if married filing jointly, if you lived in the home as your main home for at least 2 of the past 5 years, and you owned the home at least 2 years or more.  If your gain is less than the exclusion, you don't have to report the sale unless the closing agent gave you a form 1099-S.  If the gain is more than your exclusion, you report the sale, and pay tax on the non-excluded gain.

 

There are some special circumstances if you were forced to move in less than 2 years where you might get  a partial exclusion.  

 

How you spent the gain (such as buying a new house) does not affect the tax treatment of the sale.  That was an old rule that was eliminated 20 years ago or more.