What Is Tax Gain Harvesting and How Does It Work?

Tax gain harvesting is a strategy where you deliberately sell appreciated long-term investments during a year when your taxable income is low enough to fall inside the 0% federal capital gains bracket, then immediately buy the same shares back to reset your cost basis at the current price. Done right, you pay no federal tax on the realized gain and permanently reduce the taxable profit you’d owe when you eventually sell for real. For 2026, a married couple filing jointly can hold up to $98,900 in taxable income, including long-term gains, without triggering federal capital gains tax.1Internal Revenue Service. Rev. Proc. 2025-32

The 0% Long-Term Capital Gains Bracket

Profits on investments held longer than one year are taxed at 0%, 15%, or 20% depending on your total taxable income.2Internal Revenue Service. Topic No. 409, Capital Gains and Losses The 0% rate is what makes this strategy work. Stay inside it, and the gain you realize is free.

For 2026, the 0% rate applies to taxable income up to:1Internal Revenue Service. Rev. Proc. 2025-32

  • $49,450 for single filers
  • $98,900 for married filing jointly
  • $66,200 for head of household

The relevant figure is taxable income, meaning what’s left after subtracting your standard or itemized deductions. The 2026 standard deduction is $16,100 for single filers and $32,200 for joint filers, and taxpayers 65 or older get additional deductions on top of that, including a new $4,000 senior deduction created by the One Big Beautiful Bill Act that phases out at higher incomes.3Internal Revenue Service. IRS Releases Tax Inflation Adjustments for Tax Year 2026

Finding Your Available Room

Ordinary income fills the bracket first. Wages, pensions, taxable interest, and required minimum distributions all claim space before any capital gains do. Whatever’s left between your taxable ordinary income and the bracket ceiling is your harvest room.

Take a joint-filing couple in 2026 with $40,000 in pension income and no wages. Subtracting the $32,200 standard deduction leaves $7,800 in taxable ordinary income. Against the $98,900 ceiling, they have $91,100 of room to realize long-term gains at 0%. A single filer with $20,000 in ordinary income and the $16,100 standard deduction has $3,900 in taxable ordinary income and $45,550 of room.1Internal Revenue Service. Rev. Proc. 2025-32

Every dollar of gain above that room gets taxed at 15%.2Internal Revenue Service. Topic No. 409, Capital Gains and Losses Estimate conservatively. Overshoot by a dollar and you owe tax on the excess.

One boundary worth naming: the 3.8% Net Investment Income Tax does not apply at these income levels. It only kicks in above $200,000 (single) or $250,000 (joint), well above where gain harvesting lives.4Internal Revenue Service. Net Investment Income Tax

How to Execute the Harvest

Project your taxable income for the year. Add up pensions, part-time wages, interest, dividends, rental income, and any RMDs. Subtract your deductions. The gap between that number and the 0% bracket threshold is your available room.

Pick the right shares. Long-term holdings with the largest unrealized gains give you the most basis reset per dollar of realized gain. If you bought the same security in multiple lots at different prices, use the specific identification method and tell your broker which lot to sell before the trade goes through.5Internal Revenue Service. Publication 551 (12/2025), Basis of Assets Selling a lot bought at $15 generates more gain than selling a lot bought at $35.

Sell up to your limit. If you have $50,000 of room and a stock bought at $20 now trades at $70, each share carries $50 of gain. Selling 1,000 shares realizes exactly $50,000.

Repurchase immediately. Buy back the same number of shares at the current price. Your new basis is $70 per share instead of $20, permanently eliminating $50,000 of future taxable gain on those shares.

Repeat the process in every low-income year. Over a decade of retirement, the compounded basis resets can erase tens of thousands in future tax.

Why the Wash Sale Rule Doesn’t Apply

