What Is the Two-Out-of-Five-Year Rule?

By JC Pacific Corp Published 2026-09-01 Last professionally reviewed: September 2026

The two-out-of-five-year rule generally refers to owning and using a home as a principal residence for at least two years during the five years ending on the sale date. Ownership and use are separate tests.

Must the two years be continuous?

Not necessarily. Qualifying periods may consist of separate time segments, subject to the rules and the seller's facts.

Do married spouses follow special rules?

For certain married couples filing jointly, ownership and use requirements are applied under specific federal rules. One spouse's death, divorce, separation, or prior residence may also affect the calculation. Do not assume that marriage automatically creates the full joint exclusion.

What if I moved out before selling?

A seller may still satisfy the use test if enough qualifying residence occurred within the relevant five-year period. However, rental use, depreciation, and nonqualified-use rules may affect the taxable result.

Frequently Asked Questions

Does receiving mail prove principal residence?

No single item automatically proves residency. Tax authorities evaluate facts and records.

What if I own two homes?

Only one property is generally the principal residence at a time based on facts and circumstances.

Can I qualify after living there exactly 24 months?

Exact dates matter. Have a tax professional calculate the relevant periods.

Educational information

This is a general explanation of a federal tax concept, not an eligibility determination.

Create a timeline showing purchase, occupancy, move-out, rental, and sale dates before asking whether you qualify.

Wire-fraud warning

Always verify wire instructions by telephone using a known, independently confirmed number. Never rely on email instructions alone. If you suspect fraud, contact your bank, escrow, your agent and law enforcement immediately.

Read our wire-fraud protection guide

Put this guide to work

The next step is a conversation with a local agent.

JC Pacific Corp is an Irvine-based Southern California brokerage helping buyers navigate offers, escrow, and financing. Tell us what you are looking for and we will point you to current options across the region.

A note on legal advice: These guides provide general, educational information about California real estate practice. They are not legal advice and do not create an attorney-client relationship. Mortgage information is general education, not individualized lending, tax or legal guidance. For advice about your specific offer, contract, closing or financing, consult a qualified California real estate attorney and a qualified mortgage professional.

A note on these tax guides: The California home-sale tax articles provide general educational information and have been reviewed by a qualified California tax professional. They are not tax, legal, accounting, financial, or insurance advice, and JC Pacific Corp and its real estate professionals are not tax advisers. Sale price, equity, net proceeds, taxable gain, withholding, and final tax are different numbers, and withholding is a collection mechanism, not a determination of final tax liability. Verify current IRS and California Franchise Tax Board forms and rules with a qualified tax professional before making decisions.