How to Avoid Taxes on Investments: 8 Strategies That Work

The most effective ways to avoid taxes on investments are to hold positions longer than a year, shelter growth inside tax-advantaged accounts, harvest losses against gains, donate appreciated shares instead of cash, own municipal bonds when your bracket justifies it, match each investment to the right account type, and plan around the stepped-up basis at death. A single filer with taxable income under $49,450 in 2026 pays zero federal tax on long-term capital gains. Someone who sells the same investment after eleven months can face a rate as high as 37 percent. The gap between those two outcomes is the entire game.

Hold Investments Longer Than One Year

Federal tax law draws a hard line at the one-year mark. Sell an investment you have owned for a year or less, and the profit is taxed at ordinary income rates, which top out at 37 percent for 2026. Hold that same investment for more than one year, and the profit qualifies for long-term capital gains rates of 0, 15, or 20 percent depending on your taxable income.1Office of the Law Revision Counsel. 26 USC 1222 – Other Terms Relating to Capital Gains and Losses The holding period starts the day after you buy, so an investment purchased on January 15 needs to be held until at least January 16 of the following year.

For 2026, the long-term capital gains brackets for single filers are:

  • 0 percent on taxable income up to $49,450
  • 15 percent on taxable income from $49,451 to $545,500
  • 20 percent on taxable income above $545,500

Married couples filing jointly get roughly double those thresholds: 0 percent up to $98,900, 15 percent up to $613,700, and 20 percent above that.2Internal Revenue Service. IRS Releases Tax Inflation Adjustments for Tax Year 2026 An investor in the 37 percent bracket who waits an extra month to cross the one-year line cuts the federal tax on that gain nearly in half.

Fund Tax-Advantaged Accounts

Tax-advantaged accounts are where the most reliable savings happen, because the tax benefit is built into the account itself and does not depend on market timing. Every dollar of growth inside a traditional 401(k) or IRA compounds without an annual tax drag. Roth accounts go a step further by making qualified withdrawals completely tax-free.

Traditional 401(k) and IRA

Contributions to a traditional 401(k) or 403(b) come out of your paycheck before federal income tax, which lowers your taxable income for the year. For 2026, the elective deferral limit is $24,500. If you are 50 or older, you can contribute an additional $8,000 in catch-up contributions.3Internal Revenue Service. 401(k) Limit Increases to $24,500 for 2026, IRA Limit Increases to $7,500

Traditional IRAs work the same way conceptually. Contributions may be tax-deductible, and growth is tax-deferred. The 2026 IRA contribution limit is $7,500, with an additional $1,100 catch-up for those 50 and older.4Internal Revenue Service. COLA Increases for Dollar Limitations on Benefits and Contributions The trade-off with any traditional account is that withdrawals in retirement are taxed as ordinary income. You are not eliminating the tax, just deferring it to a year when your bracket may be lower.

Roth IRA and Roth 401(k)

Roth contributions are made with money you have already paid tax on, so there is no upfront deduction. The payoff comes later. Qualified withdrawals of both contributions and earnings are completely tax-free after age 59½, as long as the account has been open for at least five tax years. That five-year clock starts on January 1 of the year you make your first Roth contribution, and it matters more than people expect. Opening a Roth IRA at age 56 means you cannot take tax-free earnings withdrawals until age 61, even though you passed 59½ two years earlier.

Roth accounts are especially valuable if you believe your tax rate will be the same or higher in retirement. All of the growth escapes taxation permanently rather than being deferred. Roth 401(k) contributions share the same $24,500 base limit as traditional 401(k) contributions, so choosing Roth does not cost you any contribution room.

Health Savings Accounts

An HSA offers something no retirement account can match: a deduction going in, tax-free growth while invested, and tax-free withdrawals for qualified medical expenses. For 2026, you can contribute up to $4,400 with self-only high-deductible health plan coverage, or $8,750 with family coverage.5Internal Revenue Service. Expanded Availability of Health Savings Accounts Under the One, Big, Beautiful Bill Act Participants 55 or older can add an extra $1,000.

