TL;DR

A tax loss harvesting calculator estimates your savings as harvested losses times your marginal rate, capped by the $3,000 yearly ordinary income deduction, with the rest carried forward; at a 24% federal rate, harvesting $8,000 of short-term losses saves about $1,920.

Key Takeaways

  • 1.Realized losses offset capital gains dollar for dollar, short-term against short-term first, then long-term.
  • 2.If losses exceed gains, you can deduct up to $3,000 per year against ordinary income ($1,500 if married filing separately) and carry the rest forward.
  • 3.The wash sale rule blocks the loss if you buy the same or a substantially identical security within 30 days before or after the sale, a 61-day window.
  • 4.Harvesting defers tax rather than erasing it, because the lower cost basis raises your future gain.
  • 5.A calculator needs five inputs: realized gains, realized losses, holding period, marginal rate, and state rate.

A tax loss harvesting calculator estimates how much tax you save by selling losing positions to offset realized gains. Savings equal harvested losses multiplied by your marginal tax rate, limited by the $3,000 annual deduction against ordinary income. Unused losses carry forward to future years with no expiration.

Most online calculators stop at that headline number. This guide walks through the actual math, shows two worked examples you can reproduce on paper, and explains the rules that quietly cancel a harvest, especially the wash sale rule. We built the examples from the published tax rules rather than from an invented trading test, so every figure can be checked against IRS guidance. This is education, not tax advice, so confirm your numbers with a tax professional.

How does a tax loss harvesting calculator work?

A tax loss harvesting calculator nets your realized gains against your realized losses, applies your tax rate to the overlap, and adds the value of any leftover loss up to the $3,000 ordinary income deduction. It then shows the carryforward. The output is an estimate of this year's tax reduction, not a guaranteed refund.

Under the rules in IRC Section 1211(b), the netting follows a fixed order. Short-term losses first offset short-term gains, and long-term losses first offset long-term gains. Any net loss in one bucket then offsets a net gain in the other. Because short-term gains are taxed at ordinary rates from 10% to 37%, while long-term gains are taxed at 0%, 15%, or 20%, a dollar of short-term loss usually saves more than a dollar of long-term loss.

InputWhat it meansWhere to find it
Realized short-term gainsProfits on positions held one year or lessBroker 1099-B, or year-to-date realized P&L
Realized long-term gainsProfits on positions held more than one yearBroker 1099-B
Unrealized lossesPaper losses you could still harvestYour open positions
Marginal federal rateThe bracket your next dollar falls intoLast year's return
State rateYour state's rate on capital gainsState tax table

Add the net investment income tax (NIIT) of 3.8% if your modified adjusted gross income exceeds the statutory thresholds, which are $200,000 for single filers and $250,000 for joint filers and are not indexed for inflation. A good calculator lets you toggle it. A basic one ignores it and understates your savings.

The calculator's core formula is simple: tax saved equals offsettable losses times your combined marginal rate, and it only looks complicated because of the netting order.

What does a real harvesting example look like?

Suppose you have $12,000 in realized short-term gains and $5,000 in long-term gains this year, and you sell positions at an $8,000 short-term loss. At a 24% federal rate and 5% state rate, those losses cut your short-term gain from $12,000 to $4,000 and save about $2,320.

LineBefore harvestingAfter harvesting
Short-term gains$12,000$12,000
Harvested short-term loss$0-$8,000
Net short-term gain$12,000$4,000
Federal tax at 24%$2,880$960
State tax at 5%$600$200
Total saved-$2,320

Now the bigger-loss case. Say you have $5,000 in gains and harvest $20,000 in losses. Your net loss is $15,000. You use $5,000 to wipe out the gains and $3,000 as an ordinary income deduction, which at 24% saves roughly $1,920 this year. The remaining $12,000 carries forward to next year, where it can offset new gains or take another $3,000 deduction.

Savings are a deferral

Selling at a loss lowers your cost basis in the replacement position. When you eventually sell it, the gain is larger by roughly the harvested amount. Harvesting pays off mainly through time value, a lower bracket later, or a step-up in basis at death.

In the $20,000 loss example above, the immediate federal saving is about $1,920 while $12,000 of losses remain available for future years.

What inputs should you check before trusting the result?

Check four things: whether the calculator separates short-term from long-term, whether it applies the $3,000 cap, whether it models the wash sale rule, and whether it includes state tax and NIIT. If any of these is missing, the result can be off by hundreds of dollars on an ordinary-sized portfolio.

  • Separates short-term and long-term gains and losses
  • Applies the $3,000 ($1,500 married filing separately) annual cap
  • Shows the carryforward balance for next year
  • Lets you enter a state rate or choose a state
  • Includes an optional 3.8% NIIT toggle
  • Warns about the 30-day wash sale window

Also confirm the data source. Pulling numbers from your broker's realized gain and loss report is safer than typing from memory, because brokers track adjusted cost basis, including prior wash sale adjustments. Fidelity, Schwab, and Interactive Brokers all publish realized P&L reports that match what lands on Form 1099-B.

Finally, run the calculation twice: once for this year and once assuming you carry losses forward. If you expect to be in a higher bracket next year, holding some losses back can be the better call.

A calculator that ignores the wash sale rule can overstate your savings to the full harvested amount even when the IRS would disallow the loss.

How does the wash sale rule change the math?

The wash sale rule disallows a loss if you buy the same or a substantially identical security within 30 days before or after the sale. That creates a 61-day window centered on the sale date. The disallowed loss is not gone, but it is added to the basis of the new shares, which defers the benefit.

