Up to $250,000 of gain ($500,000 if you file a joint return) on the sale of your residence can be excluded from income if you own and occupy the residence in at least two of the prior five years ending on the date of sale and you have not used the §121 exclusion within two years (§121).
Some of your gain may still be taxable if you use part of your home as an office or if you rent your home prior to the sale. Gain up to the amount of depreciation allowed or allowable must be recognized as unrecaptured §1250 gain.
Even though most gain from the sale of your residence escapes tax, you should still be saving all your receipts for home improvements that you make. The improvements you make add to your home’s basis and ultimately reduce the amount of gain that may be taxable.