There is a Federal exemption of $250,000 for single filers, $500,000 for married filing jointly for any profits you make on the sale of your primary residence, provided you meet a few simple conditions (e.g. you lived in the house at least 2 of the last 5 years, didn't already claim this exemption recently, etc). There is a routine in Turbotax (at least the Deluxe version I used) that should walk you through this and claim the exemption for you. So your $38K should be tax free if you meet the condition. It doesn't matter what you spent it on (i.e. downpayment). You can claim the property tax and any points you paid on your new purchase as long as it was in 2016, and your purchase details will be important for determining your cost basis for if/when you sell your newly purchased home.