Start by using the exclusion for $250,000 of capital gains ($500,000) for married couples if the home was your primary residence for at least two of the last five years. Then look at all the expenditures you made that can reduce the amount of capital gains—for example, capital improvements, settlement fees and closing costs.