What Is Tax Gain Harvesting and How Does It Work?

Tax gain harvesting is a strategy where you deliberately sell appreciated investments in a year your income is low enough to fall inside the 0% long-term capital gains bracket, then immediately repurchase the same shares to reset your cost basis higher. For 2026, a married couple filing jointly can have up to $98,900 in taxable income, including long-term gains, without owing any federal capital gains tax.1Internal Revenue Service. Rev. Proc. 2025-32 The repurchase locks in that higher basis, permanently shrinking the taxable gain you’ll face whenever you sell for real.

How the 0% Bracket Sets Your Available Room

Long-term capital gains, meaning profits on investments held more than a year, are taxed at 0%, 15%, or 20% depending on total taxable income.2Internal Revenue Service. Topic No. 409, Capital Gains and Losses The 0% band is what makes this strategy work. Stay inside it and you pay nothing on the gain you realize, while still walking away with a stepped-up basis on the shares you bought back.

For the 2026 tax year, 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 couples filing jointly
  • $66,200 for heads of household

The figure that matters is taxable income, not gross income. Taxable income is what remains after you subtract the standard deduction or your itemized deductions. For 2026, the standard deduction is $16,100 for single filers and $32,200 for joint filers.3Internal Revenue Service. IRS Releases Tax Inflation Adjustments for Tax Year 2026 That deduction carves out a large slice of income before you even begin filling the 0% band.

Extra Deduction Room for Age 65 and Older

Retirees, the most common users of this strategy, get additional room. Taxpayers 65 and older receive an extra standard deduction of $2,050 (single) or $1,650 per qualifying spouse (joint). Beginning in 2026, the One Big Beautiful Bill Act also created a separate $4,000 senior deduction available to taxpayers 65 and older whether or not they itemize, though it phases out at higher incomes.3Internal Revenue Service. IRS Releases Tax Inflation Adjustments for Tax Year 2026 These widen the gap between gross and taxable income, leaving more room to harvest.

Working Out Your Available Room

Ordinary income fills the bracket first. Wages, pensions, taxable interest, and required minimum distributions all claim space before any capital gains get their turn. Whatever ceiling is left is what you have to work with.

Take a married couple in 2026 with $40,000 of pension income and no wages. Subtracting the $32,200 standard deduction leaves $7,800 of 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 of ordinary income and the $16,100 standard deduction has $3,900 of taxable ordinary income, so $45,550 of room remains.1Internal Revenue Service. Rev. Proc. 2025-32

Any gain past that room is taxed at 15%.2Internal Revenue Service. Topic No. 409, Capital Gains and Losses Overshooting by even a dollar means tax on the excess, so a conservative estimate beats precision here.

Executing the Harvest

The mechanics are simple. The room calculation is where errors happen.

Estimate your taxable income for the year. Project all ordinary income: pensions, part-time wages, interest, rental income, required minimum distributions. Subtract deductions. The gap between the result and the 0% ceiling is your available room.

Pick the right lots. Long-term holdings with the largest unrealized gain give you the most basis reset per dollar of gain realized. If you bought the same stock at different prices, use the specific identification method to choose which lot you’re selling.4Internal Revenue Service. Publication 551 (12/2025), Basis of Assets Selling shares bought at $15 generates more gain per share than selling shares bought at $35. Tell your broker which lot before the trade executes.

Sell enough to fill, but not exceed, your room. 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 market. Your basis is now $70 instead of $20, permanently erasing $50,000 of future taxable gain.

Do this every year your income is low. Each harvest chips away at the embedded gains in your portfolio, and the cumulative effect over a decade of retirement can save tens of thousands.

The Wash Sale Rule Does Not Apply

Anyone who has read about tax loss harvesting sometimes worries that repurchasing the same security will trigger the wash sale rule. It won’t. The statute is specific: the rule applies only to sales where a loss is claimed.5Office of the Law Revision Counsel. 26 USC 1091 – Loss From Wash Sales of Stock or Securities Publication 550 says the same thing: you “cannot deduct losses from sales or trades of stock or securities in a wash sale.”6Internal Revenue Service. Publication 550 (2025), Investment Income and Expenses No loss, no wash sale.