Many people use HSAs as a stealth retirement account. You can pay medical bills out of pocket today, let the balance grow invested for decades, and reimburse yourself tax-free years later with no deadline on when you submit the reimbursement. After age 65, you can withdraw HSA funds for any purpose and pay ordinary income tax, similar to a traditional IRA but without the early withdrawal penalty.6Office of the Law Revision Counsel. 26 USC 223 – Health Savings Accounts

The Strings Attached

Pulling money from a traditional 401(k) or IRA before age 59½ generally triggers a 10 percent early withdrawal penalty on top of ordinary income tax.7Internal Revenue Service. Retirement Topics – Exceptions to Tax on Early Distributions Exceptions exist for disability, a first home purchase (up to $10,000 from an IRA), certain medical expenses, and separation from service after age 55. Traditional account holders also must begin taking required minimum distributions at age 73.8Internal Revenue Service. Retirement Plan and IRA Required Minimum Distributions FAQs Roth IRAs have no RMDs during the original owner’s lifetime, which is another reason they anchor long-term tax planning.

Harvest Losses to Offset Gains

Selling a losing investment is never fun, but doing it deliberately to offset gains you have realized elsewhere is one of the few tax moves that puts money back in your pocket the same year. Capital losses first cancel out capital gains dollar for dollar. If your losses exceed your gains, you can deduct up to $3,000 of the remaining loss against ordinary income, or $1,500 if married filing separately.9Office of the Law Revision Counsel. 26 USC 1211 – Limitation on Capital Losses Any unused loss beyond that carries forward into future tax years indefinitely.10Office of the Law Revision Counsel. 26 US Code 1212 – Capital Loss Carrybacks and Carryovers

The biggest trap here is the wash-sale rule. If you sell a stock at a loss and buy the same stock, or something “substantially identical,” within 30 days before or after the sale, the IRS disallows the loss. The disallowed amount gets added to the cost basis of the replacement shares instead of reducing your current tax bill.11Office of the Law Revision Counsel. 26 USC 1091 – Loss From Wash Sales of Stock or Securities The full blackout window is 61 days: 30 days before the sale, the sale date, and 30 days after. Investors who want to stay in a similar market segment during that window often buy a different index fund tracking a related but not identical benchmark. Harvested losses are reported on Form 8949 and carried to Schedule D.12Internal Revenue Service. Instructions for Form 8949

Donate Appreciated Shares Instead of Selling

If you are charitably inclined and sitting on an investment with a large unrealized gain, donating the shares directly to a qualified charity is one of the most tax-efficient moves available. You avoid paying capital gains tax on the appreciation entirely, and you generally get a charitable deduction for the full fair market value of the shares on the date of the gift. The stock must be long-term property, meaning you have held it for more than one year.13Internal Revenue Service. Publication 526, Charitable Contributions

Suppose you own $20,000 worth of stock that you bought for $5,000. Selling it triggers $15,000 in capital gains, which could cost you $2,250 or more in federal tax before you even write the check to charity. Donating the shares directly eliminates that tax hit while still giving you a $20,000 deduction.

The deduction for donated appreciated stock is capped at 30 percent of your adjusted gross income for the year, with any excess carrying forward for up to five years.13Internal Revenue Service. Publication 526, Charitable Contributions Donor-advised funds have made this strategy accessible to people who do not give large amounts to a single charity at once. You contribute appreciated shares to the fund, take the deduction immediately, and recommend grants to individual charities over time.

Consider Municipal Bonds

Interest on bonds issued by state and local governments is generally exempt from federal income tax. The exemption applies to bonds issued by states, cities, counties, and their political subdivisions.14Office of the Law Revision Counsel. 26 USC 103 – Interest on State and Local Bonds If you buy bonds issued by your own state of residence, the interest is often exempt from state income tax as well.

The value of that exemption depends on your bracket. A municipal bond yielding 3.5 percent delivers the same after-tax income as a taxable bond yielding about 5.4 percent for someone in the 37 percent federal bracket. That comparison, called the taxable-equivalent yield, is the right way to weigh munis against corporate bonds or Treasuries. The higher your bracket, the more attractive the tax-free yield becomes. Tax-exempt interest is also excluded from gross income, so it does not lift your AGI into phase-outs for other deductions and credits.

