ⓘ Educational Disclosure:
This article is for educational and informational purposes only. It does not constitute financial, legal, tax, lending, or investment advice. SaveXpert and its authors are not licensed financial advisors, CPAs, attorneys, or tax advisors. All data comes from publicly available government and institutional sources. Tax treatment depends on individual transaction facts, holding periods, income, filing status, and applicable elections. State capital gains taxes are excluded. Always verify figures at IRS.gov and consult a qualified tax professional before making investment or tax decisions. Always consult a qualified professional before making investment decisions.
Can you legally reduce capital gains tax when selling investments? Yes — but through specific IRS provisions, not a universal loophole. According to IRS Topic No. 409 and related publications: (1) holding an asset more than one year qualifies it for long-term rates of 0%, 15%, or 20% instead of ordinary income rates; (2) capital losses can offset capital gains dollar-for-dollar with no annual cap on the offset itself — the $3,000 limit applies only when excess losses are deducted against other ordinary income; (3) qualifying primary-residence sales may exclude up to $250,000 (single) or $500,000 (MFJ) under IRC §121; (4) qualifying real-property exchanges under Section 1031 can defer gain recognition. No single strategy eliminates all capital gains tax for every taxpayer — the applicable rule depends on the asset type, holding period, income, and filing status.
Key Takeaways
- Problem: Many investors don’t know which specific IRS rules allow them to legally reduce or defer capital gains — and they often confuse what “avoiding” tax means in practice. There is no single IRS provision that makes every profitable investment sale tax-free.
- Solution: The IRS provides several distinct legal mechanisms for reducing, offsetting, or deferring capital gains. These include long-term holding periods (0%/15%/20% rates), capital-loss offsets, the §121 home-sale exclusion (up to $500,000 for qualifying MFJ), Section 1031 like-kind exchanges for real property, Opportunity Zone deferrals, and stepped-up inherited basis — each with specific eligibility requirements.
- Result: The applicable rule depends entirely on the transaction’s facts: asset type, holding period, income level, and filing status. Matching the transaction to the correct IRS provision can significantly reduce the effective tax — but rarely eliminates it completely.
- Source: IRS Topic No. 409 · IRS Topic No. 701 · IRS Publication 523 · IRS Form 8824
- Time To Read: 9 Minutes
Table of Contents
1. IRS Rules for Reducing Capital Gains Tax
2. Capital Gains Rules for Specific Asset Types
3. Additional Tax Considerations
4. I Ran a Scenario Through SaveXpert’s Tax Bracket Calculator
6. What Doesn’t Work the Way Many People Think
7. Realistic Expectations When Reducing Capital Gains Tax
There’s no single IRS provision that makes every profitable investment sale tax-free. But there are several specific rules — each with its own requirements and limits — that can legally reduce, offset, or defer capital gains tax. The IRS separates short-term gains (taxed at ordinary income rates) from long-term gains (taxed at 0%, 15%, or 20%). It allows capital losses to directly offset capital gains. It provides a home-sale exclusion of up to $500,000 for qualifying married couples. And it permits certain real-estate exchanges to defer gain recognition entirely. The research in this article covers what each rule actually requires — and where the most common misconceptions are.
IRS Rules for Reducing Capital Gains Tax
Holding an Investment for More Than One Year Changes the Tax Treatment
The most straightforward legal mechanism for reducing capital gains tax is time. IRS Form 8949 Instructions and IRS Topic No. 409 both establish the holding-period rule: assets held for one year or less are short-term (taxed at ordinary income rates, 10%–37%); assets held for more than one year are long-term (taxed at 0%, 15%, or 20%).
The 0% long-term rate is the one with the most planning potential. For 2026, the official IRS thresholds from IRS Revenue Procedure 2025-32 are:
| Filing Status | 2025 — 0% Threshold | 2026 — 0% Threshold | 2026 — 15% Rate Range | 2026 — 20% Begins Above |
|---|---|---|---|---|
| Single | Up to $48,350 | Up to $49,450 | $49,451 – $545,500 | $545,500 |
| Married Filing Jointly | Up to $96,700 | Up to $98,900 | $98,901 – $613,700 | $613,700 |
| Head of Household | Up to $64,750 | Up to $66,200 | $66,201 – $579,600 | $579,600 |
| Married Filing Separately | Up to $48,350 | Up to $49,450 | $49,451 – $306,850 | $306,850 |
Source: IRS Topic No. 409 for 2025 figures · IRS Revenue Procedure 2025-32 §4.03 for official 2026 figures (published October 9, 2025). 2015 15% ceilings for 2025: single $533,400 / MFS $300,000 / MFJ $600,050 / HoH $566,700.
That 0% category is what most people are searching for when they look for how to reduce capital gains tax. It doesn’t eliminate tax on the gain — it provides a 0% federal rate on qualifying long-term gains when the investor’s total taxable income falls within the threshold. The gain doesn’t disappear; it gets taxed at 0% federally for that portion. The gain still factors into total taxable income for NIIT purposes at the appropriate MAGI threshold.
Capital Losses Can Offset Capital Gains
The IRS allows capital losses to offset capital gains before any annual limit applies. A taxpayer with $8,000 in gains and $5,000 in losses nets to a $3,000 gain — the $5,000 in losses directly offset $5,000 of the $8,000 in gains. The net of $3,000 is what the applicable long-term or short-term rate then applies to. No annual cap operates on the gain-to-gain offset itself.
The $3,000 Annual Limit Is Not the Same as the Offset Limit
This is where the most common misreading of the rules appears. The $3,000 annual limit — $1,500 for married filing separately — applies specifically when total capital losses exceed total capital gains and the taxpayer wants to deduct the remaining net loss against other ordinary income such as wages. It’s a limit on cross-category deduction, not on offsetting losses against gains within the capital category.
| Scenario | IRS Treatment | Annual Limit Applies? |
|---|---|---|
| Losses offset gains (losses ≤ gains) | Direct offset reduces net capital gain; no annual cap | No — offset is unlimited within the capital category |
| Losses exceed gains — excess deducted against other income | Deduction against wages, salary, other ordinary income | Yes — $3,000/year for most taxpayers ($1,500 MFS) |
| Unused excess losses beyond the $3,000 deduction | Carry forward to future tax years | Same $3,000 limit applies in each future year |
Source: IRS Topic No. 409
⚠️ Wash-sale rule — IRC §1091: The IRS generally disallows a capital loss when substantially identical stock or securities are purchased within 30 days before or after the loss sale. Per the 2025 Schedule D Instructions, the 30-day window runs both directions. Selling a position at a loss and repurchasing substantially identical securities the next day doesn’t produce a deductible loss — the loss is disallowed, and the disallowed amount is added to the cost basis of the repurchased securities. Planning a loss-harvesting move requires verifying this 30-day window before executing the trades.

