My question involves real estate located in the State of: NC

I was looking for a few opinions on this one. it is my understanding that after you live in a home for 2 years, it can be sold and profits will not be subject to capital gains taxes. but how do the rules apply if someone has multiple properties?

scenario:

i have two homes. one is currently on the market and i lived in it from 2000-2008. will i be taxed on the sale of this home since it is no longer my primary residence?

i have been in my current home for a year and a half. If i sell it next year will i be taxed?