Avoiding Capital Gains on Investment: 2026 Guide

  • Home
  • Blog
  • Avoiding Capital Gains on Investment: 2026 Guide

Avoiding Capital Gains on Investment: 2026 Guide

Table of Contents

Last Updated: October 16, 2026

How Federal and State Tax Rules Shape Your Capital Gains Bill

Avoiding capital gains on investment starts with understanding what triggers the tax. A capital gain is the profit realized when you sell an asset for more than its cost basis, taxed based on how long you held it.

The holding period is the dividing line. Assets held longer than one year produce long-term capital gains, taxed at preferential rates under the IRS capital gains guidance.

Short-Term vs. Long-Term Capital Gains Rates

The federal long-term rate is lower than the short-term rate for nearly every taxpayer, and the gap widens as taxable income rises. For 2026, the IRS maintains a 0%, 15%, and 20% structure for long-term gains, while short-term gains stack on ordinary income and can push you into a higher tax bracket.

Holding Period Gain Type Federal Rate Structure Planning Impact
1 year or less Short-term Ordinary income rates Highest tax cost
More than 1 year Long-term 0%, 15%, or 20% Preferential treatment
Inherited assets Stepped-up basis Gain erased at death Eliminates prior gain

State rules matter too. Some states levy no tax on long-term gains, while others tax them as ordinary income. Confirm the current thresholds on the IRS tax rates page and your state’s revenue department before you sell.

Key Takeaway
Crossing the one-year holding mark is the simplest, most reliable way to reduce capital gains tax. If a sale isn’t urgent, waiting past the anniversary often saves more than any complex strategy.

Tax-Advantaged Accounts and Holding Period Strategies

Retirement accounts are the cleanest legal shelter for appreciated assets, but the shelter works differently by account type.

Health savings accounts. With a qualifying high-deductible health plan, an HSA is the only account that is tax-free going in, while it grows, and coming out for qualified medical expenses.

529 plans. For education savings, a 529 lets contributions grow tax-deferred and qualified withdrawals come out federally tax-free.

Asset Location: Which Assets Belong in Which Account

The strategy most investors miss is asset location, deciding which holdings sit in which account.

  • Tax-inefficient assets, actively managed mutual funds, taxable bonds, real estate investment trusts, and high-dividend stocks, belong in the 401(k) or traditional IRA, where their annual distributions do not create a current tax bill.
  • High-growth, low-distribution assets, broad-market index funds and individual growth stocks you intend to hold for decades, are strong candidates for the Roth, where the eventual appreciation escapes tax entirely.
  • Municipal bonds and broad index ETFs, already tax-efficient, can sit in the taxable account without much drag.

Holding period planning works alongside these accounts.

Account type and holding period are not competing strategies, they stack. Use retirement accounts for assets you never need to touch, holding-period discipline for everything else, and place each asset where its tax profile does the least damage.

Key Takeaway
Before you sell anything, ask two questions: Has the holding period crossed one year, and is this asset sitting in the right account? Fixing the second question can save more over a lifetime than fixing the first.

Tax-Loss Harvesting and Cost Basis: Offset Gains With Losses

Tax-loss harvesting is the practice of selling investments at a loss to offset realized gains elsewhere in your portfolio. The IRS outlines these offset and carryforward rules in its capital losses guidance.

The key variable is cost basis, the original value of an asset adjusted for purchases, splits, and reinvested dividends. Your adjusted cost basis determines your actual taxable gain.

A common mistake is selling the wrong lot. When you sell shares, specify which lots to sell; selling your highest-basis shares first minimizes the reported gain.

Cost Basis and Home Improvements That Reduce Your Taxable Gain

For real estate, home improvements raise your cost basis and shrink your taxable gain. A new roof, an added room, or a major systems upgrade all count as capital improvements rather than repairs, and each dollar spent reduces the profit the IRS can tax. Keep every receipt. When a client sells a long-held property, we reconstruct decades of improvements to lower the realized gain as much as the records allow.

1031 Exchange Rules for Investment Property

A real estate agent and a senior couple reviewing property documents at a kitchen table, with a laptop showing a property listing and a calendar with deadlines marked
A real estate agent and a senior couple reviewing property documents at a kitchen table, with a laptop showing a property listing and a calendar with deadlines marked

