Monday, July 20, 2026 2026 Tax Year Edition

See the Math · Trust the Number · Every Figure Cites Its IRC Section

12+ legal strategies, each with the statute Every figure cites its IRC section Avoidance, not evasion — the rules Congress wrote

How to Avoid Capital Gains Tax (Legally, in 2026)

Twelve legitimate ways to reduce, defer, or eliminate the tax on your gains — the strategy, exactly who it fits, the IRC section behind it, and the catch that trips people up.

Reviewed & updated · 2026 tax-year figures · Federal law

Quick answer

There is no button that erases capital gains tax — but the tax code is full of legitimate levers, and using them is avoidance, not evasion. The most reliable moves: hold more than one year for the 0/15/20% long-term rates (IRC §1(h)), realize gains in a year your income lands in the 0% bracket, harvest losses to offset gains, and use the $250k/$500k home-sale exclusion (IRC §121). Bigger positions can be deferred with a §1031 exchange, an Opportunity Zone fund (§1400Z-2), or eliminated at death via the step-up in basis (IRC §1014).

0%
Bracket to harvest into
IRC §1(h)
$250k/$500k
Home exclusion
IRC §121
Defer
§1031 & Opp. Zones
§1031 / §1400Z
Step-up
Basis reset at death
IRC §1014

Avoiding tax vs. evading it — the line that matters

Every strategy below is written into the Internal Revenue Code. Using them is tax avoidance, which the Supreme Court has long recognized as a taxpayer's right; tax evasion — hiding income or faking a transaction — is a crime. The difference is that avoidance follows the rule as written, including its conditions and its paperwork. Miss the holding period, blow the 45-day exchange window, or skip Form 8949 and the strategy simply fails. So treat each "catch" below as part of the strategy, not a footnote.

The strategies, one by one

01 Hold longer than one year

Reduces rateAnyone with a gain
How it works
Sell an asset held one year or less and the gain is short-term, taxed as ordinary income up to 37%. Cross the one-year-and-a-day mark and it becomes long-term, taxed at 0%, 15%, or 20% IRC §1(h). That can be a 17-point swing on the identical gain.
Who it fits
Everyone — but especially traders and RSU/option holders tempted to sell early.
The catch
The clock starts the day after you acquire the asset. Selling even a day early forfeits the whole long-term rate. For gifted or inherited shares, holding-period rules differ.

→ Compare the two on the long-term and short-term hubs, or run your dates in the calculator.

02 Realize gains in the 0% bracket

Can eliminateLow-income years
How it works
Long-term gains stack on top of your other taxable income. Any gain that keeps total taxable income at or below the 0% ceiling — roughly $49,450 single / $98,900 married-filing-jointly (est.) for 2026 — is taxed at 0% IRC §1(h). Time a sale into a sabbatical, an early-retirement year, or a business-loss year and part of the gain can be entirely tax-free.
Who it fits
Retirees before Social Security/RMDs, students, people between jobs, business owners with a down year.
The catch
Only the slice of gain below the ceiling is at 0% — the gain itself pushes your income up, so a big sale spills into the 15% band. You can also "harvest" gains yearly and rebuy to reset basis (no wash-sale rule on gains).

→ Find your exact 0% ceiling on the 2026 rate tables.

03 Tax-loss harvesting

Reduces gainTaxable brokerage
How it works
Capital losses offset capital gains dollar-for-dollar, and up to $3,000 of net loss can offset ordinary income each year, with the rest carried forward indefinitely IRS Topic 409. Sell losers to bank losses that cancel your winners.
Who it fits
Anyone with a taxable brokerage account holding both gains and unrealized losses.
The catch
The wash-sale rule disallows the loss if you buy the same or a "substantially identical" security within 30 days before or after the sale. Buy a similar-but-not-identical fund to stay invested, and never let the tax tail wag the investment dog.

→ See how a loss changes the bill in the calculator.

Layering pays. These stack: hold long-term (01), harvest losses (03) to shrink the taxable gain, and time what remains into a low-income year (02). Three legal levers on one sale.
Advertisement

04 §121 primary-residence exclusion

Can eliminateHomeowners
How it works
Exclude up to $250,000 of gain on your main home if single, or $500,000 married-filing-jointly IRC §121. You must have owned and used it as your main residence for at least two of the five years before the sale.
Who it fits
Any homeowner selling a primary residence — the single largest tax break most families ever use.
The catch
Generally usable once every two years. Depreciation you claimed (e.g., a home office or prior rental use) is recaptured and not excludable. Gain above the cap is taxed at long-term rates.

