If you own individual stocks or ETFs in a regular taxable brokerage account, you may be sitting on a tax trick most investors never touch: you can sell a winning position, pay 0% federal tax on the long-term gain, and buy the exact same share back a minute later. The wash-sale rule cannot stop you. This is called tax-gain harvesting, and it is the mirror image of the loss-harvesting move everyone talks about.
The Move Hiding in Plain Sight
Here is the reveal. The IRS taxes long-term capital gains at three federal rates: 0%, 15%, and 20%. If your taxable income lands inside the 0% band, every dollar of qualified long-term gain you realize is federally tax-free. And because the wash-sale rule under IRC Section 1091 only disallows losses when you buy back the same security inside 30 days, you can turn around and repurchase your winner immediately. Your cost basis resets to the higher price. You just erased future taxable gain without giving up your position.
The Statute That Makes It Legal
Two pieces of the tax code do the heavy lifting. IRC Section 1(h) sets the preferential long-term capital gains rates, including the 0% bracket. IRC Section 1091 is the wash-sale rule, and its text is explicit: it disallows a “loss” on the sale of stock or securities when substantially identical shares are acquired within 30 days before or after. Gains are not mentioned because they do not need to be. The IRS is happy to collect tax on a gain you voluntarily trigger. There is no waiting period, no cooling-off window, no repurchase penalty.
Who Actually Qualifies in 2026
Eligibility is about taxable income, not gross income. For 2026, the 0% long-term capital gains bracket applies when your taxable income (after the standard deduction or itemized deductions) is at or below roughly the IRS-published 2026 thresholds for single, head-of-household, and married-filing-jointly filers. Layer on the 2026 standard deduction of about the 2026 standard deduction for single and joint filers, and a married couple can have gross income well into six figures before the 0% window closes.
Sweet spots include retirees drawing modest income before Social Security or RMDs kick in, semi-retired couples, sabbatical takers, graduate students with brokerage accounts, business owners in a low-income year, and anyone between jobs. If you are a W-2 earner making $150,000, this trick is not for you. Your gains will fall into the 15% or 20% bracket.
How to Run the Play
- Estimate your 2026 taxable income. Include wages, interest, dividends, IRA withdrawals, and any short-term gains. Subtract your standard or itemized deduction.
- Find the gap between that number and the top of the 0% bracket. That gap is exactly how much long-term gain you can realize tax-free at the federal level.
- Identify positions held longer than one year with embedded gains. Short-term gains do not qualify. They are taxed as ordinary income.
- Sell only enough shares to fill the gap. Anything above it spills into the 15% bracket.
- Rebuy the same shares immediately. Your new cost basis equals today’s price. You have permanently reset the taxable gain clock without leaving the market.
The Catch Nobody Warns You About
The realized gain still counts as income for almost every other calculation. It raises your Adjusted Gross Income, which can:
- Trigger or increase taxation of Social Security benefits.
- Shrink or eliminate your ACA premium tax credit.
- Push future Medicare Part B and D premiums up through IRMAA.
- Phase out education credits, the saver’s credit, and student loan interest deductions.
- Create a state tax bill. Most states tax capital gains as ordinary income and do not honor the federal 0% rate.
One more trap: the bracket is a cliff at the margin, not on the whole gain. If you overshoot by $5,000, only that $5,000 gets taxed at 15%. But if you overshoot by a lot, the gain itself can push you across the line, so run the math (or your tax software) before you click sell. With the 10-year Treasury yielding 4.65% and cash finally paying you something, some investors are already rebalancing. If you qualify, reset your basis first. It is the cheapest tax move you own.
Contact [email protected] for any questions or corrections.