
Last Updated: October 16, 2026
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.
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.
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.
The strategy most investors miss is asset location, deciding which holdings sit in which account.
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.
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.
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.

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.
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.
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.
| 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 |
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.
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.
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.
The direct donation delivers more to the charity and more deduction to you, with no gain reported on your return.
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.
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:
Most major brokerage firms and community foundations sponsor DAFs, and the account can be opened in a matter of days.
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.
Match the strategy to the asset, not the other way around.
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.
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.
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.
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.
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.
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.
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.