→ Full walk-through with the basis math on the home-sale hub.

05 §1031 like-kind exchange (real estate)

DefersReal-estate investors
How it works
Roll the proceeds of investment or business real property into replacement real property and defer the gain — basis carries over IRC §1031. Chain enough exchanges and the deferral can last a lifetime, then be wiped by step-up at death (see 09).
Who it fits
Landlords and real-estate investors trading up or reallocating without cashing out.
The catch
Strict clock: 45 days to identify the replacement and 180 days to close, through a qualified intermediary. Since 2018 it applies to real property only — not stocks, crypto, or equipment. It defers, it does not erase.

→ See how deferral changes net proceeds in the calculator.

06 Qualified Opportunity Zones

DefersCan eliminate new gain
How it works
Reinvest a capital gain into a Qualified Opportunity Fund within 180 days and defer that gain IRC §1400Z-2. Hold the fund 10+ years and the appreciation on the fund investment itself can be excluded entirely.
Who it fits
Investors sitting on a large realized gain who can commit capital long-term to designated zones.
The catch
The original deferred gain becomes taxable on a set date (statutory recognition event), and the 10-year exclusion applies only to the new appreciation. Zone investments carry real economic and liquidity risk — the tax break can't rescue a bad deal.

07 Donate appreciated assets & donor-advised funds

Eliminates on gifted shareCharitably inclined
How it works
Give appreciated stock held > 1 year directly to a charity or donor-advised fund: you skip the capital gains tax entirely and generally deduct the full fair-market value IRC §170. The charity, being tax-exempt, sells with no tax.
Who it fits
Anyone already planning to donate who holds low-basis, long-held positions.
The catch
Deductions for appreciated property are capped at a percentage of AGI (with a 5-year carryover), and you need a qualified appraisal for larger non-cash gifts. Donating a loss position wastes the loss — sell it, harvest the loss, then donate the cash.
Advertisement

08 Gift appreciated stock to family in low brackets

Shifts to 0% payerFamilies
How it works
Gift appreciated shares to an adult family member (say a retired parent or a grown child) in the 0% long-term bracket. Your basis and holding period carry over; when they sell within their 0% band, the gain is taxed at 0% IRC §1(h). Annual gifts up to the exclusion avoid gift-tax filing.
Who it fits
Higher-bracket givers with relatives who genuinely control the assets afterward.
The catch
The kiddie tax can tax a child's unearned income at the parents' rate, gutting the benefit for minors. The gift is real — you lose control of the asset. Gifted losses get special dual-basis treatment; don't gift underwater stock.

09 Step-up in basis at death

Eliminates lifetime gainEstate planning
How it works
When an owner dies, most inherited assets get their basis reset to fair-market value on the date of death IRC §1014. Decades of unrealized appreciation vanish for income-tax purposes — heirs who sell right away owe little or nothing.
Who it fits
Long-term holders of highly appreciated stock or real estate who don't need to sell during life.
The catch
You have to actually not sell — the strategy is "hold until death," which conflicts with diversification and spending needs. Estate tax, state rules, and the loss of a step-up on assets that fell in value all complicate it. This is where a professional earns their fee.

10 §453 installment sales

Spreads & defersBusiness/property sellers
How it works
Sell an asset and take the payments over several years; you report the gain as you receive each installment rather than all at once IRC §453. Spreading the gain can keep you in lower brackets and below NIIT thresholds each year.
Who it fits
Sellers of a business, land, or private real estate willing to act as the lender.
The catch
You carry buyer default risk and forgo full proceeds up front. Depreciation recapture is generally taxed in year one regardless, and dealer property and publicly traded stock don't qualify.

11 Invest inside retirement & HSA accounts

Tax-free/deferred growthEveryone
How it works
Trades inside a 401(k), IRA, Roth, or HSA generate no capital gains tax when you buy and sell within the account. Roth and HSA withdrawals can be entirely tax-free; traditional accounts defer until withdrawal, when gains are taxed as ordinary income.
Who it fits
Every investor — this is the simplest, most universal shelter for active positions.
The catch
Contribution limits are modest and early withdrawals face penalties. Traditional-account gains ultimately come out as ordinary income, potentially higher than long-term rates — the tradeoff is decades of untaxed compounding.

12 §1202 Qualified Small Business Stock

