Tax Loss Harvesting Calculator
Understand How Tax Loss Harvesting Works
Tax loss harvesting is the practice of selling investments that are currently below your purchase price so the loss becomes real for tax purposes. In a taxable brokerage account, that realized loss can reduce capital gains you have already taken during the year. If your losses are larger than your gains, U.S. federal rules generally allow up to $3,000 of the remaining net capital loss to reduce ordinary income, with any unused amount carried forward to future tax years. This calculator is designed to give you a quick estimate of that immediate benefit. It does not replace tax advice, but it can help you see whether harvesting a loss may be meaningful before you place a trade.
The tool separates short-term and long-term amounts because the tax treatment is different. Short-term gains usually come from assets held for one year or less and are commonly taxed at your ordinary income rate. Long-term gains usually come from assets held for more than one year and often receive a lower capital gains rate. Because losses are first matched against gains of the same type, the mix of your gains and losses matters. A portfolio with mostly short-term gains may produce a different tax result than one with mostly long-term gains, even if the total dollar amounts are the same.
This page keeps the calculation intentionally practical. You enter your realized short-term gains, realized long-term gains, the short-term losses you may harvest, the long-term losses you may harvest, and the tax rates you want to use for each category. The calculator then applies the losses in a common order: first against gains of the same type, then across categories if one side still has a remaining loss and the other still has a remaining gain, and finally against ordinary income up to the annual limit. The result area summarizes estimated tax savings, how much loss was used this year, and how much may remain available as a carryforward.
Introduction
Investors often focus on returns before taxes, but after-tax results are what ultimately matter. A losing position can feel frustrating, yet it may create a planning opportunity. If you already have realized gains elsewhere in your account, harvesting a loss can reduce the tax due on those gains. Even when you do not have enough gains to absorb the full loss, part of the excess may still help by reducing ordinary income. That is why tax loss harvesting is often discussed during volatile markets, year-end portfolio reviews, and rebalancing decisions.
Still, harvesting is not simply a matter of selling anything that is down. The tax value depends on the type of gain being offset, the tax rates involved, and whether you can avoid a wash sale. It also depends on your broader investment plan. Selling a fund or stock for tax reasons may change your portfolio exposure, so many investors pair the tax decision with a replacement investment that is similar enough to preserve strategy but not so similar that it creates a wash sale problem. This calculator focuses on the tax side of that decision so you can estimate the immediate effect in dollars.
The estimate is especially useful when comparing scenarios. You might ask whether harvesting only one losing position is enough, whether harvesting both short-term and long-term losses changes the result materially, or whether the benefit is mostly coming from offsetting gains versus using the $3,000 ordinary income deduction. By changing the inputs and recalculating, you can quickly see how sensitive the outcome is to your assumptions.
How to Use
Start by gathering the amounts you want to test. Short-term gains should include gains already realized on assets held one year or less. Long-term gains should include gains already realized on assets held more than one year. For losses, enter the amounts you expect to realize if you sell the positions you are considering harvesting. Use positive numbers in every field; the calculator handles the loss logic internally, so you do not need to type negative signs.
Next, enter your tax rates. The ordinary tax rate field is used for short-term gains and for the portion of any net capital loss that offsets ordinary income. The long-term capital gains rate field is used for long-term gains. If you want a rough combined federal-and-state estimate, some users choose rates that reflect their blended burden, but remember that state rules can differ from federal rules. The result updates as you type, and the Calculate button is available for keyboard users who prefer an explicit submit action.
After calculation, read the result table from top to bottom. Estimated tax savings shows the current-year reduction in tax under the assumptions entered. Loss available to carry forward shows any remaining unused loss after gains are offset and after up to $3,000 is applied to ordinary income. The gain-offset rows show how much current-year gain was neutralized at short-term and long-term tax rates. Ordinary income offset this year shows the amount of net capital loss, if any, applied against ordinary income under the annual cap.
If you are comparing several strategies, run the calculator more than once. For example, you can test harvesting only short-term losses, then only long-term losses, then both together. That side-by-side approach often reveals whether the tax benefit is large enough to justify transaction costs, bid-ask spreads, record keeping, and any temporary change in portfolio exposure.
Formula
The calculator follows a simple tax-ordering framework. First, short-term losses offset short-term gains, and long-term losses offset long-term gains. If one category still has unused losses while the other category still has gains, the remaining losses cross over to offset those gains. After all gains are reduced as much as possible, any leftover net capital loss may offset ordinary income up to $3,000 for the year. Any amount beyond that is treated as a carryforward for future years.
The central equation underpinning the calculator aggregates these interactions. In MathML form, the tax savings are expressed as . Here, S is estimated tax savings, Ls is the amount of loss that offsets income taxed at the short-term or ordinary rate, rs is that rate, Ll is the amount of loss that offsets long-term gains, rl is the long-term capital gains rate, and C is the portion of any remaining net loss used against ordinary income, subject to the annual limit.
In practical terms, the calculator compares tax on current gains before harvesting with tax on remaining gains after harvesting, then adds the value of any allowable ordinary income offset. Because the tool is designed for planning, it does not attempt to model every line of a tax return, phaseout, surtax, or state-specific adjustment.
| Step | Description |
|---|---|
| 1 | Subtract long-term losses from long-term gains |
| 2 | Subtract short-term losses from short-term gains |
| 3 | If one category has net loss and the other net gain, offset the gain |
| 4 | Apply remaining net loss, if any, to ordinary income up to $3,000 |
| 5 | Carry forward any unused loss to future years |
Example
Suppose you realized $4,000 of short-term gains and $6,000 of long-term gains earlier in the year. You are considering selling positions that would create $5,000 of short-term losses and $8,000 of long-term losses. You estimate your ordinary tax rate at 24% and your long-term capital gains rate at 15%.
First, the calculator applies $5,000 of short-term losses against the $4,000 of short-term gains. That eliminates the short-term gain entirely and leaves $1,000 of short-term loss still available. Next, it applies $8,000 of long-term losses against the $6,000 of long-term gains. That eliminates the long-term gain and leaves $2,000 of long-term loss still available. At that point, there are no gains left to offset, so the remaining $3,000 of net capital loss can be used against ordinary income this year. Because that amount matches the annual cap, there is no carryforward in this example.
The tax savings come from three places. Eliminating the $4,000 short-term gain saves tax at 24%, or $960. Eliminating the $6,000 long-term gain saves tax at 15%, or $900. Using $3,000 of net capital loss against ordinary income saves another $720 at the 24% rate. Added together, the estimated current-year tax savings are $2,580. This example shows why the same dollar loss can have different value depending on what kind of income it offsets.
You can also use the calculator for smaller or partial harvesting decisions. If you only harvested enough loss to offset the long-term gains, your savings would be lower, but you might preserve more of your portfolio positions. If you harvested more than enough to offset all gains, the extra benefit would usually be limited by the $3,000 ordinary income cap in the current year, with the rest pushed into future years as a carryforward.
Limitations and Assumptions
This calculator is a planning tool, not a tax filing engine. It assumes the losses you enter are valid realized capital losses and that they are not disallowed by the wash sale rule. Under the wash sale rule, a loss is generally disallowed if you buy the same or a substantially identical security within 30 days before or after the sale. If that happens, the current-year tax benefit may disappear or be deferred through basis adjustments. Because the calculator cannot inspect your trade history, it assumes you have already considered this issue.
The tool also uses a simplified rate structure. Real tax returns can involve multiple brackets, the net investment income tax, state income taxes, special treatment for collectibles or qualified small business stock, and interactions with deductions or credits. The calculator does not model those details. It also does not estimate the future tax cost of a lower basis in a replacement investment. In many cases, tax loss harvesting defers tax rather than permanently eliminating it, although that deferral can still be valuable because of the time value of money.
Another limitation is that the calculator does not judge whether harvesting is a good investment decision. Selling a position may create transaction costs, move you away from your target allocation, or expose you to market timing risk while you wait to avoid a wash sale. Some investors solve that by buying a similar but not substantially identical replacement asset, but whether that is appropriate depends on your strategy. Use the result as one input in a broader decision, not as the only reason to trade.
Finally, remember that carryforwards matter. A large harvested loss may not produce a large immediate tax reduction if you do not have enough gains this year and can only use $3,000 against ordinary income. In that case, the unused amount may still be valuable later, but the benefit is spread across future years. The calculator shows that carryforward explicitly so you can distinguish between current-year savings and deferred tax value.
Practical Interpretation
When you review the output, think of it as an estimate of this yearโs tax impact under your assumptions. A high savings figure usually means your harvested losses are offsetting gains taxed at meaningful rates right now. A low savings figure may mean you have few gains to offset, your rates are modest, or much of the loss is being pushed into carryforward status. Neither result is automatically good or bad; it simply tells you how much immediate tax relief the proposed trades may create.
For many investors, the most useful question is not โCan I harvest a loss?โ but โIs the tax benefit worth the trade?โ If the savings are small, you may decide the paperwork and portfolio disruption are not worthwhile. If the savings are substantial, you may decide to proceed while carefully avoiding wash sale issues. Either way, the calculator helps turn a vague idea into a concrete estimate that is easier to discuss with a financial planner, accountant, or with your own records in front of you.
Use the result alongside brokerage statements, realized gain reports, and your year-end tax planning notes. If you intend to act on the estimate, confirm holding periods, verify cost basis, and review replacement investments before trading. That extra step helps ensure the tax benefit you expect is one you can actually keep.
Harvest Basket Mini-Game
Catch valid loss tickets, avoid wash-sale traps, and keep the basket moving toward the current-year tax-savings target.
The game is optional and mirrors the calculator: useful losses raise current-year value, while disallowed losses do not help.
