Taxation and Regulatory Compliance

How to Avoid Paying Capital Gains Tax

Understand the key factors that influence your capital gains tax liability and discover how proactive financial decisions can help minimize your tax burden.

When you sell an investment or personal property for a profit, that profit is subject to capital gains tax. A capital asset includes most items you own for personal use or investment, such as stocks, bonds, or your home. The gain is the difference between the asset’s selling price and its basis, which is what you paid for it.

The tax treatment of a capital gain depends on how long you owned the asset. If you hold an asset for one year or less, the profit is a short-term capital gain taxed at your ordinary income rate. If you hold it for more than one year, it qualifies as a long-term capital gain, which has lower tax rates of 0%, 15%, or 20%, depending on your total taxable income.

Timing and Income-Based Strategies

The simplest strategy to lower capital gains tax is to hold an asset for more than one year before selling. This ensures the profit is taxed at the more favorable long-term rates instead of the higher short-term rates. For an investor in a high tax bracket, this patience can mean the difference between paying a 37% tax rate and a 20% rate on the same profit.

Tax-loss harvesting involves selling investments at a loss to offset gains realized elsewhere in your portfolio. Capital losses must first be used to offset capital gains. If you have more losses than gains, you can use up to $3,000 of the excess loss to reduce your ordinary income for the year. Any remaining losses can be carried forward to future years.

When implementing tax-loss harvesting, you must be aware of the wash-sale rule. This IRS regulation prevents you from claiming a loss on a security if you buy a “substantially identical” one within 30 days before or after the sale. A violation of this rule disallows the loss for tax purposes, though the disallowed loss is added to the cost basis of the new shares, effectively deferring the tax benefit until the replacement shares are sold.

Your income level in the year you sell an asset directly impacts your tax bill, as long-term capital gains rates are tiered. In 2025, single filers with taxable income up to $48,350 and married couples filing jointly with income up to $96,700 are in the 0% long-term capital gains tax bracket. If you anticipate a year with lower income due to retirement or a job change, it could be an opportune time to sell appreciated assets.

Strategies Involving Asset Transfers

Gifting appreciated assets can be a way to manage capital gains tax, especially if the recipient is in a lower tax bracket. When you give someone an asset, you do not realize the gain or pay tax on it. The recipient takes on your original cost basis in a “carryover basis” transfer. When they sell the asset, they pay the capital gains tax, but their lower income may qualify them for a 0% or 15% rate.

This strategy works with the annual gift tax exclusion, which in 2025 allows you to give up to $19,000 to any individual without filing a gift tax return. A married couple can combine their exclusions to give up to $38,000 per recipient. For example, a parent could gift $19,000 worth of stock to an adult child, who would then be responsible for any capital gains tax upon selling it.

Donating highly appreciated assets directly to a qualified charity allows you to avoid capital gains tax on that asset. If you sell an appreciated stock and then donate the cash, you must first pay capital gains tax on the profit. Donating the stock directly to the charity bypasses this tax.

This approach provides two tax benefits: you avoid the capital gains tax, and you can claim a charitable deduction for the asset’s full fair market value. This deduction is limited to 30% of your adjusted gross income (AGI) for such donations. Any excess deduction amount can be carried over for up to five years.

Utilizing Tax-Advantaged Accounts and Investments

Investing through tax-advantaged retirement accounts like 401(k)s and Individual Retirement Arrangements (IRAs) shields you from capital gains taxes. Within these accounts, investments grow and compound without generating an annual tax bill from dividends or capital gains. Tax implications are deferred until you take withdrawals, with the tax treatment depending on the account type.

In traditional accounts, like a Traditional IRA or 401(k), you contribute pre-tax dollars, which may provide an upfront tax deduction. Investments grow tax-deferred, so you pay no capital gains tax on transactions within the account. When you withdraw funds in retirement, the entire amount is taxed as ordinary income.

Roth accounts, like a Roth IRA or Roth 401(k), are funded with after-tax dollars, so there is no initial tax deduction. The advantage is that all investment growth, including capital gains, is tax-free upon qualified withdrawal in retirement. This means decades of compounded gains can be accessed without paying capital gains or income tax.

Qualified Opportunity Funds (QOFs) were created to encourage investment in economically distressed areas. By reinvesting eligible capital gains into a QOF within 180 days of a sale, you can defer paying tax on the original gain until the end of 2026. If you hold the QOF investment for at least 10 years, any appreciation on the QOF investment itself can be permanently excluded from capital gains tax when you sell it.

Asset-Specific Exclusions and Deferrals

Primary Residence Exclusion

Under Section 121, homeowners can exclude gain from the sale of a primary residence. You can exclude up to $250,000 of the gain, or up to $500,000 if you are married and file a joint return. This exclusion can be used multiple times, but generally not more than once every two years.

To qualify, you must meet both the ownership and use tests. These require you to have owned the home and used it as your main residence for at least two of the five years before the sale. For example, you could live in the house for a year, rent it out for three years, and then move back in for another year and still meet the use test.

1031 Exchange

A 1031 exchange allows real estate investors to defer capital gains tax indefinitely. This provision lets you sell an investment property and defer the tax by reinvesting the proceeds into a new “like-kind” property. For real estate, “like-kind” is broad, allowing an exchange of an apartment building for raw land, for example.

The rules for a 1031 exchange are strict. From the day you sell your property, you have 45 days to identify potential replacement properties. You then have 180 days from the original sale date to close on the purchase of a new property. A qualified intermediary must hold the sale proceeds during this period to prevent “constructive receipt” of the funds.

Qualified Small Business Stock

The Qualified Small Business Stock (QSBS) exclusion under Section 1202 offers a tax benefit for investors in certain small businesses. This rule allows eligible shareholders to exclude up to 100% of capital gains from the sale of QSBS. The excludable gain is capped at the greater of $10 million or 10 times the stock’s adjusted basis.

For stock to be considered QSBS, several requirements must be met:

  • The stock must be acquired at its original issuance from a domestic C corporation.
  • The corporation must have had gross assets of $50 million or less when the stock was issued.
  • The shareholder must hold the stock for more than five years.
  • The corporation must be engaged in a qualified trade or business.

This exclusion is designed to encourage investment in new ventures.

Estate Planning and Inheritance Considerations

Inheritance rules can eliminate capital gains tax through a “step-up in basis.” When an individual passes away and leaves assets to an heir, the asset’s cost basis is adjusted from its original purchase price to its fair market value on the date of the owner’s death. This provision is found in Section 1014.

This step-up erases the capital gain accumulated during the original owner’s lifetime. For example, imagine a parent bought stock for $50,000 that was worth $500,000 on the day they died. By passing the stock to their child through their estate, the child inherits the stock with a new cost basis of $500,000. If the child then immediately sells the stock for that same market price, there is no capital gain to report and no tax is due.

Previous

Do I Pay Capital Gains Tax on My House Sale?

Back to Taxation and Regulatory Compliance
Next

What Is the Liquidation-Reincorporation Doctrine?