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.
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.
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.
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.
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.
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.
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%).
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.
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.
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.
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.
You're only allowed to exclude gain on the sale of a home once every two years.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.