A 1031 exchange lets you defer capital gains tax on investment property by reinvesting proceeds into a like-kind replacement property.

The mechanics reward attention to detail. The IRS details these requirements in its like-kind exchange rules.

Watch Out
The 45-day identification window is unforgiving. Investors who wait to start shopping until after closing routinely miss it and lose the deferral entirely, turning a planned tax deferral into a fully taxable event.

How to Avoid Capital Gains Tax on Real Estate

Real estate offers some of the most generous legal exclusions in the tax code. The two most common tools are the primary residence exclusion and Opportunity Zone investments, and both can eliminate or defer a large gain when used correctly.

Primary Residence Exclusion and Opportunity Zones

The primary residence exclusion lets qualifying homeowners exclude a substantial portion of gain on the sale of a primary residence, provided they meet the ownership and use tests. For investment property, a Qualified Opportunity Fund can defer and potentially reduce gain if you reinvest within the required window. These are powerful but technical, so confirm current limits on the IRS Opportunity Zone page before committing.

Work With Holtz →

Strategy Best For Main Trade-off
Primary residence exclusion Owner-occupied homes Must meet use tests
Opportunity Zone fund Large realized gains Long hold, illiquid
1031 exchange Rental and investment property Tight deadlines
Installment sale Sellers needing income spread Buyer default risk

Installment Sale Tax Treatment and Spreading Gains Across Years

An installment sale lets you receive proceeds over several years rather than in one lump sum, so you report gain as payments arrive. This can keep each year’s realized gain in a lower bracket and is a practical way to spread gains over several years. The IRS installment sales publication explains how interest and basis recovery are reported.

The risk is buyer default. If the buyer stops paying, you’ve deferred tax on money you never received.

Charitable Giving and Donating Appreciated Assets

Donating appreciated assets directly to a qualified charity can avoid the capital gains tax you’d owe on a sale while still generating a charitable deduction. When you donate appreciated stock or property held more than a year, the charity sells it tax-free, and you generally deduct the fair market value, not what you originally paid. That double benefit is why this strategy sits near the top of most advisors’ lists.

Why the Order of Operations Matters

Consider two paths for a $50,000 position with a $10,000 cost basis, held more than a year, donated to a charity you already support.

  • Sell, then donate the cash. You realize a $40,000 long-term gain. At a 15% federal rate that is roughly $6,000 in federal tax, plus any state tax. The charity receives $44,000 after tax, and you deduct $44,000.
  • Donate the shares directly. No capital gain is realized. The charity receives the full $50,000, and you deduct the full $50,000 fair market value (subject to the deduction limits below).

The direct donation delivers more to the charity and more deduction to you, with no gain reported on your return.

Deduction Limits and the 30% Rule

The deduction for appreciated long-term capital gain property donated to a public charity is generally limited to 30% of your adjusted gross income, with a five-year carryforward for unused amounts. Cash gifts to a public charity are generally deductible up to 60% of AGI. If your gift is large relative to your income, plan the timing across multiple years or pair it with a donor-advised fund.

Donor-Advised Funds: The Bunching Tool

A donor-advised fund (DAF) is a sponsoring public charity that accepts your gift, invests it, and lets you recommend grants to other charities over time. It lets you:

  • Take the full deduction in a single high-income year, when the deduction is worth the most.
  • Bunch several years of intended giving into one tax year to clear the standard deduction threshold.
  • Donate appreciated stock, avoid the capital gain, and grant the proceeds to charities on your own schedule.

Most major brokerage firms and community foundations sponsor DAFs, and the account can be opened in a matter of days.

Qualified Charitable Distributions for Retirees

If you are 70½ or older, a qualified charitable distribution (QCD) lets you send up to $100,000 per year (indexed for inflation) directly from an IRA to a qualified charity. It counts toward your required minimum distribution but is excluded from taxable income entirely, which can also reduce the taxable portion of your Social Security benefits and lower Medicare premium surcharges.

What Does Not Work

  • Donating a loss position. If the asset is worth less than you paid, sell it first, harvest the loss, and donate the cash. Donating the losing shares directly forfeits the loss deduction.
  • Donating to a private foundation. Different deduction limits apply (generally 20% of AGI for appreciated stock), and the paperwork is heavier.
  • Donating short-term holdings. Property held one year or less is generally deductible only at cost basis, not fair market value, which erases most of the benefit.
