Definition
The IRS requirement that a home seller must have owned and occupied the home as their principal residence for at least 2 of the 5 years immediately preceding the sale to qualify for the principal residence exclusion.
Not sure where this fits?
Answer a few questions and we’ll open the path that fits, at the right step.
Find my pathAbout this term
The 2-of-5 year rule is the key requirement for principal residence exclusion. You must own the home and occupy it as your main home for at least 24 of the 60 months immediately before sale. The months don't need to be consecutive—you can have breaks. If you buy a house, live there 3 years, move for a job, and sell a year later, you meet the test (3 years out of the last 5 meets the 2-year requirement). However, if you buy and sell within 2 years, you don't qualify. The test applies to both ownership (some states allow surviving spouses to use deceased spouse's time) and occupancy (you must actually live there). Military personnel, government employees, and others with job-required moves have special rules extending the test period to 10 years. Understanding this rule is crucial before selling—if you don't meet the test, your entire gain is taxable. Some people renovate homes as investments and sell after 1-2 years, discovering they don't qualify for the exclusion.
Pro Tip
Before selling, verify you meet the 2-of-5 year test. Don't assume you qualify—count months carefully. Renting out your home stops the clock on occupancy.
Example
You buy a home in January, live there for 30 months, and rent it out for 12 months before selling. You don't meet the 2-of-5 test because you didn't occupy it as your principal residence for 24 of the last 60 months; you occupied it for only 30 months total.