Capital Gains Rules for Specific Asset Types
Capital Gains Rules for Specific Asset Types
The rules that apply to investment accounts don’t apply to a primary home sale. IRS Topic No. 701 and IRS Publication 523 establish a separate capital-gain exclusion under IRC §121:
| Filing Status | Maximum Exclusion | Eligibility Requirement |
|---|---|---|
| Single / Head of Household | Up to $250,000 | Generally must have owned and used the home as a principal residence for at least 2 of the 5 years before the sale; specific exceptions apply |
| Married Filing Jointly (qualifying) | Up to $500,000 |
Source: IRS Topic No. 701 · IRS Publication 523 · IRC §121
Consider a qualifying single taxpayer with a $200,000 gain from selling a principal residence. The $250,000 exclusion covers the full gain — producing zero federal capital gains tax on that amount, assuming the ownership and use tests are met. The same taxpayer with a $300,000 gain would exclude $250,000 and recognise $50,000 as a taxable capital gain.
The word “qualifying” carries real weight here. Publication 523 establishes specific ownership and use requirements and documents the exceptions (divorce, health, employment change, unforeseen circumstances). A large gain from a home sale that doesn’t meet those tests becomes fully taxable as a capital gain — not automatically shielded by the exclusion simply because the property was a home.
Section 1031 Can Defer Certain Real-Estate Gains — Not Stocks
IRS Form 8824 Instructions describe Section 1031 as permitting nonrecognition of gain or loss when qualifying investment or business real property gets exchanged for like-kind real property. This is a deferral mechanism — not a permanent exclusion.
⚠️ Since 2018, Section 1031 applies only to real property: Stocks, bonds, securities, partnership interests, and personal-use property no longer qualify. The IRS Form 8824 Instructions are specific: the exchange must involve qualifying real property held for investment or business use. Selling appreciated stock and buying different stock doesn’t defer the gain under Section 1031 — that’s one of the most common misconceptions in capital gains planning.
A qualifying exchange under Section 1031 requires strict timelines: the taxpayer must identify replacement property within 45 days of the relinquished property’s sale and complete the exchange within 180 days. The deferred gain doesn’t disappear — it reduces the basis in the replacement property, so a future sale of that property will recognise the previously deferred gain. The deferral extends the tax obligation, not eliminates it.
Opportunity Zones Can Defer Eligible Gains
Under IRS Publication 544, an investor with an eligible capital gain can invest that gain in a Qualified Opportunity Fund (QOF) within 180 days of the triggering sale and elect temporary deferral. The deferred gain is generally recognised on the earlier of: an inclusion event (such as selling the QOF investment) or December 31, 2026, for gains arising under the current IRS guidance.
The research brief flags later legislation and guidance as an area requiring verification for gains arising after 2026. Check IRS.gov for current rules before relying on Opportunity Zone deferral for transactions beyond that date.
The research also identifies a 10-year holding period for a potentially permanent exclusion of qualifying QOF investment gain under IRS Publication 547. A 10-year hold in a qualifying QOF can potentially exclude the appreciation on the QOF investment itself — a separate benefit from the initial gain deferral.
Inherited Investments Can Have a Different Tax Basis
The IRS Gifts and Inheritances FAQ establishes that inherited property generally uses fair market value at the decedent’s date of death as its basis. An alternate valuation date may apply when properly elected on an estate-tax return.
This basis reset — commonly called a “stepped-up basis” — can significantly reduce the gain recognised on a later sale. If the original owner bought a stock at $20 per share and it was worth $100 per share at death, the heir’s basis is generally $100, not $20. A later sale at $110 produces a $10 gain for the heir — not the $90 gain the original owner would have recognised.
Inherited investments don’t automatically carry the original owner’s purchase price. The FMV-at-death basis rule changes the calculation for the inheriting taxpayer — and it’s worth verifying separately for each inherited asset before calculating any taxable gain on a subsequent sale.
Find your marginal bracket, income tax, and take-home.
Additional Tax Considerations
Don’t Forget the 3.8% Net Investment Income Tax
Per IRS Topic No. 559 and IRC §1411, the 3.8% NIIT applies to the lesser of net investment income or the excess of modified adjusted gross income (MAGI) above the applicable threshold. It stacks on top of the regular capital gains rate:
| Filing Status | MAGI Threshold | NIIT Rate | Effective Rate If Gain Is in 15% Bracket |
|---|---|---|---|
| Single / Head of Household | $200,000 | 3.8% | 18.8% (15% + 3.8%); 23.8% if in 20% bracket |
| Married Filing Jointly | $250,000 | ||
| Married Filing Separately | $125,000 |
Source: IRS Topic No. 559 · IRC §1411. NIIT applies to both long-term and short-term capital gains above the threshold, as well as dividends, interest, and rental income.
A headline rate of “0% capital gains tax” at the federal level doesn’t necessarily mean zero total federal tax on investment income when MAGI exceeds these thresholds. The NIIT applies on top of whatever the capital gains rate is — even 0%.
What Changed in 2025 and 2026?
Congress enacted Public Law 119-21 (the One Big Beautiful Bill Act) on July 4, 2025. The Congressional Research Service confirms the legislation didn’t change the basic tax rates on capital gains and dividends. The 0%, 15%, and 20% long-term capital-gains rate structure remains intact.
What the OBBBA did change was the ordinary income rate structure — making the seven TCJA rates permanent. Short-term capital gains use those ordinary income rates, so the permanence of 10%–37% affects short-term gain planning. IRS Revenue Procedure 2025-32 set the inflation-adjusted 2026 thresholds for both ordinary income brackets and long-term capital-gains rate categories — the official 2026 figures appear in the table above.
Estimate your lump-sum investment growth over time.
I Ran a Scenario Through SaveXpert’s Tax Bracket Calculator
I tested a simple example using the 2025 IRS figures from the research brief: a single taxpayer with taxable income below the $48,350 0% long-term capital-gain ceiling. A qualifying long-term gain within that taxable-income range falls into the 0% federal capital-gains category for 2025.
The same scenario in 2026 uses the $49,450 threshold. A single taxpayer with $45,000 of ordinary taxable income and a $3,000 long-term capital gain stays below the $49,450 threshold — the gain produces 0% federal long-term capital gains tax on that gain. A taxpayer with $47,000 in ordinary income and the same $3,000 gain crosses the threshold: $47,000 + $3,000 = $50,000, which is $550 above the $49,450 threshold. That $550 above the threshold moves into the 15% bracket; the remaining $2,450 of the gain stays at 0%.
That’s why total taxable income — not just the gain amount — matters before calculating the applicable rate.
🧮 SaveXpert Tax Bracket & Investment Calculators — Free & No Signup
The Tax Bracket Calculator shows which bracket your taxable income falls in — including how a long-term capital gain interacts with the ordinary income brackets and where the combined total lands relative to the 0%/15%/20% thresholds. The Investment Return Calculator estimates a gain or loss before you apply the tax rules — giving you the gain amount to bring to the Tax Bracket Calculator.
Educational note: Calculators model federal tax scenarios only — state taxes not included. Source: IRS Revenue Procedure 2025-32 · IRS Topic No. 409



