To reduce capital gains tax on stocks, hold each position more than a year before selling, use losing positions to cancel out winners, choose which share lots you sell, time sales for years when your other income is low, and route trades through retirement accounts when you can. Short-term profits are taxed at ordinary income rates as high as 37% for 2026, while long-term gains face rates of only 0%, 15%, or 20%.1Internal Revenue Service. IRS Releases Tax Inflation Adjustments for Tax Year 2026 The strategies below can be layered for a larger combined effect.
Hold Each Stock More Than One Year
Federal tax law draws a sharp line at 12 months. Sell a stock you have owned for one year or less and the profit is taxed at your ordinary income rate. Cross the one-year mark and the same profit shifts into the long-term category, where the rate drops sharply.2Office of the Law Revision Counsel. 26 USC 1222 – Other Terms Relating to Capital Gains and Losses
For taxable years beginning in 2026, the long-term rates and income thresholds are:
- 0% on taxable income up to $49,450 (single) or $98,900 (married filing jointly).
- 15% above those thresholds up to $545,500 (single) or $613,700 (married filing jointly).
- 20% on taxable income above the 15% ceiling.3Internal Revenue Service. Revenue Procedure 2025-32
Most investors land in the 15% bracket, which is well below the ordinary rate on wages. A calendar reminder of your purchase dates prevents an accidental sale a few days short of the anniversary.
Offset Gains With Losses
Tax-loss harvesting means selling stocks trading below what you paid and using those losses to cancel out gains elsewhere in your portfolio. A $10,000 profit on one position and a $10,000 loss on another in the same tax year net to zero taxable gain.4Office of the Law Revision Counsel. 26 USC 1211 – Limitation on Capital Losses
If your losses for the year exceed your gains, you can deduct up to $3,000 of the excess against ordinary income, or $1,500 if you file separately from a spouse.5Internal Revenue Service. Topic No. 409, Capital Gains and Losses Anything above that carries forward with no expiration, offsetting gains or ordinary income in future years under the same annual cap.6Office of the Law Revision Counsel. 26 USC 1212 – Capital Loss Carrybacks and Carryovers
Watch the Wash-Sale Rule
If you sell a stock at a loss and buy the same or a substantially identical security within 30 days before or after the sale, the IRS disallows the loss.7Office of the Law Revision Counsel. 26 USC 1091 – Loss From Wash Sales of Stock or Securities The blocked loss is not lost permanently; it is added to the cost basis of the replacement shares, deferring the benefit until you eventually sell those. Dividend reinvestments in the same stock during the window can trigger the rule without you realizing it.
Pick Which Shares You Sell
If you own multiple lots of the same stock bought at different prices, which lot you sell changes your taxable gain. Without instructions, the IRS default is first-in, first-out — the oldest shares go first, and those are often the ones with the largest built-in gain.8Internal Revenue Service. Stocks (Options, Splits, Traders)
Specific identification lets you name the lot you want to sell. Say you bought 100 shares at $30 and another 100 at $50, and the stock now trades at $60. Selling the $50 lot produces $10 per share of gain rather than $30. You must identify the specific shares to your broker before the trade settles; most platforms offer this at the order screen.
Sell When Your Other Income Is Low
Because long-term rates depend on total taxable income, a year of lower income can drop some or all of a gain into a lower bracket, sometimes to 0%. Gap years between jobs, sabbaticals, early retirement before Social Security starts, or a year in school full-time are common windows.
A capital gain stacks on top of your other taxable income, so the 0% bracket does not shelter the whole gain if your income already fills part of it. If a single filer has $40,000 of other taxable income and realizes a $20,000 long-term gain in 2026, only the first $9,450 of that gain fits under the $49,450 ceiling and pays 0%; the remaining $10,550 falls into the 15% bracket.3Internal Revenue Service. Revenue Procedure 2025-32 Run the math before you sell.
Trade Inside Retirement Accounts
Buying and selling stocks inside a retirement account produces no capital gains tax at the time of the trade. In a traditional 401(k) or IRA, gains grow untaxed while inside the account; withdrawals in retirement are taxed as ordinary income.9Office of the Law Revision Counsel. 26 USC 401 – Qualified Pension, Profit-Sharing, and Stock Bonus Plans10Office of the Law Revision Counsel. 26 USC 408 – Individual Retirement Accounts For 2026, you can contribute up to $24,500 to a 401(k) and $7,500 to an IRA, with an extra $8,000 or $1,100 respectively for workers 50 and older.11Internal Revenue Service. 401(k) Limit Increases to $24,500 for 2026, IRA Limit Increases to $7,500
A Roth IRA flips the timing. You contribute after-tax dollars, but qualified withdrawals — including every dollar of investment gain — come out tax-free.12Office of the Law Revision Counsel. 26 USC 408A – Roth IRAs To qualify, the account must be open at least five years and the withdrawal must generally come after age 59½. Roth accounts work especially well for your most aggressive growth positions and for investors who expect a higher tax bracket later.
Donate Appreciated Shares Instead of Cash
Transferring appreciated stock directly to a qualified charity skips the capital gains tax on the entire increase in value since you bought the shares. The charity receives the full market value, and you owe no tax on the built-in gain.13Office of the Law Revision Counsel. 26 USC 170 – Charitable, Etc., Contributions and Gifts
You can also claim a charitable deduction for the fair market value of donated shares, but only if you held them more than a year. Stock held a year or less is deductible only up to your original cost basis. The annual deduction for appreciated stock donated to a public charity is capped at 30% of your adjusted gross income, with any excess carrying forward up to five years.14Internal Revenue Service. Publication 526, Charitable Contributions
Hold Highly Appreciated Stock for the Step-Up
When someone inherits stock, the cost basis resets to the fair market value on the date of the original owner’s death.15Office of the Law Revision Counsel. 26 USC 1014 – Basis of Property Acquired From a Decedent All of the gain built up during the original owner’s lifetime is wiped out for tax purposes. Stock bought at $10 and worth $100 at death gives the heir a $100 basis; an immediate sale at $100 produces zero taxable gain.
That is why planners sometimes suggest keeping deeply appreciated stock rather than selling it late in life. Inherited stock is also automatically treated as long-term regardless of how long the heir holds it, so any later appreciation above the new basis still gets the lower long-term rates.
Defer a Gain Through a Qualified Opportunity Fund
A Qualified Opportunity Fund holds at least 90% of its assets in designated low-income areas called Opportunity Zones. Rolling an eligible capital gain into a QOF within 180 days of realizing it defers the tax on that gain.16Internal Revenue Service. Invest in a Qualified Opportunity Fund The deferred gain becomes taxable no later than December 31, 2026, so the deferral window for gains realized now is short.
Hold the QOF investment at least 10 years and any appreciation on the QOF itself is never taxed. When you sell after that point, your basis adjusts to fair market value.17Internal Revenue Service. Opportunity Zones Frequently Asked Questions The 10-year benefit applies only to the new QOF investment; the original deferred gain is still taxed separately when the deferral period ends.
Account for the 3.8% Surtax and State Tax
Higher-income investors owe an additional 3.8% net investment income tax on the smaller of net investment income or the amount by which modified adjusted gross income exceeds set thresholds.18Office of the Law Revision Counsel. 26 USC 1411 – Imposition of Tax Those thresholds are $250,000 for married joint filers, $200,000 for singles and heads of household, and $125,000 for married filing separately, and they are not indexed for inflation.19Internal Revenue Service. Topic No. 559, Net Investment Income Tax A gain otherwise taxed at 20% effectively costs 23.8% with the surtax. The moves above that lower modified AGI or net investment income — retirement contributions, loss harvesting, timing sales for low-income years — also reduce or eliminate this surtax.
State tax stacks on top of all of this. Most states with an income tax treat capital gains as ordinary income, with top rates ranging from roughly 2% to over 13%; a handful impose no individual income tax at all. State rules on loss deductions, carryforwards, and retirement account treatment vary, so factor your state’s structure into the timing and method of any large sale.