Can eliminateStartup founders/investors
How it works
Gain on qualifying C-corp small-business stock held more than five years can be excluded — up to the greater of $10 million or 10× basis IRC §1202. For founders and early employees this can wipe out tax on a life-changing exit.
Who it fits
Founders, early employees, and angel investors in qualifying C corporations.
The catch
Narrow eligibility: original-issue stock, a qualified trade (no finance, farming, hospitality, etc.), a gross-assets test at issuance, and a 5-year hold. Get the qualification confirmed in writing early — it's easy to disqualify by accident.
One honest caveat: these are legal tools, not a plan. The right mix depends on your bracket, state, goals, and the specific asset — and details like NIIT (§1411), depreciation recapture, AMT, and the wash-sale rule can change the answer. Model the number here, then confirm with a licensed tax professional before you act.

Where these figures come from

Every rate, threshold, and rule above is drawn from the statutory text of the Internal Revenue Code and current IRS guidance — not from secondary summaries. Long-term rates and the stacking mechanism come from IRC §1(h); the home-sale exclusion from §121; like-kind exchanges from §1031; Opportunity Zones from §1400Z-2; charitable deductions from §170; the step-up in basis from §1014; installment reporting from §453; and the small-business-stock exclusion from §1202. Dollar thresholds marked (est.) are projected 2026 figures, owner-verifiable against the final IRS release.

Primary sources (linked, not just named)

How to avoid capital gains tax, answered

How can I legally avoid capital gains tax?

Use the levers Congress built into the code. Hold assets more than a year for long-term rates (§1(h)); realize gains in a 0%-bracket year; harvest losses to offset gains; use the $250k/$500k home exclusion (§121); defer with a §1031 exchange or an Opportunity Zone fund (§1400Z-2); donate appreciated assets (§170); gift stock to low-bracket family; let heirs take a stepped-up basis (§1014); spread gain with a §453 installment sale; trade inside retirement/HSA accounts; and claim the §1202 QSBS exclusion where it applies.

Each is avoidance — following the rule as written. Hiding income is evasion, and that's a crime.

At what income do you pay 0% capital gains tax in 2026?

Roughly $49,450 taxable income single, or $98,900 married-filing-jointly (est.) for 2026. Long-term gain that keeps your total taxable income (after the standard deduction) at or below that ceiling is taxed at 0% under §1(h). Only the slice stacking above it moves to 15%. See the 2026 rate tables for the exact breakpoints.

Does holding a stock for a year really cut the tax?

Yes — it's the single most reliable move. One year or less is short-term, taxed as ordinary income up to 37%. More than one year is long-term at 0/15/20% (§1(h)). For a high earner that's up to a 17-point swing on the same gain. The clock starts the day after you buy, so don't sell a day early.

How does the home-sale exclusion work?

§121 excludes up to $250,000 of gain (single) or $500,000 (married-filing-jointly) if you owned and lived in the home as your main residence for at least two of the last five years, generally usable once every two years. Gain above the cap is taxed at long-term rates. Full detail on the home-sale hub.

Can I avoid capital gains tax by reinvesting?

Only in specific statutory cases — not as a general rule. Reinvesting stock proceeds into new stocks does not defer the tax. But a §1031 exchange defers gain on investment real estate rolled into other real estate, and a Qualified Opportunity Fund (§1400Z-2) can defer and partly reduce gain. There is no broad "reinvest to defer" break for ordinary securities.

What is the step-up in basis and why does it matter?

Under §1014, inherited assets are re-based to fair-market value at the owner's death. A lifetime of appreciation can escape income tax — heirs selling right away owe little or nothing. It's why some holders never sell their most-appreciated assets during life, though estate tax and state rules can still apply.

Is it worth using a §1031 exchange?

For real-estate investors, often yes — but it's exacting. §1031 defers gain when you roll investment real property into replacement real property within 45 days to identify and 180 days to close, using a qualified intermediary. Basis carries over, so the tax is deferred, not erased — and since 2018 it applies to real property only.

The honest bottom line

Most "how to avoid capital gains tax" articles read like a listicle written by someone who's never filed a Schedule D. The truth is less exciting and more useful: there's no trick, only a toolbox — and the tools have rules. Hold longer. Watch your bracket. Bank your losses. Use the home exclusion. For big or complex gains, defer with §1031, an Opportunity Zone, or an installment sale — and let a professional confirm the details before you pull the trigger. Do that and you'll keep more of your gain entirely within the law.

Next step: put real numbers to it. The calculator shows the exact tax on your gain, the bracket it lands in, and the IRC section behind every line — so you can see which of these strategies actually moves your bill.