If your gain is fully excluded under capital gains rules, you may not owe federal income tax on the profit from your primary residence. However, you might still need to report the sale on your tax return, and selling rentals or second homes can trigger different capital gains and depreciation recapture rules. State income tax treatment can also vary, so coordinating with a tax professional is important.