Remember to review the PUB 3 for all military related rules ... this is from page 15 :
How much can you exclude?
You generally can exclude up to $250,000 of gain ($500,000, in most cases, if
married filing a joint return) realized on the sale or exchange of a main home in 2018. The exclusion is allowed
each time you sell or exchange a main home, but generally not more than once every 2 years.
What must you do to be eligible for the exclusion?
You will be eligible for the exclusion if, during the 5-year
period ending on the date of the sale, you:
• Owned the home for at least 2 years (the ownership
test), and
• Lived in the home as your main home for at least 2
years (the use test).
What happens if I don't meet the ownership and use tests?
If you don't meet the ownership and use tests due
to a move to a new permanent duty station, you can exclude gain, but the maximum amount of gain you can exclude will be reduced. See Pub. 523 for more details.