What Is the 2-Out-of-5-Year Rule?

Posted by Clay Schmidt on Jul 27, 2021


When selling your primary residence, taxes still matter — and they can get complicated. Your home is still considered a capital asset and is subject to capital gains tax. If your home appreciated in value, you may be required to pay taxes on that profit. However, there are exceptions.

The 2-Out-of-5-Year Rule Explained

According to the Internal Revenue Service, if you have a capital gain from the sale of your primary residence, you may qualify to exclude up to $250,000 of that gain for individuals and up to $500,000 if you file a joint return. To qualify for that exclusion, you must meet the ownership test and the use test. 

The 2-out-of-five-year rule is a rule that states that you must have lived in your home for a minimum of two out of the last five years before the date of sale. However, these two years don’t have to be consecutive and you don’t have to live there on the date of the sale. You can exclude this amount each time you sell your home, but you can only claim this exclusion once every two years. 

For example, you can live in your home for a year, rent it out for three years, and then move back in for a year before the sale and it will still qualify as a primary residence under IRS guidelines. 

Exceptions to the 2-Out-of-5-Year Rule

A vacation or even a short-term absence still counts as time you lived at home, even if you rented it out while you were away. If you became physically or mentally unable to care for yourself and spent time in a facility, that time still counts towards your 2-year residence requirements. The facility must be licensed from the state or other political entity to care for people with the same condition. 

If you lived in your home for less than 24 months, you may be able to exclude a portion of the gain, but you must qualify for the exception due to a special circumstance. Here are exceptions to the eligibility test:

  • Separation or divorce
  • Death of spouse
  • The sale involved vacant land
  • You owned a remainder interest and sold that right
  • The previous home was destroyed or condemned
  • You were a service member during time of ownership
  • You acquired or relinquished the home in a 1031 like-kind exchange

If you don’t meet the eligibility test, you may still qualify for a partial exclusion of gain due to:

  • A work-related move
  • A health-related move
  • Unforeseeable events such as death, destruction of the home, giving birth to two or more children from one pregnancy, or becoming eligible for unemployment benefits

A partial claim is calculated based on the amount of time spent living in the residence and if you qualify under one of the special circumstances.

Here’s how the exclusion can be calculated: Count the number of months spent living in the home and divide that number by 24. Multiply that number by $250,000 or $500,000 if married. The remaining number is the amount of gain that can potentially be excluded from your taxable income. 

The home sale exclusion can considerably lower your tax liability, but you need to make sure you follow the 2-out-of-5-year rule to be eligible.

This material is for general information and educational purposes only. Information is based on data gathered from what we believe are reliable sources. It is not guaranteed as to accuracy, does not purport to be complete and is not intended to be used as a primary basis for investment decisions.
Realized does not provide tax or legal advice. This material is not a substitute for seeking the advice of a qualified professional for your individual situation.

Download The Capital Gains Tax Calculator

Cap Gains Calculator For Investors
Download Calculator


Cap Gains Calculator For Investors

Download The Capital Gains Tax Calculator

Estimate the cap gains tax owed after selling an asset or property

By providing your email and phone number, you are opting to receive communications from Realized. If you receive a text message and choose to stop receiving further messages, reply STOP to immediately unsubscribe. Msg & Data rates may apply. To manage receiving emails from Realized visit the Manage Preferences link in any email received.