Retirement tax questions

Thanks for the replies.  I was thinking more about Roth IRAs and the income limit on those when I asked the question.  I included traditional IRAs in the conversation because I know there are also income limits for tax-deductible contributions to traditional IRAs which of course is a bit different.  I should have worded my question better to differentiate the two scenerios.

 

From the replies I take it that as long as you meet the requirements of living in your home 2 out of the last 5 years and get the capital gain exclusion when you sell it, that profit would not count against your income limit for being able to contribute to a Roth IRA and for a traditional IRA that profit would not count against your income limit  for tax-deductible contributions?