Here are a few: Offset your capital gains with capital losses. ... Use the Internal Revenue Service (IRS) primary residence exclusion, if you qualify. ... If the home is a rental or investment property, use a 1031 exchange to roll the proceeds from the sale of that property into a like investment within 180 days.13.