Tax-Loss Harvesting Calculator
See which positions to harvest, how much tax you'd save, and how much loss carries forward.
How this is calculated
Each position's gain or loss is its current value minus its cost basis. Losses are taxed at your short-term (ordinary income) rate if held a year or less, or your long-term capital gains rate if held longer — so an identical dollar loss can be worth more or less depending on the holding period.
Harvested losses first offset any capital gains you realised elsewhere this year, dollar for dollar. Anything left over can offset up to $3,000 of ordinary income under IRS rules. Any remaining loss beyond that carries forward indefinitely to future tax years.
Frequently asked questions
- What is tax-loss harvesting?
- Selling an investment that has lost value to realise (or "harvest") the loss for tax purposes, which can offset capital gains elsewhere in your portfolio or a limited amount of ordinary income — while you can reinvest the proceeds in a similar, but not "substantially identical", asset.
- What is the wash-sale rule?
- The IRS disallows a tax loss if you buy the same or a "substantially identical" security within 30 days before or after the sale — a 61-day window in total. Buying back too soon means the loss is disallowed and added to the cost basis of the new position instead.
- What is the $3,000 ordinary income offset?
- After using losses to offset any capital gains you realised this year, up to $3,000 of remaining net loss ($1,500 if married filing separately) can be deducted against ordinary income like wages. Any loss beyond that carries forward to future years.
- What is a loss carryforward?
- Losses that exceed what you can use against gains and the $3,000 ordinary income limit this year are not wasted — they carry forward indefinitely, available to offset gains or ordinary income in future tax years.
- What is the difference between short-term and long-term holdings?
- A position held one year or less is short-term and taxed at your ordinary income rate. Held over one year, it is long-term and taxed at the (usually lower) long-term capital gains rate. This affects how much a given loss is actually worth in tax savings.
- When should I harvest a loss?
- Common triggers are: year-end tax planning, offsetting a large realised gain elsewhere, or when a position has fallen enough that the tax benefit outweighs the cost and hassle of trading. Very small losses (under a few hundred dollars) are often not worth the transaction friction.
- Does harvesting a loss defer or eliminate tax?
- It generally defers tax rather than eliminating it — when you reinvest the proceeds, the new position typically has a lower cost basis (if you buy a similar but non-identical asset) or the same basis is reset. The benefit is timing: you get the tax deduction now and can compound the tax savings in the meantime.
- Can I use this in my own app?
- Yes — every calculator on Stupidly Clever has a matching REST API and MCP tool that runs the same underlying logic.