What the Research Shows Works
Holding for more than one year when practical.
The shift from short-term (ordinary income rates up to 37%) to long-term (0%/15%/20%) is the most consistently available mechanism for reducing the federal rate on a capital gain. For investors with taxable income below the 0% threshold, the rate difference can be the full short-term rate vs. zero on the same gain. Even for investors who end up in the 15% or 20% long-term bracket, the rate difference from ordinary income rates is meaningful at every income level.
Harvesting capital losses to offset capital gains in the same year.
The direct offset of losses against gains within the capital category has no annual dollar limit. A taxpayer who recognises $10,000 in gains and $10,000 in losses nets to zero capital gain — no tax due on either transaction. The planning value is highest when the loss realisation and the gain realisation happen in the same tax year, before the wash-sale 30-day window creates complications.
Using the §121 home-sale exclusion for a qualifying primary residence.
A $250,000 or $500,000 exclusion is among the largest single-transaction tax reductions available in the federal code for most taxpayers. The eligibility conditions matter — the ownership and use tests in Publication 523 establish specifically what “qualifying” means, and exceptions exist for partial exclusions when tests aren’t fully met.
Evaluating a Section 1031 exchange for qualifying real property before executing the sale.
A like-kind exchange defers gain recognition on qualifying real property into the replacement property’s basis. The key planning point is that the Section 1031 timeline is strict — 45 days to identify replacement property, 180 days to close — and the election can’t be made retroactively after the original property is sold outside the exchange structure.

