To minimize capital gains tax, hold appreciated assets for more than a year before selling, offset winners with losers, use the exclusions and deferrals the tax code already provides, and keep as much of your investing as possible inside retirement and health savings accounts. The right mix depends on what you own, when you need the money, and where your income falls in the rate brackets.
Hold for More Than One Year
The simplest lever is time. Gains on assets sold within a year of purchase are taxed as ordinary income, at rates that reach 37 percent. Gains on assets held longer than a year qualify for long-term rates of 0, 15, or 20 percent.1Office of the Law Revision Counsel. 26 USC 1222 – Other Terms Relating to Capital Gains and Losses
For 2026, the long-term brackets are:
- 0 percent on taxable income up to $49,450 (single), $98,900 (married filing jointly), or $66,200 (head of household).
- 15 percent above those amounts and up to $545,500 (single), $613,700 (married filing jointly), or $579,600 (head of household).
- 20 percent above the 15 percent thresholds.2Internal Revenue Service. Revenue Procedure 2025-32
The 0 percent rate is a real opportunity in low-income years, such as early retirement before Social Security or pension income begins. Selling appreciated shares while your taxable income stays under the threshold can wipe out the federal tax on the gain entirely.
Offset Gains With Losses
Losses in your taxable brokerage account are useful. Sell a losing position and the loss first cancels out gains of the same type: short-term against short-term, long-term against long-term. If losses still exceed gains for the year, up to $3,000 ($1,500 if married filing separately) can offset ordinary income, and anything left over carries forward to future years with no expiration.3Office of the Law Revision Counsel. 26 USC 1211 – Losses From Sales or Exchanges of Capital Assets4Office of the Law Revision Counsel. 26 USC 1212 – Capital Loss Carrybacks and Carryovers
Watch the wash sale rule. If you buy the same or a substantially identical security within 30 days before or after selling at a loss, the IRS disallows the loss for the current year. The disallowed amount is added to the basis of the replacement shares, so the benefit is deferred rather than lost.5Office of the Law Revision Counsel. 26 USC 1091 – Loss From Wash Sales of Stock or Securities A common way around this is to replace the sold fund with a different fund tracking a similar but not identical index. Options and contracts to acquire the same security can trigger the rule too.
Use the Home Sale Exclusion
Sell your primary residence and you can exclude up to $250,000 of gain from tax, or $500,000 if you file jointly.6Office of the Law Revision Counsel. 26 USC 121 – Exclusion of Gain From Sale of Principal Residence To qualify, during the five years ending on the sale date you must have owned the home for at least two years and lived in it as your primary residence for at least two years. Those two years do not need to be consecutive. For a joint return, one spouse has to meet the ownership test and both have to meet the use test. The exclusion is available roughly once every two years.
If you sell before hitting the two-year marks because of a job move, a health issue, or another unforeseen circumstance, you may still get a prorated exclusion based on the fraction of the two-year period you completed. A single filer who lived in the home a full year before a qualifying relocation, for example, could exclude up to $125,000.
Gain above the exclusion is still taxable at the applicable long-term or short-term rate. A married couple with $600,000 of gain owes tax only on the $100,000 above their $500,000 exclusion.
Defer Real Estate Gains With a 1031 Exchange
Investment real estate can be swapped for other investment real estate without recognizing gain, under Section 1031. The rules are strict: you have 45 days from transferring the relinquished property to identify replacement property in writing, and 180 days (or the due date of the return, including extensions, whichever is earlier) to close on it.7Office of the Law Revision Counsel. 26 USC 1031 – Exchange of Real Property Held for Productive Use or Investment
Since 2018, only real property qualifies. Vehicles, equipment, artwork, and collectibles are out. Property held primarily for resale is also excluded. Most investors route the proceeds through a qualified intermediary who holds the funds and delivers them to the replacement purchase, keeping the transaction compliant.
The tax is deferred, not erased. Your old basis carries into the new property, so the gain resurfaces when you eventually sell without another exchange. Some investors chain exchanges for decades and let the step-up in basis at death clear the deferred gain.
Spread the Tax Through an Installment Sale
If a buyer pays over more than one tax year, you can report the gain as payments come in rather than all in the year of sale.8Office of the Law Revision Counsel. 26 USC 453 – Installment Method Each payment is treated partly as return of basis and partly as gain, based on the profit-to-price ratio. Spreading the income over several years can keep you in lower brackets and reduce total tax.
The installment method applies automatically when payments cross tax years; you can elect out on your return if you would rather take the whole gain up front. Inventory and dealer sales do not qualify, and sales to related parties come with anti-abuse rules that can accelerate the deferred gain if the buyer resells within two years.
Shelter Growth in Retirement and Health Accounts
Trades inside 401(k)s, IRAs, and HSAs do not generate reportable capital gains. You can rebalance freely without a tax bill on each sale, and the compounding effect over decades is significant.
- Traditional 401(k) and IRA: contributions are typically pre-tax, growth is tax-deferred, and withdrawals in retirement are taxed as ordinary income.9Internal Revenue Service. Topic No. 424, 401(k) Plans
- Roth 401(k) and Roth IRA: contributions are after-tax, and qualified withdrawals, including all gains, come out tax-free.
- HSA: contributions are deductible, growth is tax-free, and withdrawals for qualified medical expenses are tax-free.
For 2026, you can contribute up to $24,500 to a 401(k) and $7,500 to an IRA.10Internal Revenue Service. 401(k) Limit Increases to $24,500 for 2026, IRA Limit Increases to $7,500 HSA limits are $4,400 for self-only coverage and $8,750 for family coverage.11Internal Revenue Service. Notice 2026-05, HSA Contribution Limits
Donate or Gift Appreciated Assets
Donating appreciated stock or other long-term capital gain property directly to a qualified charity avoids the built-in gain and lets you deduct the full fair market value. Shares bought for $5,000 and now worth $25,000, given directly to charity, produce a $25,000 deduction and skip the $20,000 gain you would have realized by selling first.12Internal Revenue Service. Publication 526, Charitable Contributions The asset has to be long-term to get the fair-market-value deduction; short-term holdings are generally limited to your basis. Annual deductions are capped as a percentage of income, with a five-year carryforward for the excess.
Gifting appreciated assets to family in lower brackets is another route. In 2026, you can give up to $19,000 per recipient with no gift tax filing.13Internal Revenue Service. Frequently Asked Questions on Gift Taxes The recipient inherits your basis, but if their income puts them in the 0 percent bracket, they may pay nothing when they sell. The kiddie tax complicates this for children under 19 (or full-time students under 24), whose unearned income above a threshold gets taxed at the parents’ rate, so the strategy works best with adult recipients who have genuinely low income.
Plan Around the Step-Up in Basis
Assets passed at death get a basis reset to fair market value on the date of death, wiping out the gain that built up during the decedent’s lifetime.14Office of the Law Revision Counsel. 26 USC 1014 – Basis of Property Acquired From a Decedent Stock bought for $10,000 and worth $200,000 at death lands in the heir’s hands with a $200,000 basis; a sale soon after produces little or no gain. That is why some highly appreciated holdings are better held for life than gifted during it: a gift carries over your basis, while an inheritance resets it. Couples in the nine community property states get an added benefit, because the entire community property asset (not just the deceased spouse’s half) receives the step-up.
Watch the 3.8 Percent Net Investment Income Tax
Higher-income taxpayers owe an extra 3.8 percent on net investment income, including capital gains, on top of the regular capital gains rates. It applies to the smaller of your net investment income or the amount by which your modified adjusted gross income exceeds:15Internal Revenue Service. Topic No. 559, Net Investment Income Tax
- $250,000 for joint filers
- $200,000 for single or head-of-household filers
- $125,000 for married filing separately
These numbers do not adjust for inflation, so more filers cross them each year. Gain excluded under the home sale rule is not subject to this tax, and wages, Social Security benefits, and tax-exempt bond interest are not investment income. Strategies that hold down MAGI in a big-gain year (installment sales, loss harvesting, retirement contributions, spreading sales across calendar years) can keep some or all of the gain out of the surtax.
Know the Higher-Rate Categories and QSBS
Two types of long-term gain do not qualify for the standard 0/15/20 rates:
- Collectibles (art, antiques, coins, stamps, precious metals, certain wines) are taxed at up to 28 percent, regardless of your income bracket.
- Depreciation recapture on real estate (unrecaptured Section 1250 gain) is taxed at up to 25 percent. Any gain above the recaptured portion falls under the regular long-term rates.16Internal Revenue Service. Topic No. 409, Capital Gains and Losses
On the favorable side, qualified small business stock (QSBS) held at least five years can qualify for exclusion of up to 100 percent of the gain. The issuer must be a domestic C corporation with gross assets of $50 million or less when the stock is issued, and you must have acquired the shares at original issuance. The 100 percent exclusion applies to stock acquired after September 27, 2010.17Office of the Law Revision Counsel. 26 USC 1202 – Partial Exclusion for Gain From Certain Small Business Stock For founders and early employees, this is one of the largest single tax benefits in the code.
Report the Sale and Pay Estimates on Big Gains
Sales of capital assets are reported on Form 8949 and totaled on Schedule D of your Form 1040.18Internal Revenue Service. Instructions for Form 8949 A large realization (a business sale, a rental property, a concentrated stock position) usually calls for estimated tax payments to avoid an underpayment penalty. The general safe harbor is paying in, through withholding and estimated payments, at least the smaller of 90 percent of the current year’s tax or 100 percent of the prior year’s tax. If your prior-year AGI was over $150,000 ($75,000 if married filing separately), the prior-year figure rises to 110 percent.19Internal Revenue Service. Form 1040-ES, Estimated Tax for Individuals
If the gain arrives late in the year, the annualized income installment method lets you tie each quarter’s required payment to the income actually received in that quarter, which can eliminate penalties for earlier quarters. Most states tax capital gains too, so plan state estimated payments alongside federal ones.