Selling at a loss or gain to cut tax (tax-loss harvesting)
We harvest a $30,000 loss and use it against gains and income, show how buying back too soon cancels it, and work out how much gain a retired couple can take at 0% in 2026, when the 0% rate on long-term gains runs to $98,900 of taxable income for joint filers.
Realizing losses to offset gains and some income
In a market drop, a couple's $100,000 stock index fund in a taxable account falls to $70,000. Earlier in the year they sold other shares at a $20,000 long-term gain.
- Sell the fund: a $30,000 realized loss.
- The same day, buy a fund tracking a different but similar index, staying invested.
- The loss wipes out the $20,000 gain.
- $3,000 more reduces their ordinary income this year.
- $7,000 carries forward to next year.
In the 15% capital gains and 22% income brackets, that saves about $3,660 of federal tax this year.
The wash-sale rule and how to avoid tripping it
She sells 500 shares of a fund on November 10 at a $12,000 loss.
- Dividends reinvest automatically on December 1, buying 10 shares. That is a wash sale on 10 shares: about $240 of the loss is disallowed and added to their cost.
- Her IRA buys the same fund on November 20: the loss on that many shares is disallowed and can't be added to the IRA's cost, so it is gone.
- She buys a fund tracking a different index instead: the full $12,000 loss counts.
Turn off automatic reinvestment in that fund for the 61-day window around a harvest.
Harvesting gains in the 0% capital gains bracket
A retired couple, both 66, who have not yet claimed Social Security, file jointly. In 2026 they have $60,000 of taxable income after deductions, all from pensions and IRA withdrawals.
- The 0% long-term rate applies up to $98,900 of taxable income.
- Room at 0%: $98,900 − $60,000 = $38,900 of long-term gains.
- They sell fund shares with $38,900 of gain and buy them back the same day: federal tax on the gain, $0.
- Their cost basis rises by $38,900, saving about $5,835 at 15% when they sell later.
Check your state: many tax the gain as ordinary income.
Keeping records of adjusted cost basis
A holding of 1,000 shares bought in three lots:
- 300 shares in 2015 at $40.
- 400 shares in 2020 at $70.
- 300 shares in 2024 at $95.
The price is now $80, and she sells 300 shares for $24,000.
- First in, first out (the usual default): sells the 2015 lot, a $12,000 gain.
- Specific lots, choosing 2024: a $4,500 loss.
Same sale, very different tax. She must name the lots when she sells, not later at tax time.
Check your understanding
Three questions. “Not sure” is a fine answer; every answer shows why.
Question 1 of 3
You have a $10,000 net capital loss this year and no gains. How much can reduce your ordinary income this year?
Question 2 of 3
You sell a fund at a loss and buy the same fund in your IRA two weeks later. What happens to the loss?
Question 3 of 3
Does the wash-sale rule stop you buying back a fund right after selling it at a gain?
Not marked as read yet
Try it with your numbers
Where to go next
Sources
- IRS: Topic 409, Capital gains and losses · checked Oct 12, 2026
- IRS: Publication 550, Investment income and expenses (wash sales) · checked Oct 12, 2026
- IRS: Publication 551, Basis of assets · checked Oct 12, 2026
- IRS: Revenue Ruling 2008-5 (IRA purchases and wash sales), IRB 2008-3 · checked Oct 12, 2026
- IRS: Topic 559, Net investment income tax · checked Oct 12, 2026
- IRS: Instructions for Form 8949 · checked Oct 12, 2026
- IRS: Revenue Procedure 2025-32 (2026 brackets, standard deduction, capital gains, trusts, exclusions) · checked Oct 12, 2026
Educational information, not advice. Figures are dated and sourced; check with a tax or financial professional before acting. Drafted Oct 12, 2026 · human review pending.