Back to Blog
Article-specific conceptual hero image for How to Avoid or Reduce Capital Gains Tax on Investments.

How to Avoid or Reduce Capital Gains Tax on Investments

Andrew Izyumov, Founder & CEO at 8FIGURES
By Andrew Izyumov, CFA
Founder of 8FIGURES
Portfolio Allocations
July 21, 2026
10
min read

A comprehensive decision guide for financially literate investors navigating the mechanics, legal frameworks, and trade-offs of capital gains tax mitigation.

The short version: Minimizing capital gains tax requires a strategic combination of asset location, statutory exclusions, and structured deferrals. By leveraging specific provisions of the Internal Revenue Code, investors can legally protect their investment returns, though each strategy carries distinct operational rules and investment risks. (Topic no. 409, Capital gains and losses | Internal Revenue Service)

Key takeaways

  • Capital gains are calculated as the difference between an asset's adjusted basis and its sale price, with net capital gains taxed at rates determined by overall taxable income.
  • Tax-loss harvesting allows investors to offset capital gains, with excess losses up to $3,000 ($1,500 if married filing separately) usable to reduce ordinary income.
  • Qualified retirement accounts, such as Roth IRAs, shield investments from standard capital gains tax rules, allowing tax-free qualified distributions. (the IRS)
  • Real estate investors can defer gains using Section 1031 exchanges, though property held primarily for sale is strictly excluded from this treatment. (the IRS)
  • Venture investments in Section 1202 qualified small business stock (QSBS) may qualify for partial gain exclusions, with taxable portions capped at a 28% maximum rate. (26 U.S. Code § 1202 - Partial exclusion for gain from certain small business stock | U.S. Code | US Law | LII / Legal Information Institute)

The Mechanics of Capital Gains Taxation

Understanding capital gains taxation begins with the calculation of your cost basis. When you sell a capital asset, the difference between the adjusted basis in the asset and the amount you realized from the sale determines whether you have a capital gain or a capital loss. Net capital gains are taxed at different rates depending on your overall taxable income, with some or all of your net capital gains potentially qualifying for a 0% tax rate. To implement this calculation, taxpayers must track all adjustments to basis over the holding period of the asset. A critical decision checkpoint is identifying the exact amount realized, which includes cash and the fair market value of any property received, to accurately determine the taxable gain or deductible loss before applying the appropriate capital gains tax bracket.

While standard long-term capital gains rates are lower than ordinary income tax rates, certain assets are subject to special tax treatments. For example, the taxable portion of a gain from selling section 1202 qualified small business stock is taxed at a maximum rate of 28% rather than the standard capital gains rates.

Taxpayers must also maintain rigorous compliance to avoid accuracy-related penalties. The IRS can charge an accuracy-related penalty of 20% for tax underpayments that result from negligence, disregard of rules and regulations, or a substantial understatement of tax liability. To mitigate the risk of this penalty, taxpayers should establish robust recordkeeping practices and seek professional guidance when interpreting complex tax provisions. A key decision checkpoint is determining whether there is substantial authority for a tax position or if a disclosure is required on the return. Implementing these compliance measures helps ensure that capital gains and losses are reported accurately, protecting the taxpayer from costly penalties and interest charges during an audit.

Asset Location and Tax-Advantaged Accounts

One of the most straightforward methods to mitigate capital gains tax is through strategic asset location. Standard capital gains tax rules and reporting requirements do not apply to investments held within qualified retirement plans, such as individual retirement arrangements (IRAs) or section 401(k) plans. When implementing an asset location strategy, a key decision checkpoint is determining which high-growth or high-turnover assets should be placed inside these tax-advantaged accounts to shield them from annual taxation. Taxpayers must recognize the limitation that placing assets in these accounts changes the character of future distributions, as withdrawals from traditional plans are generally taxed as ordinary income rather than capital gains, whereas qualified distributions from Roth accounts may be entirely tax-free.

By utilizing these tax-advantaged vehicles, investors can buy and sell assets within the account without triggering immediate tax liabilities. For instance, with a Roth IRA, you do not include qualified distributions or distributions that represent a return of your regular contributions in your gross income, allowing your investment growth to remain entirely tax-free.

