Investing
Tax-Loss Harvesting Calculator
A paper loss becomes useful the moment you realise it. Sold, it offsets your capital gains dollar for dollar — short-term first, because those are taxed highest — then up to $3,000 of ordinary income, with anything left carried forward to future years.
Tested against worked examplesHow we verify
The loss on positions you sell.
From positions held a year or less — taxed as ordinary income.
From positions held over a year.
Tax saved this year: $3,310
Tax saved this year
$3,310
By offsetting gains and income with the harvested loss.
Mind the wash-sale rule: buy the same or a substantially identical security within 30 days before or after the sale and the loss is disallowed. Harvesting also lowers your cost basis if you rebuy later, which can mean a larger gain down the line — it defers tax, it does not always erase it.
- Short-term gains offset
- $8,000
- Long-term gains offset
- $5,000
- Ordinary income offset
- $2,000
- Loss carried to next year
- $0
- Tax on gains without harvesting
- $3,310
- Tax after harvesting
- $0
Offset first — taxed at the highest rate.
Capped at $3,000 a year.
Never expires — it waits for future gains.
Compare scenariosTry three values of one input
| Realized losses | |||
|---|---|---|---|
| Tax saved this year | $3,310 | $3,310 | $3,310 |
| Ordinary income offset | $500 | $2,000+$1,500 | $3,000+$2,500 |
| Loss carried to next year | $0 | $0 | $500+$500 |
Every other input stays at the value you set above — currently $15,000 for realized losses. Differences are measured against the first column.
Saved scenariosSave this calculation
Saved in this browser only — no account, and nothing is sent to us. Clearing your browser data deletes them.
How this calculator works
Losses are applied in the order that saves the most: against short-term gains first, since those are taxed as ordinary income, then long-term gains, then up to $3,000 of ordinary income. Anything left carries forward. Tax saved is the difference between the tax on gains with no harvesting and the tax after offsets, with the ordinary-income offset valued at your ordinary rate.
Flat rates stand in for progressive brackets, and the 3.8% net investment income tax and state tax are not modelled — both would increase the saving shown. The wash-sale rule is not enforced by the maths; it is on you to avoid it. This estimates one year's benefit, not the lifetime effect of a lower cost basis.
What this assumes
- The wash-sale rule disallows the loss if you buy the same or a substantially identical security within 30 days before or after — the window runs in both directions and includes your IRA and a spouse's accounts.
- Losses offset gains first, then up to $3,000 of ordinary income a year, with the remainder carried forward indefinitely.
- Harvesting lowers your cost basis, so part of the benefit is deferral rather than elimination.
What changes this number
- The 30-day window
- Both directions, which is the part most often missed and the one that invalidates the loss.
- Your marginal rate
- Determines what the deduction is worth, so harvesting is more valuable in a high-income year.
- Basis reduction
- Future gains are larger. The benefit is real but smaller than the headline deduction suggests.
A worked example
Take the $15k loss against mixed gains scenario. These figures are produced by the calculator above, not written alongside it, so they always match what the tool returns.
What you enter
- Realized losses
- $15,000
- Short-term gains
- $8,000
- Long-term gains
- $5,000
What it returns
- Tax saved this year
- $3,310
- Short-term gains offset
- $8,000
- Long-term gains offset
- $5,000
- Ordinary income offset
- $2,000
- Loss carried to next year
- $0
Mind the wash-sale rule: buy the same or a substantially identical security within 30 days before or after the sale and the loss is disallowed. Harvesting also lowers your cost basis if you rebuy later, which can mean a larger gain down the line — it defers tax, it does not always erase it.
Try an example
Frequently asked questions
What is tax-loss harvesting?
Selling an investment that has fallen to realise the loss, then using it to offset capital gains and up to $3,000 of ordinary income. You typically reinvest in something similar but not identical to stay in the market, turning a paper loss into a real tax saving.
What is the wash-sale rule?
If you buy the same or a substantially identical security within 30 days before or after selling at a loss, the IRS disallows the loss. It applies across all your accounts, including an IRA and a spouse's accounts. The usual workaround is to buy a similar fund tracking a different index.
How much can I deduct against income?
Up to $3,000 of net capital loss against ordinary income per year — $1,500 if married filing separately. Losses first offset all your capital gains without limit; only the leftover applies to income, and only up to that cap. The rest carries forward indefinitely.
Do losses expire?
No. Unused capital losses carry forward to future tax years with no expiration, offsetting gains and up to $3,000 of income each year until exhausted. A large loss in a bad market can shelter gains for many years afterward.
Is tax-loss harvesting always worth it?
Not always. It lowers your cost basis, so rebuying means a larger future gain — you are deferring tax, not always eliminating it. It is most valuable when you offset short-term gains taxed at high rates, when you will be in a lower bracket later, or when the deferred tax can compound in the meantime.
Related calculators
Capital Gains Tax Calculator
Estimate the tax on an investment sale and what you keep — and compare the long-term rate against the far higher one that applies if you sell too soon.
ESPP Calculator
Calculate what an employee stock purchase plan actually returns — the discount, the lookback provision, and the annualised return if you sell at purchase.
Stock Average Calculator
Averaging down on a stock? Enter two purchases to see your new average cost per share, total shares, and total invested — your blended cost basis.
Investment Loss Recovery Calculator
After a loss, how much gain do you need to break even? See why a 50% loss requires a 100% gain — the math that makes big losses so hard to recover.
Disclaimer: DayCents provides this calculator for educational purposes only. Results are estimates based on your inputs and the stated assumptions — they are not financial advice, a quote, or an offer of credit. Consult a qualified financial professional before making major money decisions.