Example. B purchases a house in Virginia in 2003 that he uses as his principal residence for 3 years. For 8 years, from 2006 through 2014, B serves on qualified official extended duty as a member of the Foreign Service of the United States in Brazil. In 2015 B sells the house. B did not use the house as his principal residence for 2 of the 5 years preceding the sale. Under section 121(d)(9)and this section, however, B may elect to suspend the running of the 5-year period of ownership and use during his 8-year period of service with the Foreign Service in Brazil. If B makes the election, the 8-year period is not counted in determining whether B used the house for 2 of the 5 years preceding the sale. Therefore, B may exclude the gain from the sale of the house under section 121.
26 C.F.R. §1.121-5