capital gains military

How Military Can Avoid Paying Capital Gains on Real Estate

You may not have to pay tax on all or part of the gain from the sale of your main home.  This is where you live most of the time.  A main home can be a:

  • House
  • Houseboat (cool!)
  • Mobile home
  • Cooperative apartment
  • Condominium

Actually, everybody can get this break on capital gains on the sale of a home under certain circumstances, but military members get an additional benefit that makes it much easier to meet the requirements.


Cars, stocks, and bonds are capital assets.  A home is also considered a capital asset because it is a significant piece of property.  When you sell it for more than you paid, it’s called a capital gain.

When you sell a stock for more than you paid, you’ll need to report that to the IRS and pay taxes on the capital gain.  Primary homes get excluded from this as long as it fits certain criteria called the ownership and use test.


To be eligible for excluding capital gains on your primary residence, you must be the ownership and use test, as outlined in Publication 3 – Armed Forces Tax Guide.  You will be eligible for the exclusion if, during the 5-year period ending on the date of sale, you:

  • Owned the home for at least 2 years (the ownership test)
  • Lived in the home as your main home for at least 2 years (the use test)

If you don’t fully meet these two tests, you still may be eligible for a partial exclusion.  See IRS Pub. 523 for more details, and consult a smart tax advisor.

This is commonly explained as you have lived in your primary residence 2 of the last 5 years.


It seems like it should be unlimited, right?

Dream on.  The USGOV would never allow that!

You can exclude up to $250,000 of capital gains if filing single / $500,000 if filing jointly. 

This exclusion is allowed each time you sell your main home, but generally not more than once every two years.


Here’s the good part!

You can choose to have the 5-year test period for ownership and use suspended during any period you or your spouse serve on qualified official extended duty as a member of the Armed Forces.  The maximum time of this suspension is 10 years.

The wording above is a little confusing, I don’t really like the way the IRS explains it, but I’ll reword it into something simpler.

Essentially, instead of needing to meet a requirement of living in the property 2 of the last 5 years, military members can meet a requirement of living in the property 2 of the last 15 years.  The 5-year rule can be extended by 10 additional years is the way I look at it. 


Obviously, it’s important to make sure you or your spouse qualify as someone who is on qualified official extended duty which is defined as:

  • At a duty station at least 50 miles from your main home, or
  • While you live in government quarters under government orders

You are on extended duty when you are called or ordered to active duty for a period of more than 90 days or for an indefinite period.


I took advantage of this very exclusion on my one and only primary residence to avoid paying capital gains.

capital gains military
My house in Alexandria, VA

I bought a townhouse in Alexandria, VA in Aug of 2003 for $280,000. I lived in it for exactly 24 months.

Read the story of how I bought that house.

I moved away two years later. It became a rental property as I moved all around the world.  I spent a good portion of my career overseas, with 5 years in Japan and 3 in Germany.

I sold that house in June of 2016 for a little over $400,000.

Under the original rule, I would not meet the 2 out of the last 5 rule, and this house would be subject to capital gains taxes (ouch!).

The 5 years would have ended in August of 2008. 

Under this awesome military rule, however, we can add on an extra 10 years to the 5 year rule.  I can sell that house anytime before August of 2018.  I sold it in 2016, so the capital gains are not taxed. 

That’s a big deal!


You cannot apply this rule to more than one property at a time.

According to the IRS’s rules on capital gains, this rule can also apply “to taxpayers who have recently left the military.”  There is no further guidance on what recently would mean legally. 

You will want to talk with a tax attorney about that and use some common sense.  I think a few months out of the military would make sense, and five years after leaving would seem like a stretch!

You don’t have to pay capital gains, but you will be responsible for something called depreciation recapture.  Any depreciation taken or that should have been taken during the time you owned the property needs to be taxed once the property is sold.  This is a complicated subject that my good friend Kate Horrell covers well.

If you move away shy of the two year requirement, you may still qualify for a partial exclusion. See IRS Pub 523 Selling Your Home for more details on the specifics.

If you weren’t eligible for the capital gains exclusion, and wanted to avoid depreciation recapture, this can be performed through a 1031, or like-kind exchange.  This means you purchase a similar property within a specific timeframe using certain rules, and you defer the tax consequences of the sale into the new property. 

I’m not a tax attorney or a CPA.  You need to check your situation with professionals before making any important financial decisions.

Have you taken advantage of this awesome opportunity for military members?

I’m proud to say I’m the first military blogger to ever cover this subject!

Ok, that’s not true. Kate Horrell wrote about this a few years ago and did a great job.

Any questions about it?

Leave your comments below.

Check out my Complete Guide to Real Estate Investing

Rich on Money


Are Charles Schwab Index Funds the Cheapest?


8 Crucial Rules for a 1031 Exchange


  1. Avatar

    elizabeth buck

    Wow I did not know about the military rule thank you!

  2. Avatar


    Did you have to submit anything to the IRS TO freeze time I think they called it?

  3. Avatar

    Jon Loehr

    Thank you so much for the explanation! I had heard of the rule but I read it to extend the time period to 10 years total and not to 15 years.

  4. Avatar


    Love this blog! Can’t wait to share it with others.

    What happens if you might be just shy of two years? I lived in a home that I bought from 2014 to 2016 but in total, it might not have been 24 months. I had to PCS to another duty station. Can I still benefit from this tax benefit?

    Also, I’m coming up to my five year mark for owning/renting out this home. If I left the military, do I still qualify for the 10 year extension? I’m reading the IRS guidance but it doesn’t clarify whether this benefit is only applicable to those still in the military . Thank you so much for your help!

    • Avatar

      Yes, you can benefit from this rule if you are shy of two years. You have to read this carefully: and you’ll see that if you had to move out of your home because of a change of employment location, you can qualify for a partial exclusion. It explains how to calculate it as well.

      According to the IRS’s rules on capital gains, this rule can also apply “to taxpayers who have recently left the military.” There is no further guidance on what recently would mean legally. To me, recently would be in the last year, but would not be 5 years ago.

      On both of the above, consult a competent tax advisor.

Leave a Reply

Your email address will not be published. Required fields are marked *

Powered by WordPress & Theme by Anders Norén