Tax-Loss Harvesting and Income Offsets

Tax-loss harvesting is the practice of selling underperforming securities at a loss to offset capital gains realized elsewhere in your portfolio. When your capital losses exceed your capital gains, the IRS limits the amount of the excess loss you can claim to lower your ordinary income.

Specifically, the maximum excess loss you can claim to lower your income in a single tax year is the lesser of $3,000 ($1,500 if you are married filing separately) or your total net loss shown on line 16 of Schedule D (Form 1040). Any remaining net capital losses beyond this limit can be carried forward to future tax years.

Real Estate Deferrals and Exclusions

Real estate investors have access to powerful statutory mechanisms to defer or exclude capital gains. Under Section 1031, investors can exchange real property held for productive use in a trade or business or for investment to defer gain recognition. However, this deferral is not universal; real property held primarily for sale is strictly ineligible for deferral of gain under Section 1031.

For residential property, Section 121 provides an exclusion of gain from the sale of a principal residence. In certain situations, these two tax codes can intersect. If you convert your main home to a rental property (or use a portion of the living area for productive business use), both the Section 1031 exchange rules and the Section 121 exclusion rules may apply to the transaction.

However, there are strict holding requirements when these rules overlap. If a taxpayer acquired a property in an exchange to which Section 1031 applied, the Section 121 primary residence exclusion will not apply to a subsequent sale or exchange of that property if it occurs during the 5-year period beginning with the date of the acquisition. (26 U.S. Code § 121 - Exclusion of gain from sale of principal residence | U.S. Code | US Law | LII / Legal Information Institute)

Venture and Startup Exemptions: QSBS and Rollovers

Investors in early-stage startups can leverage Section 1202 and Section 1045 to eliminate or defer significant capital gains. Section 1202 provides a partial or complete exclusion of gain from the sale of qualified small business stock (QSBS) held for more than five years. The historical baseline for this exclusion was capped at $10,000,000, reduced by the aggregate amount of eligible gain taken into account by the taxpayer for prior taxable years from the same corporation.

If you sell QSBS before meeting the five-year holding period, Section 1045 provides an alternative. Under Section 1045, taxpayers can elect to roll over the capital gain from the sale of qualified small business stock into another qualified small business stock, deferring the tax liability as long as the proceeds are reinvested within the statutory timeframe. This rollover provision, which is treated as if included in the provisions of the Taxpayer Relief Act of 1997, offers a vital planning mechanism for venture investors. A key decision checkpoint is verifying that both the sold stock and the newly acquired stock meet all statutory requirements of qualified small business stock. Taxpayers must carefully monitor the reinvestment period to ensure seamless deferral and avoid unintended tax consequences. (26 U.S. Code § 1045 - Rollover of gain from qualified small business stock to another qualified small business stock | U.S. Code | US Law | LII / Legal Information Institute)

Qualified Opportunity Funds and Deferrals

Qualified Opportunity Funds (QOFs) offer another robust path for tax deferral and exclusion. Under Section 1400Z-2, investors can temporarily defer the inclusion of capital gains in their gross income by timely investing those prior eligible gains into a QOF. This temporary deferral of inclusion in gross income applies to capital gains invested in Qualified Opportunity Funds, providing a valuable mechanism for investors to postpone their tax liabilities. When implementing this strategy, a key decision checkpoint is ensuring that the corresponding amount of prior eligible gain is invested within the strict statutory window. Taxpayers must carefully evaluate the timing of their capital gains and the subsequent QOF investment to secure these deferral benefits, as failing to meet the investment timeline will result in immediate taxation of the gains. (Opportunity zones frequently asked questions | Internal Revenue Service)

In addition to temporary deferral, the program offers a permanent exclusion of capital gains realized from the sale or exchange of the investment in the QOF itself, provided the investor holds the QOF investment for at least 10 years. This permanent exclusion of capital gains from the sale or exchange of an investment in the Qualified Opportunity Fund represents a powerful long-term wealth preservation tool. A key decision checkpoint for investors is the commitment to a ten-year holding period, as exiting the investment early will forfeit this permanent tax-free appreciation. Taxpayers must evaluate their liquidity needs and investment horizons before committing capital, ensuring they can maintain the investment long enough to secure this substantial tax benefit.