One boundary is worth knowing. Interest on certain private activity municipal bonds is treated as a tax preference item under the Alternative Minimum Tax. If you are subject to the AMT, that otherwise tax-free interest gets added back into your taxable income for AMT purposes.15Office of the Law Revision Counsel. 26 US Code 57 – Items of Tax Preference General obligation bonds and most essential-purpose revenue bonds are not affected.

Put Each Investment in the Right Account

Owning the right investments is only half the equation. Holding them in the wrong account type quietly erodes returns through unnecessary taxes. The core idea is straightforward: investments that generate a lot of taxable income each year belong in tax-advantaged accounts, while investments that generate little taxable income are fine in a regular brokerage account.

The worst offenders for annual tax bills include:

  • REITs, which must distribute at least 90 percent of their taxable income as dividends, most of which are taxed at ordinary rates rather than the preferential qualified dividend rate.16Internal Revenue Service. Instructions for Form 1120-REIT
  • Actively managed mutual funds, whose frequent internal trading generates capital gains distributions you owe tax on even if you never sold a share.
  • Taxable bond funds, where interest income is taxed at ordinary rates every year.

Those belong inside a 401(k), IRA, or other tax-sheltered account, where the annual distributions do not create a taxable event. In contrast, broad-market index funds, growth stocks that pay little or no dividends, and ETFs designed to minimize distributions are well-suited to a taxable brokerage account. Their annual tax cost is low, and when you eventually sell, the gain qualifies for long-term capital gains rates.

Plan Around the Stepped-Up Basis at Death

When someone inherits an investment, the cost basis resets to the fair market value on the date of the original owner’s death. This is called a stepped-up basis, and it effectively wipes out all of the unrealized capital gains that accumulated during the deceased owner’s lifetime.17Office of the Law Revision Counsel. 26 US Code 1014 – Basis of Property Acquired From a Decedent If your parent bought stock for $10,000 decades ago and it was worth $200,000 when they passed away, your cost basis is $200,000. Sell it the next day at that price and you owe zero capital gains tax on the $190,000 of appreciation.

The practical implication is that highly appreciated assets you plan to leave to heirs are often better held until death than sold during your lifetime. Selling triggers a taxable gain. Holding and passing the asset on eliminates it. Retirees choosing which assets to spend down should generally sell investments with smaller embedded gains first and let the most-appreciated positions ride.

The stepped-up basis applies to stocks, real estate, and most other capital assets. It does not apply to assets inside traditional retirement accounts like 401(k)s and IRAs, because those withdrawals are taxed as ordinary income regardless of who takes them. Roth IRAs that pass to heirs do keep their tax-free character, making them doubly powerful in an estate plan.

Watch the 3.8 Percent Net Investment Income Tax

Even after optimizing for long-term capital gains rates, higher-income investors face an additional 3.8 percent surtax on net investment income. The tax kicks in when your modified adjusted gross income exceeds $200,000 for single filers or $250,000 for married couples filing jointly, and those thresholds are not indexed for inflation.18Office of the Law Revision Counsel. 26 USC 1411 – Imposition of Tax The tax applies to the lesser of your net investment income or the amount by which your MAGI exceeds the threshold.

Net investment income includes interest, dividends, capital gains, rental income, and royalties. It does not include wages, Social Security benefits, or most self-employment income.19Internal Revenue Service. Net Investment Income Tax For an investor in the 20 percent long-term capital gains bracket who also owes the NIIT, the effective federal rate on long-term gains becomes 23.8 percent. Strategies that reduce your MAGI, like maximizing pre-tax retirement contributions or harvesting losses, can sometimes push you below the threshold entirely.

Because the $200,000 and $250,000 thresholds have never been adjusted for inflation, more taxpayers cross them each year as wages and investment returns grow. What was originally aimed at high earners now catches a broader group, which makes the surtax part of routine investment planning rather than a niche concern.