You can—up to a point. You can exclude the first $250,000 of capital gains from the sale of your home if you’re a single filer ($500,000 for joint filers). To be eligible the house must have been your primary residence for two out of the previous five years, and you must have been its owner for two of the previous five years, as well. Of course, the rules are complex, especially for inherited property and other situations; consult with a tax professional.