What Doesn’t Work the Way Many People Think
Capital losses don’t create an unlimited deduction against wages.
The $3,000 annual limit ($1,500 MFS) specifically governs deducting excess net capital losses against ordinary income. A $20,000 capital loss in a year with $60,000 in wages doesn’t produce a $20,000 deduction against that wage income. It produces a $3,000 deduction in the current year and carries the remaining $17,000 forward.
Selling at a loss and immediately repurchasing doesn’t always work.
The wash-sale rule under IRC §1091 disallows the loss when substantially identical securities are purchased within 30 days before or after the sale. The “substantially identical” test is a factual determination — not just the same ticker symbol. The disallowed loss isn’t gone permanently; it’s added to the cost basis of the repurchased securities. But it doesn’t reduce this year’s taxable gain as planned.
Section 1031 doesn’t apply to stocks, bonds, or securities.
Since 2018, Section 1031 like-kind exchange treatment applies only to qualifying real property held for investment or business use. Selling an appreciated stock position and buying a different stock doesn’t create a deferral under Section 1031. The IRS Form 8824 Instructions are explicit on this. The misconception arises from older guidance that referenced broader like-kind exchange categories that no longer apply.
Inherited investments don’t automatically keep the original owner’s purchase price.
The IRS generally uses fair market value at the decedent’s date of death as the inheritor’s basis — not the original owner’s acquisition cost. This basis reset usually reduces the taxable gain on a later sale. Calculating the gain from an inherited investment using the original owner’s purchase price produces an overstated gain and an overstated tax.
Realistic Expectations When Reducing Capital Gains Tax
The IRS rules provide specific legal mechanisms for reducing, deferring, or eliminating capital gains tax — but none of them applies universally to every transaction. The applicable rule always depends on:
| Factor | Why It Matters |
|---|---|
| Asset type | Real property, securities, collectibles, and inherited assets each have different applicable rules |
| Holding period | One day’s difference can determine whether short-term or long-term rates apply |
| Taxable income and filing status | Determines which 0%/15%/20% bracket applies to the long-term gain |
| MAGI for NIIT | Determines whether the 3.8% NIIT applies on top of the capital gains rate |
| Ownership and use tests | Determine eligibility for the §121 home-sale exclusion |
| Exchange timing | 45-day/180-day rules determine whether a Section 1031 exchange is still available |
Source: IRS Topic No. 409 · IRS Topic No. 701 · IRS Form 8824 · IRS Topic No. 559
The research brief makes a deliberate point that also appears in the structure of the IRS rules themselves: the tax framework tells you how gains are classified and taxed. It doesn’t recommend a particular investment approach, trading strategy, or asset allocation. Two investments with identical pre-tax returns can have very different after-tax outcomes depending on holding period, account type, and asset type — and the IRS rules are the governing framework for those differences.
Bottom Line: 5 Steps to Legally Reduce Capital Gains Tax
1. Start with the holding period — the one-year threshold is exact, and one extra day changes the applicable tax system:
Under IRS Form 8949 Instructions, the count starts the day after acquisition. Holding to 366 days from the acquisition date generally qualifies the gain as long-term. For investors who would land in the 0% long-term bracket, extending to long-term treatment can produce a 10%–37% rate reduction on that gain. This is the most broadly available legal mechanism for reducing capital gains tax — and it costs nothing except time.
2. Harvest capital losses against capital gains in the same tax year — but verify the 30-day wash-sale window before executing:
Capital losses offset capital gains dollar-for-dollar under IRS Topic No. 409 with no annual cap on the offset. The $3,000 limit applies only to excess net losses deducted against other ordinary income. The wash-sale rule under IRC §1091 and the 2025 Schedule D Instructions disallows a loss when substantially identical securities are purchased within 30 days before or after the loss sale. Confirm the 30-day window is clear before any loss-harvesting trade to ensure the loss is deductible.
3. For a primary residence, verify the §121 ownership and use tests before assuming the exclusion applies:
IRS Topic No. 701 and Publication 523 establish the exclusion amounts ($250,000 single, $500,000 MFJ) and the eligibility requirements. Generally, the home must have been the taxpayer’s primary residence for at least 2 of the 5 years before the sale. Specific exceptions exist for partial exclusions when tests aren’t fully met. A home sale that doesn’t meet the tests produces a fully taxable capital gain — the exclusion isn’t automatic.
4. For qualifying investment real property, evaluate a Section 1031 exchange before completing the sale — not after:
Under IRS Form 8824, Section 1031 defers gain recognition on qualifying real property held for investment or business use. Since 2018, it doesn’t apply to stocks, bonds, or securities. The 45-day identification period and 180-day exchange completion deadline are strict — the election can’t be made retroactively after the sale closes outside an exchange structure. Evaluate this option before selling, not after the proceeds are in hand.
5. Check your MAGI against the NIIT thresholds and run the Tax Bracket Calculator with total taxable income — not just the gain amount:
The 3.8% NIIT under IRS Topic No. 559 applies when MAGI exceeds $200,000 (single/HoH), $250,000 (MFJ), or $125,000 (MFS). It stacks on top of the regular capital gains rate. The Tax Bracket Calculator needs your total taxable income — including the gain — to show whether the combined total crosses the 0%/15%/20% long-term threshold. The Investment Return Calculator provides the estimated gain to bring to that calculation. Run both before finalising any capital gains tax estimate.
“The detail in the capital gains tax rules that most consistently trips people up is the wash-sale rule’s relationship to loss-harvesting. A lot of guidance on ‘reducing capital gains tax’ leads with harvesting losses — and that’s legitimate under IRS rules. But IRC §1091 specifically disallows the loss when substantially identical securities are purchased within 30 days before or after the sale. The 30-day window runs in both directions: you can’t lock in the loss by selling and immediately repurchasing. What counts as ‘substantially identical’ is a factual determination that requires care — and getting it wrong turns a planned tax-reduction move into a disallowed loss.”
— Kevin Brown, Lead Researcher at SaveXpert.com
Frequently Asked Questions
Ans: According to IRS Topic No. 409 and related publications, there’s no single universal loophole — but specific IRS provisions can reduce, offset, or defer capital gains tax. Long-term holding periods qualify gains for 0%, 15%, or 20% rates instead of ordinary income rates. Capital losses can directly offset capital gains with no annual cap on the offset. The §121 home-sale exclusion can shield up to $250,000 or $500,000 of qualifying home-sale gains. Section 1031 exchanges can defer gain recognition on qualifying real property. Opportunity Zone investments can further defer eligible gains. Each has specific eligibility requirements.
Ans: Yes, under IRS Topic No. 409. Net capital losses directly offset capital gains with no annual dollar cap on the offset itself. If total losses exceed total gains, the excess can be deducted against other ordinary income — but that deduction is limited to $3,000 per year for most taxpayers ($1,500 for married filing separately). Unused excess losses carry forward to future years. The wash-sale rule under IRC §1091 disallows losses on positions repurchased within 30 days before or after the sale.
Ans: Under IRS Topic No. 701 and IRC §121, qualifying single taxpayers can exclude up to $250,000 of gain from a principal-residence sale. Qualifying married taxpayers filing jointly can exclude up to $500,000. Eligibility generally requires the home to have been the taxpayer’s primary residence for at least 2 of the 5 years before the sale. IRS Publication 523 provides the full ownership and use test requirements and the exceptions for partial exclusions.
Ans: Holding an asset for more than one year changes its classification from short-term to long-term under IRS Form 8949 Instructions. Short-term gains use ordinary income rates (10%–37%). Long-term gains use the 0%, 15%, or 20% rate structure based on taxable income and filing status per IRS Revenue Procedure 2025-32. For 2026, single filers with taxable income up to $49,450 face a 0% federal rate on qualifying long-term gains. The specific rate reduction depends on the investor’s income level and filing status.
Ans: Under IRS Topic No. 409, the $3,000 limit applies specifically to deducting excess net capital losses against other ordinary income (wages, salary, etc.) in a single year. It’s $1,500 for married taxpayers filing separately. The limit does not apply to offsetting capital losses against capital gains — those offsets are direct and unlimited within the capital category. Unused losses beyond the $3,000 annual deduction carry forward to future years, where the same $3,000 annual limit applies.
Ans: Under IRS Publication 544, an investor with an eligible capital gain can invest that gain in a Qualified Opportunity Fund (QOF) within 180 days of the sale and elect temporary deferral. The deferred gain is generally recognised by December 31, 2026, or upon an earlier inclusion event (such as selling the QOF investment), under the retrieved IRS guidance — verify current rules for gains arising after 2026 at IRS.gov. Holding the QOF investment for at least 10 years may qualify the QOF appreciation itself for a potentially permanent exclusion per IRS Publication 547. Opportunity Zone rules don’t apply to every type of capital gain and require specific QOF eligibility.