Pro Tip
If you already give to charity every year, run the numbers on donating your most-appreciated long-term position instead of writing a check. The combined capital gains avoidance and fair-market-value deduction frequently beats a cash gift by a wide margin.

Comparing Strategies: A Decision Framework by Asset Type

Match the strategy to the asset, not the other way around.

  • Appreciated stock in a taxable account: Hold past one year, harvest losses to offset gains, and consider donating the highest-gain shares.
  • Rental or investment property: Use a 1031 exchange to defer, or an installment sale if you need ongoing income.
  • Primary residence: Apply the residence exclusion if you meet the ownership and use tests.

This is where professional guidance earns its keep. Complex transactions, trusts, probate, and Power of Attorney situations each change which strategy applies. A recent client, Marion Wickerd, said our team guided her through every legal matter involving a Power of Attorney “every step of the way.”


The rules that let you reduce, defer, or legally avoid capital gains tax are real, but they reward planning over urgency.

Frequently Asked Questions

How do I avoid capital gains tax on my investment account?

You can reduce or defer capital gains tax on investment accounts through several legal methods. Holding investments for more than one year qualifies you for long-term capital gains rates, which are lower than ordinary income rates. You can also harvest tax losses to offset gains, contribute to tax-advantaged accounts like a 401(k) or IRA, or donate appreciated assets to charity. Each strategy has different eligibility rules and trade-offs, so the right approach depends on your income, holding period, and financial goals.

Who qualifies for 0% capital gains tax?

The 0% long-term capital gains rate applies to taxpayers whose taxable income falls below certain thresholds. For 2026, single filers with taxable income up to approximately $48,350 and married couples filing jointly up to approximately $96,700 may qualify for the 0% rate on long-term capital gains. These thresholds are adjusted annually for inflation. Short-term gains do not qualify and are taxed at ordinary income rates. Your state may also impose its own capital gains rules.

Can I defer capital gains tax when I sell an investment property?

Yes. A 1031 exchange allows you to defer capital gains tax on investment property by reinvesting proceeds into a like-kind replacement property. You must identify replacement properties within 45 days and close within 180 days. The replacement property must be of equal or greater value, and you must use a qualified intermediary. Other deferral options include installment sales, Opportunity Zone investments, and Delaware Statutory Trusts. Each has specific eligibility and compliance requirements.

How long do I have to own an investment before selling to qualify for long-term capital gains rates?

You must hold the investment for more than one year to qualify for long-term capital gains rates. The holding period begins the day after you acquire the asset and ends on the day you sell it. If you sell at exactly one year or less, the gain is treated as short-term and taxed at your ordinary income rate. For real estate, the holding period rules apply the same way, though certain exceptions exist for inherited property and principal residences.

What expenses can reduce the taxable gain on an investment property?

Capital improvements increase your cost basis and reduce the taxable gain when you sell. Qualifying improvements include room additions, roof replacements, HVAC systems, and permanent landscaping. You can also add closing costs, title fees, and certain legal expenses from the purchase. Routine repairs and maintenance do not increase basis. Keep detailed records and receipts for all improvements. The adjusted cost basis is subtracted from the sale price to determine your realized gain.

How does an installment sale work for tax purposes?

An installment sale lets you spread the tax on your gain across multiple years by receiving payments over time rather than a lump sum. Each payment includes a portion of the gain, which is taxed in the year received. This can keep you in a lower tax bracket and reduce your overall tax liability. However, the buyer may default, and you cannot use an installment sale for property sold to a dealer. Depreciation recapture is generally taxed in the year of sale.

Be in the Know

Stay up-to-date with exclusive news and market updates from Randall & Marie Holtz
Randall & Marie Holtz | CA DRE# 02079908
© 2026 Randall & Marie Holtz. All rights reserved.
Berkshire Hathaway Home Services® used with permission.
Randall & Marie Holtz fully supports the principles of the Fair Housing Act and the Equal Opportunity Act.
Powered by
Copyright © 2026 |
Randall & Marie Holtz