Because gain harvesting sells at a profit, you can sell and rebuy the identical shares the same day. No 30-day waiting period, no substitute security required.

When Harvesting Gains Backfires

The strategy has real limits. If you’re likely to hold an investment until death, harvesting can leave you worse off than doing nothing.

Stepped-Up Basis at Death

When you die, your heirs take the asset with a cost basis equal to fair market value on your date of death.7Office of the Law Revision Counsel. 26 U.S. Code 1014 – Basis of Property Acquired From a Decedent That step-up erases every dollar of unrealized appreciation from your lifetime. Stock bought at $10 that’s worth $100 at your death passes with a $100 basis and zero capital gains tax on the appreciation.

Gain harvesting is meant for assets you plan to sell yourself. If highly appreciated shares are earmarked for your children, the step-up already wipes out the future tax at no cost, and harvesting only creates taxable events that could push you across other thresholds.

Stock You Plan to Donate

If you plan to give appreciated stock to charity, you generally get a deduction for full fair market value and neither you nor the charity pays capital gains tax. Selling to harvest first, then donating cash, forfeits that advantage.

Realized Gains Can Trigger Other Costs

Here is where the strategy gets tricky. Even when the gain itself is taxed at 0%, the amount still counts as income for other purposes. It raises adjusted gross income and modified adjusted gross income, which can pull other costs along with it.

Medicare IRMAA Surcharges

Medicare Part B and Part D premiums carry income-related surcharges based on MAGI from two years earlier. For 2026, the first tier hits at $109,000 for individual filers and $218,000 for joint filers.8CMS. 2026 Medicare Parts A and B Premiums and Deductibles A large harvest that pushes MAGI over a threshold can add hundreds of dollars per month to Medicare premiums for a full year. Run those numbers before a big sale.

ACA Premium Tax Credits

Early retirees buying insurance through the marketplace are especially exposed. The premium tax credit depends on household income against the federal poverty line, and realized capital gains are counted. A harvest that lifts income too high can shrink or eliminate the subsidy. For tax years after 2025, there is no repayment cap on excess advance credit payments, so any overpayment must be returned in full.9Internal Revenue Service. Questions and Answers on the Premium Tax Credit

Social Security Benefit Taxation

If you draw Social Security, the taxable share of your benefit depends on combined income, which is half of your benefit plus other income including capital gains. For single filers, benefits start being taxable at $25,000 of combined income, and up to 85% is taxable above $34,000. For joint filers the thresholds are $32,000 and $44,000.10Internal Revenue Service. Publication 915 (2025), Social Security and Equivalent Railroad Retirement Benefits Those thresholds have never been indexed to inflation, so a meaningful harvest usually pulls more of the benefit into taxable territory. Add that extra tax to your calculation of whether the harvest actually saves money.

State Income Tax

The 0% federal bracket does not mean zero state tax. Most states with an income tax treat capital gains as ordinary income, and rates range from under 3% to over 13%. A handful have no income tax at all. Check your state before selling. 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 zero.

Reporting the Sale

Even when the tax is zero, you still have to report every sale. Realized gains go on Form 8949, with totals flowing onto Schedule D of Form 1040. Your broker will send a 1099-B with the proceeds and, for covered securities, the cost basis. If the 1099-B shows a wrong basis, enter the correct basis in column (e) of Form 8949 and note the adjustment with the right code in column (f).11Internal Revenue Service. Instructions for Form 8949

After repurchasing, confirm your broker’s records show the new, higher basis. Brokers must track and report basis on covered securities acquired after 2011. If you hold older shares or use specific identification, keep your own records: date, number of shares sold and repurchased, sale price, and the new basis. When you eventually sell for real, clean records are what protect the reset you paid nothing to get.