The home sale exclusion lets you omit from gross income up to $250,000 of gain ($500,000 on a joint return), but only if you meet certain conditions:
A retirement plan that meets tax law tests and allows for tax deferment and tax-free accumulation of income until benefits are withdrawn. Pension, profit-sharing, stock bonus, employee stock ownership, and Keogh plans and IRAs may be qualified plans.