The wash sale rule blocks investors from claiming a loss when they sell and quickly repurchase the same security. Its statutory text applies only to sales where a loss is claimed.6Office of the Law Revision Counsel. 26 USC 1091 – Loss From Wash Sales of Stock or Securities IRS Publication 550 says the same: you “cannot deduct losses from sales or trades of stock or securities in a wash sale.”7Internal Revenue Service. Publication 550 (2025), Investment Income and Expenses

Gain harvesting involves selling at a profit, so no loss exists and no wash sale can occur. You can sell and repurchase the identical shares on the same day. No 30-day waiting period, no substitute investment.

When Gain Harvesting Is the Wrong Move

Shares You Intend to Leave to Heirs

Assets you own at death pass to your heirs with a cost basis equal to the fair market value on your date of death.8Office of the Law Revision Counsel. 26 U.S. Code 1014 – Basis of Property Acquired From a Decedent This step-up wipes out all unrealized appreciation. Stock bought at $10 and worth $100 at your death gives your heirs a $100 basis, and none of that $90 gain is ever taxed.

Gain harvesting is meant for assets you’ll sell yourself. If you plan to leave highly appreciated shares to your children, the step-up already handles the tax for free. Harvesting those gains creates taxable events, even at 0%, that can spill into other side effects.

Shares You Plan to Donate

Donating appreciated stock directly to charity generally lets you deduct the full fair market value while neither you nor the charity pays capital gains tax. Selling first to harvest, then donating cash, gives up that benefit.

The 0% Rate Doesn’t Mean Zero Cost

A realized gain still counts as income for purposes outside the capital gains calculation itself. It raises your adjusted gross income and modified adjusted gross income, and that can trigger costs larger than the tax you saved.

Medicare IRMAA Surcharges

Medicare Part B and Part D premiums include income-related surcharges based on your MAGI from two years prior. For 2026, the first surcharge tier starts at $109,000 (individual) and $218,000 (joint).9CMS. 2026 Medicare Parts A and B Premiums and Deductibles A large harvest that pushes MAGI over a threshold can raise your Medicare premiums for a full year.

ACA Premium Tax Credits

Early retirees on ACA marketplace coverage are especially exposed. Premium tax credits scale with household income as a percentage of the federal poverty line, and realized capital gains count in that figure. A harvest that raises income too far can shrink or wipe out your subsidy. For tax years after 2025, there is no repayment cap if advance credit payments exceeded your actual credit, and the full difference must be paid back.10Internal Revenue Service. Questions and Answers on the Premium Tax Credit

Social Security Benefit Taxation

The taxable share of Social Security benefits depends on combined income, which includes half your benefit plus other income, capital gains included. Benefits start becoming taxable at $25,000 combined income for single filers and $32,000 for joint filers; up to 85% is taxable above $34,000 and $44,000.11Internal Revenue Service. Publication 915 (2025), Social Security and Equivalent Railroad Retirement Benefits These thresholds are not indexed to inflation, so a meaningful harvest often drags more of your Social Security into taxable territory. Include that added tax in your math before pulling the trigger.

State Taxes Can Still Apply

The 0% federal rate does not extend to state income tax. Most states with an income tax treat capital gains as ordinary income at rates from under 3% to over 13%. About nine states have no income tax at all. A 5% state tax on a $50,000 harvest is $2,500, which may still be worth paying for the basis reset but is not nothing. Check your state’s treatment before you sell.

Reporting the Harvest on Your Return

Zero tax owed does not mean nothing to report. Every sale goes on Form 8949, with totals flowing to Schedule D of Form 1040. Your broker will issue a 1099-B showing proceeds and, for covered securities, cost basis. If the 1099-B basis is wrong, put the correct figure in column (e) of Form 8949 and use the appropriate adjustment code in column (f).12Internal Revenue Service. Instructions for Form 8949

After the repurchase, confirm the broker’s records reflect the new higher basis. Brokers must track basis for covered securities bought after 2011, but for older shares or specific-identification sales, keep your own records. Log the date, the number of shares sold and repurchased, the sale price, and the new basis. Years from now, when you sell those shares for real, clean records are what prove the reset.