Which Capital Gains are Exempt from Tax? – Don’t Make This Mistake + FAQs
- December 2, 2026
- 7 min read
Several kinds of capital gains escape federal tax: home-sale profit up to $250,000 ($500,000 for a married couple filing jointly), gains erased by the stepped-up basis on inherited assets, growth inside a Roth individual retirement account (IRA), a 529 plan or a Health Savings Account (HSA), qualifying small business stock gains, and long-term gains that land in the 0% bracket. For 2026, the 0% bracket covers taxable income up to $49,450 for single filers and $98,900 for joint filers.
The mistake that costs people the most is confusing tax-deferred with tax-free. A 1031 exchange, a traditional IRA and an Opportunity Zone fund only move the bill to a later year. Many capital gains taxes are deferred for years, but a deferred gain still comes due unless a second rule erases it.
The sections below cover each exemption, the tests you must pass and the dollar limits for 2026 and 2027. They also show where states differ, because a gain that is free on your federal return can still be taxed on your state return.
Which Capital Gains Are Exempt From Federal Tax?
Federal law gives six main breaks on capital gains. Each one has its own test, and a gain that fits none of them is taxed at the regular rates.
- Primary residence sale: Under Section 121, profit on your main home is tax-free up to $250,000, or $500,000 for a married couple filing jointly, if you pass the ownership and use tests.
- Inherited assets: The basis of inherited stock or real estate steps up to its value on the date of death. Growth during the prior owner's life is never taxed.
- Tax-advantaged accounts: Gains inside a Roth IRA, a 529 plan or an HSA are tax-free when you follow the rules. A 401(k) or traditional IRA only defers the tax.
- Qualified small business stock (QSBS): Section 1202 lets you exclude 50% to 100% of the gain on qualifying C corporation stock. The share depends on the issue date and your holding period.
- Like-kind exchanges: A 1031 exchange defers the gain on real property held for investment or business. It postpones the tax and does not exempt the gain.
- The 0% bracket: Long-term gains are taxed at 0% when your taxable income, with the gain included, stays at or under the yearly cutoff.
How the home and inheritance breaks work
The home sale exclusion is the break most families use. The Internal Revenue Service (IRS) explains in Topic 701 that you must have owned the home and lived in it as your main home for at least 2 of the 5 years before the sale.
The inheritance break works in a different way, because nothing is excluded on a form. The heir's basis simply resets to the date-of-death value, so a sale soon after often shows little or no gain.
Which accounts make gains tax-free
A Roth IRA pays out tax-free once you reach age 59½ and the account has met the 5-year rule. A 529 plan does the same for qualified education costs, and an HSA does it for qualified medical costs.
A 401(k) or traditional IRA is different. Trades inside the account are not taxed, but every dollar you withdraw is taxed as ordinary income, so the gain is deferred and never exempt.
What the QSBS exclusion covers now
Two sets of rules now apply, and the issue date of your shares decides which one you get. For stock issued after July 4, 2025, the exclusion is 50% after 3 years, 75% after 4 years and 100% after 5 years. The cap per company is the greater of $15 million or 10 times your basis, and that dollar figure rises to $15.48 million for 2027 under Rev. Proc. 2026-35.
The company's gross assets must be $75 million or less when that newer stock is issued. Stock issued on or before July 4, 2025 keeps the older rules: a 5-year hold, a cap of the greater of $10 million or 10 times basis, and a $50 million gross-asset test.
Why a 1031 exchange is deferral, not exemption
Since 2018, a like-kind exchange has covered real property only, so stocks, equipment, art and crypto no longer qualify. The gain carries over into the replacement property and is taxed when you finally sell for cash.
The tax can vanish only if you hold the last property until death, when your heirs receive a stepped-up basis. Owners deciding between a 1031 exchange or paying tax now should compare the cost of the exchange with the tax they would postpone.
Where the 0% bracket ends in 2026 and 2027
For 2026, long-term gains are taxed at 0% while taxable income stays at or below $49,450 for single filers, $98,900 for married couples filing jointly and $66,200 for heads of household. For 2027, those cutoffs rise to $51,050, $102,100 and $68,350.
The cutoff measures taxable income after deductions, and your gain sits on top of your wages and other income. A couple with $90,000 of other taxable income in 2026 has room for only $8,900 of gain at 0%. A couple with two high salaries has no room at all, so selling shares each year to "use up" the bracket just creates a tax bill.
People with low income in a given year can use that room on purpose. They sell appreciated shares, pay 0%, and buy the same shares back right away at a higher basis. The wash-sale rule does not stop this, because it applies only to losses.
2026 and 2027 Long-Term Capital Gains Tax Brackets
Each filing status has its own cutoff where the 0% rate ends and a second cutoff where the 15% rate ends. Every amount is taxable income with the gain included, and income past the higher cutoff is taxed at 20%.
| Filing status | 2026 0% limit | 2026 15% limit | 2027 0% limit | 2027 15% limit |
|---|---|---|---|---|
| Single | $49,450 | $545,500 | $51,050 | $563,200 |
| Married filing jointly | $98,900 | $613,700 | $102,100 | $633,600 |
| Head of household | $66,200 | $579,600 | $68,350 | $598,400 |
| Married filing separately | $49,450 | $306,850 | $51,050 | $316,800 |
The 2026 amounts come from Rev. Proc. 2025-32, and the 2027 amounts come from section 3.03 of Rev. Proc. 2026-35. Both sets apply to assets held for more than one year.
Higher earners also pay the 3.8% Net Investment Income Tax (NIIT). It applies once modified adjusted gross income (MAGI) passes $200,000 for single filers or $250,000 for joint filers. Those two thresholds are not indexed for inflation, so the top federal rate on a long-term gain is 23.8%.
Short-term gains get none of these rates. A gain on an asset held one year or less is taxed like wages, at your ordinary rate. New investors who expect a flat 20% are often surprised when a few months of trading adds thousands to their bill.
Common Mistakes That Cost People Their Capital Gains Exclusion
The tax breaks are generous, but each one has a test that is easy to fail. These ten errors turn a tax-free gain into a taxable one more often than any others.
Missing the home ownership and use tests
Selling a house does not earn the exclusion by itself. You must own the home and use it as your main home for at least 2 of the 5 years before the sale. The clock counts backward from the closing date of the sale, not forward from move-in day.
The two years of ownership and the two years of use do not have to be the same two years, and neither has to be one unbroken block. Service members on qualified extended duty can pause the 5-year period for up to 10 years, so military homeowners follow a longer timeline.
Selling before two years does not always mean you get nothing. A move caused by work, health or an unforeseen event can earn a partial exclusion, sized to the share of the two years you completed.
Assuming all home sale profit is tax-free
The exclusion has a cap, and profit above it is taxed. A married couple with a $600,000 gain can exclude $500,000 and still owes tax on the other $100,000.
Depreciation is a second trap. If you claimed depreciation after May 6, 1997 for a home office or for renting the home out, that amount cannot be excluded. It is taxed at a rate of up to 25%, even when the exclusion covers the rest of your gain.
Forgetting the once-every-two-years rule
You can generally claim the home sale exclusion only once in any 2-year period. A couple who sells one home in 2026 and a second home 14 months later will usually owe tax on the second gain, unless the second sale qualifies for a partial exclusion.
Not keeping basis records for inherited assets
A stepped-up basis helps only if you can prove it. Get an appraisal or a brokerage statement showing the value on the date of death, because without it you may report a gain and pay tax that the law never required.
A house that a living parent signs over to a child, even for $1, is a gift and not an inheritance. The parent's old basis carries over to the child, so families in that spot often have to dig up records from decades ago to work out the gain.
Confusing tax-deferred with tax-free
A 1031 exchange, a traditional IRA and a traditional 401(k) delay tax without cancelling it. When you sell the replacement property for cash, or withdraw from the retirement account, the tax arrives, so plan for that future bill.
Breaking 1031 exchange rules
A like-kind exchange has two fixed deadlines. You must identify the replacement property within 45 days of the sale and close on it within 180 days.
You also cannot touch the sale money in between, which is why investors use a qualified intermediary to hold it. A missed deadline or a check made out to you makes the whole gain taxable in the year of sale.
Selling qualified stock too early
The holding period for QSBS depends on the issue date. Shares with an issue date of July 4, 2025 or earlier get no exclusion at all if you sell before 5 years. Newer shares earn a 50% exclusion at the 3-year mark, 75% at 4 years and 100% at 5 years.
Selling newer stock a few months short of the next step can cost a quarter of the exclusion. Check the issue date and the calendar before you accept an offer.
Ignoring state taxes
A federal exclusion does not always carry over to your state return. Most states follow the home sale exclusion, but other breaks get mixed treatment. California does not follow the federal QSBS exclusion, so a founder who owes $0 to the IRS can still owe California tax on the full gain.
Overlooking the 0% bracket cutoff
If you are aiming for the 0% rate, add up every source of income first. For 2026 the 0% rate ends at $49,450 of taxable income for single filers and $98,900 for joint filers. For 2027 it ends at $51,050 and $102,100.
A gain that crosses the line is not all taxed, because only the part above the cutoff moves to the 15% rate. Still, a bonus, a Roth conversion or a large dividend late in the year can shrink the room you counted on.
Thinking reinvestment automatically saves tax
There is no general reinvestment exemption. If you sell stock at a gain and buy other stock the same day, the gain is still taxed. The IRS looks at the sale, not at what you did with the cash.
The exceptions are narrow. A 1031 exchange covers real property, an Opportunity Zone fund defers an eligible gain, and a Section 1045 rollover lets you move QSBS gain into new QSBS within 60 days.
What Basis, Exclusion and Deferral Mean for Your Tax Bill
Three ideas decide whether a gain is taxed: your basis, any exclusion that removes gain from your return, and any deferral that moves it to a later year. The terms below come up in every example in this article, and the figures that change each year are labelled 2026 or 2027.
| Term | Meaning (2026-2027) |
|---|---|
| Capital gain | Profit from selling an asset for more than its cost basis. Buy stock for $1,000, sell for $1,500, and the gain is $500. |
| Cost basis | What you paid for an asset, plus commissions and improvements. Your gain equals the sale price minus your basis. |
| Stepped-up basis | An heir's basis resets to the asset's value at the owner's death, so growth during the owner's life is never taxed. |
| Primary residence exclusion (Section 121) | Excludes up to $250,000 of home-sale gain ($500,000 on a joint return) if you owned and lived there 2 of the last 5 years. |
| Like-kind exchange (1031 exchange) | A swap of real property held for investment or business. Tax on the gain is deferred until you sell the replacement property for cash. |
| QSBS issued after July 4, 2025 | C corporation stock, assets up to $75 million. Exclude 50%, 75%, 100% after 3, 4, 5 years. Cap $15 million ($15.48 million for 2027). |
| QSBS issued on or before July 4, 2025 | Gross assets up to $50 million, a 5-year hold, and a cap of $10 million or 10 times basis, whichever is greater. |
| Capital gains tax rates | Long-term gains (held over 1 year): 0%, 15% or 20%. Short-term gains: ordinary rates. Add 3.8% NIIT above $200,000 MAGI single, $250,000 joint. |
| Tax-deferred account | A 401(k), traditional IRA or 403(b). Gains are not taxed while the money stays inside. Withdrawals are taxed as ordinary income. |
| Tax-exempt account | A Roth IRA, 529 plan or HSA. Gains are never taxed when withdrawals follow the rules for retirement, education or medical costs. |
| 0% capital gains bracket | The taxable income range where long-term gains owe no federal tax. Joint filers: up to $98,900 for 2026 and $102,100 for 2027. |
With these terms in hand, the examples that follow are easier to check against your own numbers.
Real-World Examples: Tax-Exempt Capital Gains in Action
Real numbers show the rules better than definitions do. The examples below cover a home sale, a short stay in a home, an inheritance, a retirement account and startup stock.
Example 1: Home Sweet Tax Break – Selling a House for Profit Without Tax
Jane is a single homeowner who bought her house 10 years ago for $200,000. She has lived there as her primary residence the whole time, and in 2026 she sells it for $470,000.
Her gain is $270,000, which is the sale price minus her basis. Under Section 121 she excludes $250,000 of it, so only the remaining $20,000 is a taxable long-term gain.
Whether that $20,000 is taxed at 0% depends on her other income. For 2026, a single filer pays 0% on long-term gains only while taxable income, with the gain included, stays at or below $49,450. Jane has $28,000 of other taxable income after her standard deduction. Adding the gain brings her to $48,000, so she pays $0 on the sale.
A higher salary would change the result. With $40,000 of other taxable income, only $9,450 of the gain would fit under the cutoff. The other $10,550 would be taxed at 15%, a bill of about $1,583.
The paperwork matters even when no tax is due. The closing agent may send Jane Form 1099-S, and a sale with a taxable gain or a Form 1099-S is reported on Form 8949 and Schedule D. Jane lists the sale and the exclusion there.
Two changes show the limits of the break. If Jane were married and filing jointly, the couple could exclude up to $500,000, so her whole gain would be tax-free. If her gain were $600,000 as a single filer, $350,000 would be taxable.
Example: Partial Home Sale Exclusion After a Job Move
Priya, a single filer, buys a condo and lives in it for 12 months. Her employer then moves her to an office 200 miles away, and she sells the condo in 2026. She fails the 2-year test, but the move is for work, so she qualifies for a partial exclusion.
The math uses the share of the 24 months she completed. Twelve months is one half of that period, and half of $250,000 is $125,000 of gain she can exclude.
If Priya's gain is $90,000, all of it is excluded and she owes nothing. If her gain is $160,000, she excludes the partial amount and has a taxable gain of $35,000. Because she owned the condo exactly one year, she should check her closing dates to see whether that taxable part is long-term or short-term.
Three kinds of reasons qualify under IRS Publication 523:
- Work: a new job location at least 50 miles farther from the home than the old one was
- Health: a move to get, or to give, medical care for an illness or injury
- Unforeseen circumstances: events such as a death, divorce, job loss or the birth of twins or more
People who sell early often assume the exclusion is all or nothing and never claim the partial amount. That assumption can cost thousands of dollars on a sale that was forced by a transfer.
Example 2: Inheritance Windfall – Big Gains, No Tax Bill for Heirs
Marco inherits a stock portfolio from his grandmother, who paid $50,000 for the shares many years ago. On the date of her death they were worth $300,000, and a few months later Marco sells them for $310,000.
Because of the stepped-up basis, Marco's basis is the date-of-death value and not the price she paid. His taxable gain is only $10,000. Inherited assets always count as long-term, even though he held them for a few months, so that gain gets the lower long-term rates.
The full picture is simple once the basis is clear. The shares rose $260,000 in total over the years, and $250,000 of that rise is never taxed.
A gift made during life works the other way. If his grandmother had given Marco the shares while she was alive, her original basis would have carried over to him. The same sale would then show the entire rise as a taxable gain.
The estate itself rarely owes tax either. The federal estate tax exemption is $15 million per person for 2026 and $15.48 million for 2027, so most estates pass to heirs with no estate tax and a fresh basis.
Example 3: Retirement Account Growth – Investments Flourish Tax-Free in an IRA
Lisa puts $5,000 into a stock fund inside her Roth IRA at age 30. Over the next 30 years, with dividends reinvested, the fund grows to $50,000. At age 60 she sells the fund and withdraws the money.
Her account earned $45,000, and none of it appeared on a tax return while it grew. Her withdrawal is a qualified distribution because she is past age 59½ and the account has met the 5-year rule, so the full balance comes out tax-free.
In a regular brokerage account, the same sale would produce a taxable long-term gain. A traditional IRA or 401(k) would sit in between. It would defer tax during those three decades, and then tax each withdrawal as ordinary income.
Example 4: Startup Success – $5 Million Capital Gain, 100% Tax-Free (QSBS)
Alex was an early employee at a tech startup organized as a C corporation. In 2018 he received stock with a basis of $50,000. He held it for more than 5 years, and in 2024 a larger company bought his shares for $5,050,000.
His gain was $5,000,000. His stock was issued before July 4, 2025, so the older rules applied: a 5-year hold and a cap of $10 million or 10 times basis. His gain was under the cap, so 100% of it was excluded and he owed $0 in federal tax.
The savings were large. Without the exclusion, a long-term gain of that size could be taxed at up to 23.8%, which is the 20% top rate plus the 3.8% NIIT. That comes to about $1.19 million.
State tax is a separate question. California does not follow Section 1202 and would tax Alex's full gain. Other states differ, so check your own state's rule before you count on a tax-free sale.
New QSBS Rules for Stock Issued After July 4, 2025
Alex's shares fell under the older rules, but newer shares follow different ones. Public Law 119-21, the One Big Beautiful Bill Act, rewrote Section 1202 for stock issued after July 4, 2025. The biggest change is a tiered exclusion: you can exclude 50% after 3 years, 75% after 4 years and 100% after 5 years.
The dollar limits also went up. The cap per company is the greater of $15 million or 10 times your basis. That dollar cap is indexed, and it is $15.48 million for 2027 under Rev. Proc. 2026-35.
More companies can issue qualifying stock as well. The gross-asset test rose from $50 million to $75 million, and the new figure is indexed for inflation starting in 2027.
Older shares, meaning those issued by July 4, 2025, do not get the new terms. They keep the 5-year hold, the $10 million cap and the lower asset test. An employee who holds both older and newer shares has to track each block on its own.
A partial exclusion has a cost that surprises people. Dana receives founder stock in March 2026 and sells it in April 2029, just past 3 years, for a $2 million gain. She excludes half of it, or $1 million. The taxable half faces a rate of up to 28% under the Section 1202 rule, which is about $280,000, and the NIIT can apply to that half too.
If Dana waits until March 2031, she passes the 5-year mark and her whole gain is excluded. The excluded part of a QSBS gain is also free of the 3.8% NIIT.
State law can undo part of the benefit. California would tax Dana's full gain whichever federal tier she reaches, because it does not recognize the exclusion at all.
Taxable vs. Non-Taxable Capital Gains: A Comparison
The same dollar gain can be tax-free, deferred or fully taxed, depending on the asset and how you sell it. Eleven common cases are compared here, from a main-home sale to an Opportunity Zone fund.
| Scenario | Tax result | Why (2026) |
|---|---|---|
| Sell main home for $300,000 profit (single owner, met the 2-year tests) | Mostly tax-free | $250,000 is excluded. The $50,000 above the limit is taxed, possibly at 0% if income is low. |
| Sell main home after 1 year because of a job move, $100,000 profit (single owner) | Tax-free | A partial exclusion of $125,000, based on 12 of 24 months, covers the whole gain. |
| Sell a vacation home for $300,000 profit | Taxable | No exclusion applies to second homes. The full gain is a capital gain. |
| Sell stock in a regular brokerage account for a $10,000 long-term gain | Taxable | No special rule applies. The gain is taxed at 0%, 15% or 20%, depending on taxable income. |
| Sell the same stock inside a Roth IRA for a $10,000 gain | Tax-free | Trades inside a Roth IRA are not taxed, and qualified withdrawals are tax-free. |
| Inherit stock worth $500,000 (prior owner's basis was $100,000) and sell right away at that value | Tax-free | Stepped-up basis leaves no gain. The earlier $400,000 of growth is never taxed. |
| Sell investment property for a $200,000 gain and buy another through a 1031 exchange | Deferred | A proper like-kind exchange postpones the gain. No tax is due now. |
| Sell investment property for a $200,000 gain and take the cash | Taxable | No deferral applies, so the gain is taxed in the year of sale. |
| Sell QSBS for a $5 million gain after 5 or more years | Tax-free | Under the cap: $10 million for shares issued by July 4, 2025; $15 million ($15.48 million for 2027) for later stock. |
| Sell publicly traded stock for a $5 million gain | Taxable | No exclusion applies. The gain faces the 20% rate plus the 3.8% NIIT. |
| Hold a gain deferred in an Opportunity Zone fund under the original program | Taxable | The deferred gain is counted on December 31, 2026 and reported on the 2026 return. |
Key takeaway: the setting of the sale decides the tax. A main home, an inherited asset or qualifying small business stock can produce a tax-free gain. A rental property or an ordinary stock sale usually produces a bill, unless you use a 1031 exchange or hold the asset in a tax-sheltered account.
Find the case that fits you before you sell, because most of these breaks cannot be claimed after the fact. A missed 45-day deadline or a sale one month short of a holding period cannot be repaired on the tax return.
Legal Strategies to Avoid or Defer Capital Gains Tax
Investors with large gains use a small set of legal strategies to cut or delay the tax. Some are open to anyone with a brokerage account, while others suit only people with large holdings or unusual jobs.
Buy, borrow, die
The idea has three steps. You buy assets and let them grow without selling, so no gain is ever reported. You borrow against them when you need cash, because loan proceeds are not income. At death, your heirs receive a stepped-up basis that erases the gain for income tax.
The estate tax is the limit on this plan. The federal estate exemption is $15 million per person for 2026 and $15.48 million for 2027. Estates under that amount owe no estate tax, while loan interest keeps adding up during life.
Swap till you drop with 1031 exchanges
A real estate investor can exchange one property for another again and again, and each exchange defers the gain from the last one. An owner might start with a small rental, move to a larger building, and never sell for cash.
If the owner dies still holding the last property, the heirs get a stepped-up basis. The gains deferred over a lifetime are then never taxed. The rules apply to real property only, and every exchange must meet the 45-day and 180-day deadlines.
Tax-loss harvesting
Selling a losing investment creates a loss that cancels a gain. A $10,000 loss set against a gain of the same size leaves no net gain to tax. The details of how gains are offset by losses matter, because short-term and long-term amounts are netted in a set order.
The wash-sale rule is the main hazard. If you buy the same or a nearly identical security within 30 days before or after the sale, the loss is disallowed for now and is added to the basis of the new shares instead. Investors who trade often are sometimes shocked to find their taxable gain is thousands higher than their real profit for this reason.
Giving appreciated assets to charity
When you give stock that has risen in value to a charity, you never report the gain. You may also deduct the stock's fair market value if you held it for more than one year, and the charity pays no tax when it sells.
Two limits apply. The deduction for appreciated stock given to a public charity is capped at 30% of adjusted gross income (AGI), with a carryover for the excess. Starting with 2026 returns, itemizers can deduct only the part of their total gifts that is above 0.5% of AGI.
Opportunity Zone funds
The original program let investors defer a gain by putting it into a Qualified Opportunity Fund, and that deferral is ending. Gains deferred under the original program must be counted on December 31, 2026 and reported on the 2026 return, as the IRS Opportunity Zone guidance explains.
The program is now permanent, with new terms for gains invested from January 1, 2027 in newly designated zones. Deferral lasts 5 years, and basis rises by 10% of the deferred gain at the end of that period, or 30% for a qualified rural fund. Growth in the fund itself is tax-free after 10 years. IRS Notice 2026-40 is the current guidance on moving into the new program.
Tax-exempt wrappers
Some products shelter growth outside an IRA. Permanent life insurance builds cash value that grows tax-deferred, and policy loans are generally not taxed. The death benefit is generally income-tax-free as well, but fees can be high, so the tax benefit has to be weighed against the cost.
A 529 plan and an HSA are simpler. Money in a 529 plan grows and comes out tax-free for qualified education costs, and an HSA does the same for qualified medical costs.
Moving to a lower-tax state or to Puerto Rico
Some people move before a large sale. A founder who leaves California for Texas or Florida and truly changes residency pays no state tax on a later sale. States audit these moves, so the change of home, driver's license, voter registration and days spent must be real.
Puerto Rico has its own program under Act 60, and its terms are changing. New resident-investor applicants from 2027 pay a 4% Puerto Rico rate on covered gains, while applications filed by December 31, 2026 keep the earlier 0% treatment. In both cases, gain that built up before the move still faces U.S. tax.
Carried interest for fund managers
Managers of private equity and hedge funds receive a share of fund profits called carried interest, which can be taxed as long-term capital gain instead of wages. Section 1061 requires a holding period of more than 3 years for that treatment. Gain on assets held for a shorter time is taxed at short-term rates, and ordinary investors cannot use this rule at all.
Why these strategies need care
Each strategy rests on a specific rule. They range from simple steps, like harvesting losses each December, to major ones, like moving across the country. Planning ahead often lets a family build and pass on wealth with far less tax than a plain sale would cost.
Some of these strategies carry strict deadlines, fees or audit risk, and tax law changes. A single misstep on a large sale can cost tens of thousands of dollars, so talk with a tax professional before you act on the advanced ones.
How State Capital Gains Taxes Differ by Where You Live
Federal law is only half of the bill. Your state can add nothing, or it can add more than 13% on top. Whether your gains are taxed at the state level depends on where you are a resident in the year of the sale.
California: high rates and no QSBS exclusion
California taxes capital gains as ordinary income, at rates up to 13.3%, and it has no lower rate for long-term gains. It does follow the federal home sale exclusion, so a main-home gain within the $250,000 or $500,000 limit is free of California tax too.
California does not follow the federal QSBS exclusion. A founder whose gain is fully excluded on the federal return still owes California tax on all of it.
The combined cost is steep for high earners. A $100,000 long-term gain can cost $23,800 in federal tax, which is 20% plus the 3.8% NIIT, and about $13,300 more in California tax.
States with no tax on capital gains
Eight states do not tax capital gains: Alaska, Florida, Nevada, New Hampshire, South Dakota, Tennessee, Texas and Wyoming. A $1 million stock gain that could cost more than $100,000 in California tax costs $0 in state tax in Florida.
Many retirees set up residency in one of these states before they sell a business or a large stock position. Washington is often added to this list by mistake, because it has no tax on wages but does tax capital gains. Missouri, which has an income tax, has let individuals deduct their capital gains since tax year 2025.
Wisconsin and South Carolina: partial exclusions
A few states tax only part of a long-term gain. South Carolina lets you exclude 44% of net long-term capital gains from state taxable income.
Wisconsin excludes 30% of net long-term gains, or 60% for farm assets. On a $10,000 long-term gain, $3,000 is excluded and $7,000 is taxed at Wisconsin's graduated rates, which top out at 7.65%.
New York: state tax plus city tax
New York taxes capital gains as ordinary income, with a top state rate of 10.9%. New York City residents pay city income tax of up to 3.876% on top of that.
The state generally follows the federal home sale exclusion and the stepped-up basis. For a high earner in the city, the federal, state and city rates on a gain can add up to more than 35%.
Washington: a tax on capital gains only
Washington has no tax on wages, but it taxes long-term capital gains. The rate is 7% on gains above a standard deduction that was $278,000 for 2025 and is indexed each year. The Washington Department of Revenue posts the amount for 2026.
Starting with 2025, taxable gains above $1 million pay an extra 2.9%, for a total of 9.9%. Real estate sales and retirement accounts are exempt. QSBS sales are not exempt, so a founder in Seattle can owe Washington tax on a gain that is free on the federal return.
Washington has also passed a separate income tax on income over $1 million, which starts in 2028. People planning a large sale there should watch both taxes.
Massachusetts: a surtax and a higher short-term rate
Massachusetts taxes most long-term gains at its regular 5% rate, while short-term gains are taxed at 8.5%. A 4% surtax applies to income, gains included, above the state's indexed millionaire threshold. One large sale can push a household over that line for a single year.
How federal exclusions flow through to state returns
Most states start with your federal adjusted gross income or federal taxable income. A federal exclusion, like the one for a home sale, usually lowers your state income too.
The match is not complete, and California's refusal to follow the QSBS exclusion is the clearest example. Pennsylvania used to tax like-kind exchanges, but it has followed the federal 1031 rule since tax year 2023 and taxes gains at its flat 3.07% rate. New Jersey does not tax gains on certain New Jersey government bonds.
Where you live can change your after-tax profit by a large amount. For a big sale, look up your state's rule first, and remember that a move only counts if your residency truly changes before the sale.
What to Do Next
- Find your purchase closing statement and your receipts for improvements, then add them up to set your basis.
- Count the months you owned and lived in your home during the 5 years before your planned sale date.
- Add the expected gain to your other 2026 taxable income and compare the total with $49,450 (single) or $98,900 (joint).
- Check the issue date of any startup stock to see whether it was issued on or before July 4, 2025, or after.
- Set aside cash now if you hold an Opportunity Zone fund from the original program, because the deferred gain is counted on December 31, 2026.
Frequently Asked Questions
What types of capital gains are tax-exempt?
Home sale profit within the $250,000 or $500,000 limits, inherited gains erased by a stepped-up basis, growth in Roth IRAs, 529 plans and HSAs, qualifying small business stock, and long-term gains in the 0% bracket. A 1031 exchange and an Opportunity Zone fund defer tax. They do not exempt the gain.
Is profit from selling my house taxable?
Usually no. A primary residence that meets the 2-year tests gets an exclusion of $250,000 (single) or $500,000 (joint). A work, health or unforeseen move can earn a partial exclusion. Depreciation for a home office or rental use is taxed. Report a sale with a Form 1099-S or taxable gain on Form 8949 and Schedule D.
Do I pay capital gains tax on inherited property or stocks?
Generally not on growth that happened before the death. Inherited assets get a stepped-up basis equal to their value on that date, so a quick sale shows little or no gain. Inherited assets always count as long-term. A gift received while the giver is alive keeps the giver's basis, with no step-up.
How can I avoid paying capital gains tax legally?
Claim the home sale exclusion, hold investments in Roth accounts, harvest losses against gains, and time sales so your 2026 taxable income stays in the 0% bracket ($49,450 single, $98,900 joint). A 1031 exchange defers tax on real property only. Qualifying small business stock and gifts of appreciated assets to charity also cut the bill.
Which states have no capital gains tax?
Alaska, Florida, Nevada, New Hampshire, South Dakota, Tennessee, Texas and Wyoming do not tax capital gains. Washington has no tax on wages, but it taxes long-term capital gains at 7%, and at 9.9% on gains above $1 million. Most other states tax gains at the same rates as regular income.
What is the 0% capital gains tax bracket?
It is the taxable income range where long-term gains owe 0% federal tax. For 2026 it ends at $49,450 for single filers, $98,900 for joint filers and $66,200 for heads of household. For 2027 it ends at $51,050, $102,100 and $68,350. The test uses taxable income with the gain included.
Are capital gains in an IRA or 401(k) taxable?
No. Investments inside a traditional IRA or 401(k) grow tax-deferred, and investments inside a Roth account grow tax-free. You pay no capital gains tax on trades within the account. Qualified Roth withdrawals are tax-free. Traditional withdrawals are taxed as ordinary income, not as capital gains.
Do I owe tax if I reinvest my capital gains?
Yes, in most cases. Reinvesting the money does not cancel the gain. Three narrow rules help: a 1031 exchange for real property, an Opportunity Zone fund, which defers an eligible gain (for 5 years on investments from 2027), and a Section 1045 rollover of QSBS gain into new QSBS within 60 days.
Is there a capital gains exemption for seniors over 55 or 65?
No. Age-based capital gains breaks ended when the over-55 home exclusion was replaced by the $250,000 and $500,000 exclusion, open to any age. Seniors pay 0% on long-term gains if 2026 taxable income is at most $49,450 (single) or $98,900 (joint). The age-65 standard deduction and the $6,000 senior deduction for 2025 through 2028 lower that income.
I deferred a gain in an Opportunity Zone fund. When do I owe the tax?
Gains deferred under the original program are counted on December 31, 2026, or earlier if you sell the investment. The tax is due with the 2026 return you file in 2027. The amount is the smaller of the deferred gain or the investment's fair market value, minus any basis increase. Investments from January 1, 2027 get a 5-year deferral.
Related reading
- What is Capital Gains Tax on Real Estate – Avoid This Mistake + FAQs
- How to Avoid Capital Gains Tax on Sale of Commercial Property? + FAQs
- How Does Capital Gains Tax Work on Property? + FAQs
- Can I Move Into My Rental Property to Avoid Capital Gains Tax? + FAQs
- Are Military Homeowners Exempt from Capital Gains? (w/Examples) + FAQs
- Who Can Claim Lifetime Capital Gains Exemption? (w/Examples) + FAQs