How much capital gains is exempt from tax depends on the kind of asset, how long you held it, and your total income. For 2026, a single filer can realize up to $49,450 in taxable income (gains included) at a zero percent federal long-term capital gains rate. On top of that, homeowners can exclude up to $250,000 of profit from selling a primary residence ($500,000 for joint filers), heirs pay nothing on a lifetime of appreciation thanks to the stepped-up basis, investors in qualifying small business stock can exclude up to $10 million, and gains inside a Roth account are never taxed at all. Each shelter has its own rules, and a few surtaxes and traps can pull back what looks like a tax-free result.
The Zero Percent Long-Term Capital Gains Rate
Profits from selling assets held longer than one year get their own tax brackets, separate from ordinary income. For the 2026 tax year, the zero percent rate applies to taxable income up to:1Tax Foundation. 2026 Tax Brackets and Federal Income Tax Rates
- Single filers: $49,450
- Married filing jointly: $98,900
- Head of household: $66,200
The catch that surprises most people: the capital gain itself counts toward that taxable income figure. If your wages and other income already sit at $45,000 and you realize a $20,000 long-term gain, only the first $4,450 of that gain fits inside the zero percent bracket as a single filer. The remaining $15,550 gets taxed at 15 percent. Taxable income here means income after deductions, so the standard deduction (or itemizing) can pull more of your gains into the zero zone.
Above the zero threshold, long-term gains are taxed at 15 percent for most filers. The rate climbs to 20 percent only at high incomes — $545,500 for single filers and $613,700 for joint filers in 2026.1Tax Foundation. 2026 Tax Brackets and Federal Income Tax Rates Short-term gains, on assets held a year or less, don’t get any of these preferential rates; they’re taxed as ordinary income.2Internal Revenue Service. Topic No. 409, Capital Gains and Losses
The 3.8 Percent Surtax That Can Still Apply
Even when your gains land in the zero percent bracket, a separate surtax can reach them. The net investment income tax adds 3.8 percent on top of whatever capital gains rate you owe if your modified adjusted gross income crosses:3Office of the Law Revision Counsel. 26 USC 1411 – Imposition of Tax
- Single or head of household: $200,000
- Married filing jointly: $250,000
- Married filing separately: $125,000
These thresholds are not indexed for inflation and have sat at the same dollar amounts since 2013. The 3.8 percent applies to the lesser of your net investment income or the amount by which your income exceeds the threshold. A single filer earning $210,000 with $50,000 in capital gains would owe the surtax on $10,000 of those gains.3Office of the Law Revision Counsel. 26 USC 1411 – Imposition of Tax
Up to $500,000 on the Sale of Your Home
The single largest capital gains exclusion most Americans will ever use applies to selling a primary residence. Single homeowners can exclude up to $250,000 of profit; married couples filing jointly can exclude up to $500,000.4Office of the Law Revision Counsel. 26 U.S. Code 121 – Exclusion of Gain From Sale of Principal Residence The exclusion covers the gain, not the sale price, and there’s no requirement to reinvest the money in another home.
You have to pass both an ownership test and a use test. The home must have been yours for at least two of the five years before sale, and you must have lived in it as your primary residence for at least two of those five years. The two-year periods don’t need to be consecutive. Someone who lived in the home for 18 months, rented it for two years, and moved back for six months still qualifies.4Office of the Law Revision Counsel. 26 U.S. Code 121 – Exclusion of Gain From Sale of Principal Residence You also can’t have claimed this exclusion on another home sale in the past two years.
Partial Exclusion for Early Sales
Selling before the two-year mark can still bring a reduced exclusion if the move was triggered by a job relocation, health issue, or qualifying unforeseen event such as divorce, involuntary property conversion, or eligibility for unemployment compensation. The partial amount is the number of months you lived in the home divided by 24, multiplied by $250,000 (or $500,000).5Internal Revenue Service. Publication 523, Selling Your Home A single filer who lived in the home 15 months before a qualifying job transfer could exclude roughly $156,250.
The Depreciation Recapture Carve-Out
If you claimed a home office deduction or rented part of the house, any depreciation you previously deducted falls outside the Section 121 exclusion. That portion of the gain is taxed separately at a maximum rate of 25 percent, no matter how much of the $250,000 or $500,000 shelter you still have available.5Internal Revenue Service. Publication 523, Selling Your Home The exclusion protects appreciation, not depreciation you already benefited from.
Inherited Assets Get a Fresh Basis
When someone dies and leaves assets to an heir, the tax basis resets to the fair market value on the date of death.6Office of the Law Revision Counsel. 26 U.S. Code 1014 – Basis of Property Acquired From a Decedent All the appreciation that built up during the original owner’s lifetime is erased for capital gains purposes. A parent who bought stock for $5,000 that grew to $200,000 by the time they died leaves the heir with a $200,000 basis. Selling immediately triggers zero federal capital gains tax on the $195,000 of growth.
The step-up applies broadly to stocks, bonds, real estate, and business interests. The main exception is tax-deferred retirement accounts such as traditional IRAs and 401(k)s, where distributions are taxed as ordinary income no matter who receives them.
In community property states, both halves of jointly owned marital property receive the stepped-up basis when one spouse dies. In separate property states, only the deceased spouse’s share resets, so the surviving spouse can still be sitting on a large unrealized gain in their own half of jointly held assets.
Gifted Assets Work Differently
Gifts don’t get the same treatment as inheritances. Instead of a basis reset, the recipient inherits the donor’s original cost basis. Parents who bought stock for $10,000 and gift it while it’s worth $80,000 hand you a $10,000 basis, and selling triggers a $70,000 taxable gain.7Internal Revenue Service. Property (Basis, Sale of Home, etc.)
For highly appreciated assets, the difference between gifting during life and passing them at death is often the difference between full taxation of the recipient’s gain and no capital gains tax at all. One wrinkle: if fair market value at the time of the gift is lower than the donor’s basis, the recipient must use the lower fair market value to calculate any future loss, which prevents shifting losses to a higher-bracket family member.7Internal Revenue Service. Property (Basis, Sale of Home, etc.)
Deferring Real Estate Gains With a 1031 Exchange
Section 1031 lets you swap one piece of investment or business real estate for another without recognizing the capital gain at the time of the exchange.8Office of the Law Revision Counsel. 26 USC 1031 – Exchange of Real Property Held for Productive Use or Investment This is deferral rather than exemption. The gain rolls into the replacement property’s basis and stays there until you eventually sell without doing another exchange. Some investors chain 1031 exchanges across decades and then pass the final property to heirs, who receive the stepped-up basis and wipe the deferred gain out entirely.
The rules are strict. Both properties must be real property held for business or investment; a personal residence and property held for quick resale don’t qualify.8Office of the Law Revision Counsel. 26 USC 1031 – Exchange of Real Property Held for Productive Use or Investment You have 45 days from selling the original property to identify potential replacements in writing, and 180 days to close. Missing either deadline kills the deferral.
Up to $10 Million on Qualified Small Business Stock
Section 1202 may be the most generous exclusion in the code. Hold qualifying stock for more than five years and you can exclude up to 100 percent of the gain, capped at the greater of $10 million or ten times your original investment in the company’s stock.9Office of the Law Revision Counsel. 26 U.S. Code 1202 – Partial Exclusion for Gain From Certain Small Business Stock The 100 percent exclusion applies to stock acquired after September 27, 2010.
Qualifying is the hard part. The stock must be issued by a domestic C corporation with gross assets of $50 million or less at the time of issuance. You must acquire the stock at original issuance; buying on the secondary market doesn’t count. And the corporation must be actively running a qualified business, which excludes professional services firms (law, accounting, consulting, financial services), restaurants, hotels, and businesses whose value comes mainly from the reputation of employees. Founders and early employees of technology startups are the most common beneficiaries.
Gains Inside a Roth Account Are Never Taxed
Investments held inside a Roth IRA or Roth 401(k) grow free of capital gains tax. You can buy and sell within the account as often as you want without triggering a taxable event, and qualified withdrawals of both contributions and earnings come out tax-free. To pull earnings out tax-free, you need to be at least 59½ and the account must have been open for at least five years. Original contributions (already-taxed money) can come out at any time without tax or penalty.
Roth contributions aren’t deductible; you fund them with after-tax dollars. For someone expecting significant growth over decades, that tradeoff can shield an enormous amount of gain from any federal tax. The 2026 annual contribution limit for Roth IRAs is $7,000, or $8,000 at age 50 or older, and income limits restrict who can contribute directly.
Offsetting Gains With Capital Losses
You can reduce taxable capital gains dollar-for-dollar with capital losses from the same year. Sell one stock for a $30,000 profit and another for a $30,000 loss, and the two cancel. Short-term losses offset short-term gains first, long-term losses offset long-term gains first, and any remainder crosses over to the other category.2Internal Revenue Service. Topic No. 409, Capital Gains and Losses
When losses exceed gains, you can deduct up to $3,000 of the excess against ordinary income ($1,500 if married filing separately). Anything beyond that carries forward indefinitely, offsetting gains and income in future years under the same rules.2Internal Revenue Service. Topic No. 409, Capital Gains and Losses
Watch the Wash Sale Rule
Selling at a loss to harvest a tax benefit is fully legal, unless you buy back the same or a substantially identical investment within 30 days before or after the sale. The wash sale rule disallows the loss for that year if you repurchase inside the 61-day window.10Office of the Law Revision Counsel. 26 USC 1091 – Loss From Wash Sales of Stock or Securities The disallowed amount gets added to the basis of the replacement shares, so it isn’t gone forever, but you can’t use it against this year’s gains. The rule applies to stocks, bonds, ETFs, and mutual funds. It does not currently apply to cryptocurrency.
The window catches more people than you’d expect. Buying shares of the same company in a different brokerage account, having a dividend reinvestment plan pick up shares automatically, or acquiring the stock inside your IRA can all trigger it. The safest approach is waiting 31 days or moving the proceeds into a different fund that covers a similar sector without holding substantially identical securities.
State Tax Is a Separate Calculation
Every exemption above applies to federal tax only. Most states with an income tax also tax capital gains, and treatment varies widely. Some states have no income tax at all; others tax capital gains at rates reaching 13 percent or higher. Some conform to the federal home sale exclusion and stepped-up basis; others don’t. Landing in the zero percent federal bracket doesn’t mean you owe nothing — your state bill runs on its own rules.