What is the 2 out of 5 years exclusion for capital gains?

Asked by: Bernita Larson  |  Last update: August 31, 2026
Score: 4.1/5 (2 votes)

The 2-out-of-5-year rule (IRS Section 121 exclusion) allows homeowners to exclude up to $ 250 , 000 $ 2 5 0 , 0 0 0 ( $ 500 , 000 $ 5 0 0 , 0 0 0 for married couples filing jointly) of capital gains from the sale of a primary residence. To qualify, you must have owned and lived in the home as your main home for at least 24 months (two years) out of the five-year period ending on the date of sale.

How to prove 2 out of 5 year rule?

If you used and owned the property as your principal residence for an aggregated 2 years out of the 5-year period ending on the date of sale, you have met the ownership and use requirements for the exclusion. This is true even though the property was used as rental property for the 3 years before the date of the sale.

What is the 2 out of 5 year rule?

The 2-in-5-Year Rule

The two-in-five-year rule comes into play. Simply put, this means that during the previous five years, if you lived in a home for a total of two years, or 730 days, that can qualify as your primary residence. The 24 months don't have to be in a particular block of time.

What is the 2 year rule on capital gains tax?

Frequency of Exclusion: The capital gains tax exclusion for the sale of a primary residence can typically be claimed once every two years. This means that if you claimed it on a sale, you generally need to wait two years before claiming it again.

What is the 5 year rule for capital gains?

The "5-year rule" for capital gains tax primarily refers to the IRS's 2-out-of-5-year test for excluding gain on the sale of a primary residence, requiring you to have owned and lived in the home for at least two of the five years before selling it to exclude up to $250k (single) or $500k (married filing jointly) of profit. There are also rules for investment properties, like 1031 exchanges, which involve holding periods, and state-level exceptions, but the main federal rule is for your primary home. 

How to Avoid Capital Gains Tax Legally (2025)

34 related questions found

Who qualifies for 0% capital gains?

To qualify for 0% capital gains tax, you must have long-term capital gains (assets held over a year) and your taxable income (after deductions) must fall below specific IRS thresholds, which change annually but are roughly <$48,350 for single filers and <$96,700 for married filing jointly for the 2025 tax year, allowing for higher total income when combined with deductions like the standard deduction. The key is keeping your adjusted gross income (AGI) low enough so that after subtracting deductions, your taxable income remains within these limits. 

How much capital gains will I pay on $100,000?

On a $100,000 capital gain, you'll likely pay 15% for long-term gains, resulting in about $15,000 in federal tax (plus potential state tax), but it could be 0% or 20% depending on your total taxable income and filing status, while short-term gains are taxed as ordinary income (potentially 22-24%). 

What is the 2 year 5 year rule?

The "2-year, 5-year rule" primarily refers to the IRS rule allowing homeowners to exclude up to $250,000 (or $500,000 married) of capital gains from the sale of their primary residence if they owned and lived in it as their main home for at least 2 years out of the 5 years before the sale, meeting both ownership and use tests within that 5-year window. There's also a "5-year rule" for Roth IRAs, requiring separate 5-year periods for contributions and conversions to avoid taxes. 

Does improvements on my home affect capital gains?

Unlike business expenses, you can't simply write off a kitchen renovation or new flooring on your current tax return. However, this doesn't mean your improvements provide no tax benefit. They may impact your capital gains tax when selling the home.

How do I prove my primary residence to avoid capital gains tax?

Determine whether you meet the residence requirement.

If you owned the home and used it as your residence for at least 24 months of the previous 5 years, you meet the residence requirement.

What are some common capital gains tax mistakes?

One of the simplest yet most expensive mistakes is misunderstanding the difference between short-term and long-term capital gains taxes. Short-term gains — profits from assets held less than a year — are subject to typical income tax rates, which can reach 37% for high earners.

How many times can you use the capital gains exclusion?

You're only allowed to exclude gain on the sale of a home once every two years.

How long do you have to keep an investment to avoid capital gains?

Generally, if you hold the asset for more than one year before you dispose of it, your capital gain or loss is long-term. If you hold it one year or less, your capital gain or loss is short-term.

Can you spread capital gains over 5 years?

The reserve must be recalculated to determine the allowable deduction, if any, in the year following the year a reserve is claimed. Generally, the maximum period over which you can spread out the taxation of a capital gain is five years.

Is there a once-in-a lifetime capital gains exemption?

In the context of capital gains tax in the United States, there isn't a once-in-a-lifetime exemption for all types of capital gains. However, there is a significant exemption related to the sale of a primary residence.

How to get 0% tax on capital gains?

2. Manage your tax bracket. At the lowest income levels, the capital gains tax rate is 0%, which means no federal income taxes on your gains (state income taxes may still apply). For a married couple filing jointly, the maximum taxable income to qualify for the 0% rate is $96,700 in 2025.

How do the rich not pay capital gains?

Billionaires often employ the “buy, borrow, die” strategy to avoid income and capital gains taxes. First, they acquire appreciating assets like stocks or real estate. Instead of selling these assets when they need cash (which would trigger capital gains tax), they borrow against them at favorable interest rates.

How long do I have to live in a house to avoid capital gains in Canada?

As of January 1, 2023, there are new rules if you own a housing unit (including a rental property) for fewer than 365 consecutive days. In most cases, any rise in value will not qualify for the capital gains exemption and, moreover, will be taxable as business income rather than a capital gain.

What are exceptions to the 2 out of 5 year rule?

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

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 to care for people with the same condition.

What is the capital gains tax for people over 65?

The capital gains tax over 65 is a tax that applies to taxable capital gains realized by individuals over the age of 65. The tax rate starts at 0% for long-term capital gains on assets held for more than one year and 15% for short-term capital gains on assets held for less than one year.

How much is capital gains tax on a $500,000 house?

When you sell your primary residence, $250,000 of capital gains (or $500,000 for a couple) are exempted from capital gains taxation. This is generally true only if you have owned and used your home as your main residence for at least two out of the five years prior to the sale.

How can I legally avoid capital gains tax?

A common way to defer or reduce your capital gains taxes is to use tax-advantaged accounts. Retirement accounts such as 401(k) plans, and individual retirement accounts offer tax-deferred investment. You don't pay income or capital gains taxes on assets while they remain in the account.

How do I avoid capital gains tax on my property in Canada?

Use your principal residence exemption

Your principal residence is exempt from the capital gains tax. To claim this exemption, make sure: You own the home, alone or jointly. You've designated the property as your principal residence with the CRA.