Have a Tax Question? Ask a Tax Expert
Code Section 121(d)(9)(A) allows a member of the military to suspend the five year period during the time that the individual is unable to reside in the house due to serving active duty or U.S. Foreign Service.
Based on the information in your post, you can elect to suspend the five year period, at a minimum, from October 1998 through September 2002. Then, even if your retired foreign service time does not count, the five year period would begin running again. So....September 2002 - December 2004 is 26 months. Add 34 months ending in October 1998 to get your 5 year period. If you lived in the house as your principal residence for at least 24 months of the 34 months that ended October 1998, you may exclude the gain per above.
If you need additonal information or clarification, please let me know.