The rule comes from IRC Section 1091 and applies across all your accounts, including IRAs and your spouse's accounts. That last point catches people out. If you sell a stock at a loss in a taxable account and your IRA auto-buys the same stock through a dividend reinvestment plan, the loss can be disallowed, and a loss disallowed through an IRA purchase generally is not recovered in basis at all.

A clean harvest in five steps

  1. 1

    List positions at a loss

    Pull unrealized losses from your broker and sort by size and holding period.

  2. 2

    Check the 61-day window

    Look 30 days back and 30 days forward for purchases of the same security in any account, including IRAs and DRIPs.

  3. 3

    Pick a replacement

    Choose a similar but not substantially identical holding, such as a different index fund tracking another index, to keep market exposure.

  4. 4

    Sell and record

    Execute the sale, then save the confirmation with the date, proceeds, and basis.

  5. 5

    Report on Form 8949

    Carry totals to Schedule D. Your broker's 1099-B will list wash sale adjustments in the adjustment column.

What counts as substantially identical is not defined precisely in the code, so two different S&P 500 funds from different issuers occupy a gray area, while swapping an S&P 500 fund for a total market fund is more commonly treated as safe. Ask a tax professional about close calls.

Because the window runs 30 days on both sides of the sale, a harvest only holds if you avoid buying the same security for a total of 61 days.

Do active traders harvest losses differently?

Active traders harvest differently because frequent trading makes wash sales common and the $3,000 cap more binding. Traders who qualify for trader tax status can elect mark-to-market accounting under Section 475(f), which exempts them from the wash sale rule and the $3,000 cap but converts all gains and losses to ordinary income.

The election has strict timing. For an existing individual taxpayer, it generally must be made by the original due date of the prior year's return, typically April 15, and it applies to all future years until revoked. Qualifying for trader status depends on facts and circumstances such as trading frequency, holding periods, and time spent, so it is not something to claim casually.

FeatureInvestor treatmentTrader with 475(f) election
Wash sale ruleAppliesDoes not apply
$3,000 annual loss capAppliesDoes not apply to trading losses
Gain and loss characterCapitalOrdinary
Lower long-term ratesAvailableNot available
TimingAny timeElection due by prior year's return deadline

Crypto sits in a separate bucket. As of our last check, the wash sale rule has not been applied to digital assets under the statute, because they are treated as property rather than securities, but proposed legislation has surfaced repeatedly, so verify the current rule before you rely on it.

Track it in a journal

Log the sale date and the 30-day restriction date in your trading journal or spreadsheet so you don't repurchase early by accident.

The Section 475(f) election removes both the wash sale rule and the $3,000 loss cap, but it also makes every gain ordinary income, so it only helps traders who expect net losses or frequent wash sales.

When is tax loss harvesting not worth it?

Harvesting is not worth it when your gains are small, your bracket is already 0%, or the trading costs and tracking burden exceed the saving. Taxpayers in the 0% long-term bracket can often realize gains tax-free, so harvesting losses against those gains wastes the loss.

It also loses value if you will land in a higher bracket later. A loss used today at 24% could have been worth 32% or 35% in a future high-income year. Last, harvesting small losses can create messy basis records. If a $400 saving takes two hours of paperwork and a wash sale mistake, you may lose money on the exercise.

Another case where harvesting backfires is the replacement trade itself. If you sell a fund at a loss and buy something that behaves differently, you take on tracking error. Over a few months that gap can be larger than the tax saving, especially in a sharp rally where the sold position bounces back and your substitute lags. Pick a replacement that matches the sector, size, and style closely without being the same security.

Account type matters as well. Losses in a 401(k), IRA, or HSA have no tax value because those accounts are not taxed on trades. Only taxable brokerage accounts qualify, so a calculator should be fed numbers from that account alone. Mixing retirement and taxable balances is the most common input error we see in simple online tools.

Finally, think about your estate and giving plans. Appreciated shares that you donate to charity or pass on at death can avoid the capital gain altogether, which changes whether you want a lower basis in the first place. Harvesting trades a lower basis today for a deduction today, and that is only a good deal when you expect to realize the eventual gain in a lower bracket or never at all.

Pros

  • Offsets gains dollar for dollar
  • Up to $3,000 a year reduces ordinary income
  • Unused losses carry forward indefinitely
  • Pairs well with rebalancing

Cons

  • Defers tax rather than eliminating it
  • Wash sale rule can disallow the loss
  • Requires careful record keeping
  • Little value in a 0% bracket

Harvesting works best when you have meaningful realized gains, a marginal rate of 24% or higher, and a clean replacement holding.

The verdict

Use a tax loss harvesting calculator to estimate savings before you sell, but trust it only if it separates short-term from long-term, applies the $3,000 cap, and flags wash sales. Then confirm the final numbers against your broker's 1099-B and a tax professional.

The workflow is short. Pull your realized gains. List your unrealized losses. Run the calculator for this year and a carryforward scenario. Check the 61-day window across every account you and your spouse own. Sell, record, and file on Form 8949. Do it once or twice a year, usually in the fourth quarter, rather than reacting to every dip.

The calculator is only a planning tool. Treat its output as an estimate, review your actual cost basis, and keep records for at least three years after filing.

Harvesting an $8,000 short-term loss at a 24% federal rate saves about $1,920 in federal tax, which is the kind of concrete number a calculator should show you before you place the sale.

Get smarter trades, weekly

One short email every Sunday. AI workflows, tool reviews, and trader productivity tips.