Property was primary residence for the first 18 months but due to military PCS orders, the property was never primary residence again. Property was made rental and sold 8 years later.
The two year rule still applies although you can "suspend" the years that you were stationed elsewhere.
Suspension of Time for Military
If you are military on active duty and receive Permanent Change of Station (PCS) orders to a location more than 50 miles away from the property, you may “suspend” the clock on the two out of five rule. The suspension may last no more than ten years, for a total lookback period of 15 years.
For example, Tom and Jennifer buy a house 2005, and live in it until 2010. They receive PCS orders across the country, and make their house a rental. In 2015, they decide to sell the property. They are eligible to exempt their profits by suspending the years 2013 to 2015, and showing that they lived in the house for two of the five years prior to the suspension (2008 to 2010.)
An easier way to look at this suspension is that, under typical circumstances, military families can exempt profits from capital gains if they lived in a house for two of the fifteen years before the sale, as long as they were not stationed within 50 miles of the property at any time.
As mentioned in the comment below there is a "reduced maximum exclusion" rule that might apply to you. See the following. http://www.gscpa.org/content/files/sections/real_estate/042108_reduced_exclusion.pdf
The two year rule still applies although you can "suspend" the years that you were stationed elsewhere.
Suspension of Time for Military
If you are military on active duty and receive Permanent Change of Station (PCS) orders to a location more than 50 miles away from the property, you may “suspend” the clock on the two out of five rule. The suspension may last no more than ten years, for a total lookback period of 15 years.
For example, Tom and Jennifer buy a house 2005, and live in it until 2010. They receive PCS orders across the country, and make their house a rental. In 2015, they decide to sell the property. They are eligible to exempt their profits by suspending the years 2013 to 2015, and showing that they lived in the house for two of the five years prior to the suspension (2008 to 2010.)
An easier way to look at this suspension is that, under typical circumstances, military families can exempt profits from capital gains if they lived in a house for two of the fifteen years before the sale, as long as they were not stationed within 50 miles of the property at any time.
As mentioned in the comment below there is a "reduced maximum exclusion" rule that might apply to you. See the following. http://www.gscpa.org/content/files/sections/real_estate/042108_reduced_exclusion.pdf
Although they won't meet the 2 year rule, there is a "Reduced Maximum Exclusion" if the move was because of a job-related reason that your jobs moves more than 50 miles. I think you would qualify for that.
Whether you will pay taxes or not depends on how much gain you have.
You will also pay tax on the depreciation from the rental period.
Thanks TaxGuyBill. This is a good discussion of the Reduced Maximum Exclusion rule: <a rel="nofollow" target="_blank" href="http://www.gscpa.org/content/files/sections/real_estate/042108_reduced_exclusion.pdf">http://www.gscpa.org/content/files/sections/real_estate/042108_reduced_exclusion.pdf</a>