How does tax-loss harvesting work? Offsetting capital gains and $3,000 of ordinary income, carrying losses forward, avoiding the wash sale rule, and "gain harvesting" in the 0% bracket
Tax-loss harvesting means selling investments that are down so the realized loss offsets capital gains, then up to $3,000 of ordinary income a year, with the rest carried forward indefinitely. Don't buy the same security back within 30 days before or after, or it's a wash sale. In a low-income year, the 0% long-term capital gains rate allows "gain harvesting" instead.
- $3,000
- After offsetting capital gains, capital losses offset up to $3,000 of ordinary income a year ($1,500 married filing separately); the rest carries forward indefinitely
- $98,900 / $49,450
- 2026 taxable income limits for the 0% long-term capital gains rate: $98,900 married filing jointly, $49,450 single ($66,200 head of household), the room for gain harvesting
- 61 days
- The wash sale window: the sale date plus 30 days before and after. If you, your spouse or your IRA buys the same or a substantially identical security in that window, the loss is deferred
- December 31
- Gains and losses on publicly traded stock and funds are recognized on the trade date: to count in 2026, trade by December 31, 2026, even if settlement falls in the next year
At a glance
- Harvesting doesn't shrink your loss; it puts the loss to use. Paper losses don't reduce tax until you sell. How you reposition the portfolio is a separate decision; this guide covers tax only.
- Losses are used in order: short-term losses offset short-term gains and long-term losses offset long-term gains, then each other; any net loss offsets $3,000 of ordinary income a year, and the rest carries forward indefinitely.
- Avoid the wash sale rule. If you, your spouse or your IRA buys the same or a substantially identical security within 30 days before or after the sale, the loss is deferred (see our wash sale guide).
- Year-end uses the trade date: a December 31 trade counts this year, but harvesting can happen any time, not just in December.
- In low-income years, flip it with gain harvesting: realize long-term gains inside the 0% bracket; rebuying right away isn't restricted by the wash sale rule, and the higher basis cuts future tax.
How does tax-loss harvesting save tax?
When an investment in a taxable account is down, selling it realizes a loss that offsets gains already realized that year; any excess offsets up to $3,000 of ordinary income a year, and the rest carries forward. How much you save depends on what income the loss offsets and at what rate.
apply from top to bottom.
| Step | Offset | Note |
|---|---|---|
| 1 | Short-term losses against short-term gains; long-term losses against long-term gains | Within each category first |
| 2 | Net loss in one category against net gain in the other | For example, net long-term loss against net short-term gain |
| 3 | Remaining net loss against ordinary income | Up to $3,000 a year ($1,500 separate) |
| 4 | Carry forward what's left | Indefinitely, keeping its short- or long-term character |
- Offsetting short-term gains is worth the most: short-term gains are taxed at ordinary rates of 10%–37%, so using a loss against them saves more than against long-term gains at 0%, 15% or 20%.
- The $3,000 against ordinary income: saves tax at your marginal rate, every year.
- Carryforwards: carried losses offset gains first in later years, then $3,000; figure them each year with the carryover worksheet in the Schedule D instructions. An individual's capital loss carryover can't pass to heirs; whatever isn't used by the final return is lost.
- Taxable accounts only: losses inside an IRA, 401(k) or Roth aren't deductible.
Harvesting and the wash sale rule: when can you buy back?
Under the wash sale rule (Section 1091), if you, your spouse or your IRA buys the same or a substantially identical security within 30 days before or after a loss sale (61 days in all), the loss isn't deductible that year and is added to the new lot's basis. So the key to harvesting is not buying the same security back within 30 days.
- Same stock, same fund: buying back within 30 days is a wash sale.
- Buying back in an IRA: the loss is lost permanently, worse than an ordinary wash sale.
- Dividend reinvestment and automatic purchases: automatic buys within 30 days of the sale can cause a partial wash sale; pause them before harvesting.
- Switching to a different investment: some investors buy a different security (for example, a fund tracking a different index) to stay invested. That's an investment decision; "substantially identical" has no bright-line test and is judged case by case for tax.
- Brokers track only the same account: repurchases in a spouse's account, another broker or an IRA are yours to check (see our wash sale guide).
example of a loss sale on December 15.
| When the same security was bought | Wash sale? | Result |
|---|---|---|
| Between November 15 and December 14 | Yes (within 30 days before) | The matching part of the loss isn't deductible |
| Between December 15 and January 14, 2027 | Yes (within 30 days after) | Loss added to the new basis, used later |
| On or after January 15, 2027 | No | Loss counts in 2026 |
| Bought in an IRA within the window | Yes | Loss can never be used |
When to harvest, and year-end timing
Harvesting can happen any time of year, whenever markets fall; year-end is the last chance to review the year's gains and losses. Gains and losses on publicly traded stock and funds are recognized on the trade date, so a December 31 trade counts this year even if it settles next year.
- Start with gains already realized: year-end capital gain distributions from funds count too, and the numbers often come out only in December.
- Short or long term: a losing position close to its 1-year mark becomes a long-term loss if sold after a year, which changes the offset order; figure both.
- Don't let tax drive investment decisions: tax is one factor alongside trading costs, portfolio changes and the 30-day gap; we analyze the tax side only and don't give investment advice.
- State tax: most states start from federal capital gains, but rates and rules differ, so look at both.
Gain harvesting: realizing gains in the 0% bracket
In a low-income year (just retired, a sabbatical, school, or a transition year around a move to the U.S.), if taxable income is below $98,900 (married filing jointly) or $49,450 (single) for 2026, long-term capital gains inside that range are taxed at 0%. Selling appreciated long-term holdings realizes gain with no federal income tax, and buying them back raises your basis, so future sales show less gain.
- The wash sale rule only covers losses: selling at a gain and rebuying right away is fine.
- Gains stack on top of ordinary income: wages and other ordinary income come first, and long-term gains sit on top; anything above the 0% limit is taxed at 15%.
- Watch the knock-on effects: realized gains raise AGI, which can affect ACA premium tax credits, Medicare premiums (IRMAA), state tax and income-based phase-outs; figure the whole picture first.
- Don't mix it with loss harvesting in the same year: realized losses offset the gains first and waste the 0% room.
hypothetical numbers for a married couple filing jointly with modest wages and pension income in 2026.
| Item | Amount | Note |
|---|---|---|
| Ordinary taxable income (after the standard deduction) | $40,000 | The $32,200 joint standard deduction already taken |
| Room left in the 0% bracket | $58,900 | $98,900 − $40,000 |
| Long-term gain realized | $58,900 | 0% federal income tax |
| Bought back after the sale | Basis raised by $58,900 | Less gain to report on a future sale |
Reporting harvested losses and carryforwards
Each harvested trade is reported as usual on Form 8949 and Schedule D; wash sales are adjusted with code W; carryforwards are figured with the carryover worksheet in the Schedule D instructions and continue year to year. Check the basis and holding periods on your 1099-B first (see our Form 1099-B guide).
Key rules at a glance
| Item | Rule | Number | Applies |
|---|---|---|---|
| Capital losses against ordinary income | Gains first, then ordinary income | $3,000 a year ($1,500 separate) | Ongoing rule |
| Capital loss carryforward | Keeps short- or long-term character | Indefinite | Doesn't pass to heirs at death |
| Wash sale window | Same or substantially identical securities | 61 days | Ongoing rule |
| Year-end deadline | Trade date recognition | December 31 | Tax year 2026 |
| 0% long-term capital gains | Taxable income limit | $98,900 joint / $49,450 single | 2026 |
| 0% long-term capital gains | Head of household | $66,200 | 2026 |
| Short-term gains | Ordinary rates | 10%–37% | 2026 |
| Net investment income tax | MAGI over the threshold | 3.8% (single $200,000 / joint $250,000) | Thresholds not indexed |
Common mistakes
"I can sell a loser and buy it back the next day and still deduct the loss."
Buying the same or a substantially identical security within 30 days before or after is a wash sale and the loss is deferred; buying back in an IRA loses it permanently.
"Only $3,000 of losses count each year; the rest is wasted."
$3,000 is the limit against ordinary income; there's no limit against capital gains, and the rest carries forward indefinitely.
"I can harvest losses in my IRA too."
Trades inside retirement accounts don't create deductible losses; harvesting works only in taxable accounts.
"In a low-income year, investment tax doesn't matter."
That's exactly when gain harvesting in the 0% bracket can help, but check the effect on ACA credits, Medicare premiums and state tax.
Which situation are you in?
First confirm three things: how much capital gain you've realized this year (including fund distributions), whether you have loss carryforwards, and roughly which bracket your taxable income falls in.
- Situation A: you sold winners this year and still hold some losers. Consider realizing losses before year-end to offset the gains, short-term gains first, and don't buy the same security back within 30 days.
- Situation B: no gains this year, but large paper losses. Once realized, they offset $3,000 of ordinary income a year, and the rest waits for future gains.
- Situation C: unusually low income this year (retirement, a sabbatical, a transition year). Figure the room left in the 0% bracket and consider gain harvesting, checking ACA, Medicare and state tax at the same time.
- Situation D: several accounts, a spouse who also trades, or automatic IRA purchases. Check purchases across all accounts before harvesting to avoid cross-account wash sales.
No investment picks, just the tax on every trade worked out
Loss and gain harvesting look simple, but they mean figuring gains, losses, carryforwards, wash sales and brackets together, plus the effect on ACA, Medicare and state tax. We don't sell investment products or give investment advice; we work out the tax result of each approach based on your full-year income.
- Big Four background, 15+ years in U.S. tax, 10 years of U.S.–China cross-border work, CPAs licensed in multiple states, also credentialed as EA and CAA
- Year-end projections: realized gains, usable losses, carryforwards and brackets figured together
- Wash sale checks: purchases by a spouse, in IRAs and at other brokers reviewed together
- Gain harvesting: room in the 0% bracket, with the effect on ACA credits, Medicare premiums and state tax
How it works
- 1
Free assessment
a 15-minute call (yclcpa.com/book) on this year's income, realized gains and prior carryforwards. For a full year-end projection, book a paid in-depth consultation (yclcpa.com/advisory).
- 2
Data
unrealized gains and losses by account, realized trades and expected fund distributions.
- 3
Projections
loss harvesting, gain harvesting or doing nothing, side by side.
- 4
Filing and follow-up
Form 8949, Schedule D, the carryover worksheet and code W adjustments, with carryforwards tracked into next year.
FAQ
How much can tax-loss harvesting offset in a year?
There's no limit against capital gains; any net loss left after that offsets up to $3,000 of ordinary income a year ($1,500 married filing separately), and the rest carries forward indefinitely.
How long after selling a losing stock can I buy it back?
Don't buy the same or a substantially identical security within 30 days after (or 30 days before) the sale, including purchases by your spouse or in your IRA, or it's a wash sale and the loss is deferred.
If I sell on December 31, does it count this year or next?
Gains and losses on publicly traded stock and funds are recognized on the trade date, so a December 31 trade counts this year even though it settles next year.
What is gain harvesting?
In a low-income year, realizing long-term gains inside the 0% bracket (for 2026, taxable income up to $98,900 joint or $49,450 single) and buying back to raise basis. Check the effect on ACA credits, Medicare premiums and state tax too.
Can YCL help?
Yes. We don't give investment advice; we project the tax result of loss or gain harvesting based on your full-year income, check wash sales, and prepare Form 8949 and Schedule D. Start with a free 15-minute call (yclcpa.com/book).
Related guides
- Individuals & FamiliesHow does the wash sale rule work? The 61-day window, other brokers and your spouse, IRA repurchases, RSUs, options, crypto and Form 8949
- Individuals & FamiliesHow are investments taxed? Stocks, funds, interest, real estate and foreign investments, plus 20 legal ways to pay less
- Individuals & FamiliesIRAs from first contribution to final withdrawal: Traditional or Roth, backdoor and mega backdoor Roth, conversions, early withdrawals, RMDs and inherited IRAs
Sources
- IRS: Topic no. 409, Capital gains and losses (irs.gov)
- IRS: Publication 550, Investment Income and Expenses (wash sales, capital loss carryovers)
- IRS: Instructions for Schedule D (Form 1040) (capital loss carryover worksheet); Instructions for Form 8949
- IRS: Rev. Proc. 2025-32 (2026 capital gain brackets and standard deduction)
- Internal Revenue Code §1091 (wash sales), §1211 and §1212 (capital loss limits and carryovers)
- IRS: Rev. Rul. 93-84 (trade-date recognition for publicly traded securities)
Wondering whether loss or gain harvesting makes sense before year-end?
Book a free 15-minute call. A CPA will look at this year's gains, losses and bracket and show the tax result of each approach.