However, investors must navigate specific inclusion rules. If the QOF liquidates before December 31, 2026, or if you transfer the qualifying investment to another individual (such as giving it to your child) before that date, the deferred gain may be triggered and included in your taxable income. Specifically, if you elected to defer eligible gain after making a qualifying investment in a QOF, and that QOF liquidates before December 31, 2026, the deferral terminates. Similarly, the deferral is disrupted if you elected to defer eligible gain after making a qualifying investment in a QOF and, before December 31, 2026, you gave the qualifying investment to your child. These events serve as critical checkpoints that accelerate tax liabilities, requiring careful planning to avoid premature inclusion of the deferred capital gains.

Generational Wealth Transfer and Basis Step-Up

For long-term estate planning, Section 1014 provides a highly effective method for eliminating capital gains entirely through a step-up in basis. When an individual inherits property from a decedent, the basis of the property is generally adjusted to its fair market value at the date of the decedent's death. (26 U.S. Code § 1014 - Basis of property acquired from a decedent | U.S. Code | US Law | LII / Legal Information Institute)

However, if the property was acquired by the taxpayer before the death of the decedent, specific adjustments apply. In such cases, the stepped-up basis must be reduced by any deductions allowed to the taxpayer for exhaustion, wear and tear, obsolescence, amortization, and depletion on the property prior to the decedent's death.

Comparing Tax Mitigation Strategies

To help you evaluate which strategy aligns best with your investment portfolio, the table below outlines key characteristics, limitations, and statutory rules for different tax-mitigation vehicles. When comparing these options, a critical decision checkpoint is whether your assets are held in taxable accounts or qualified retirement plans. It is vital to recognize that standard capital gains rules, including various deferral and exclusion provisions, do not apply to investments held in individual retirement arrangements (IRAs), section 401(k) plans, and other qualified retirement plans. Consequently, taxpayers must evaluate their asset location carefully to determine if they can utilize these statutory mitigation strategies or if they must rely on the distinct distribution rules governing tax-advantaged retirement accounts.

StrategyPrimary Tax BenefitKey Limitation / Exclusion
Section 1031 ExchangeDeferral of real estate capital gainsProperty held primarily for sale is ineligible
Section 1202 QSBSExclusion of capital gains up to limitsTaxable portion of gain is taxed at a maximum 28% rate
Tax-Loss HarvestingOffset capital gains with capital lossesExcess loss deduction capped at $3,000 ($1,500 if MFS)
Qualified Opportunity FundsPermanent exclusion of gains after 10 yearsEarly liquidation before Dec 31, 2026 triggers deferred gain

Analyze Your Portfolio's Tax Efficiency

Educational Disclaimer: This guide is for educational purposes only and does not constitute formal tax, legal, or investment advice. Tax codes are highly complex and subject to change. Always consult a qualified CPA or tax professional before executing any advanced tax-mitigation strategies.

Evidence Boundaries and Next Steps

Evidence boundary: The approved research for this guide did not answer the following questions: "Federal capital gains tax brackets and income thresholds for the 2026 tax year"; "Specific parameters of the IRS wash-sale rule (61-day window details)"; "The exact timelines for Section 1031 exchanges (45-day and 180-day rules)"; "Active tax benefits remaining for QOZs under current 2026 rules beyond the 10-year exclusion"; "Eligibility tests for Section 121 primary residence exclusion (2-out-of-5-years rule)" Confirm each point against current primary guidance and any relevant plan rules before acting.

Use 8FIGURES to inspect your portfolio inputs and prepare better questions for your own review.

Article-specific conceptual hero image for How to Avoid or Reduce Capital Gains Tax on Investments.
See also

Try it now!

Managing your investments has never been easier!

Link to App Store
QR Code to App Strore
Link to Google Play
QR Code to Google Play
Encrypted
Encrypted, read-only account connections