WorldTickers

TAX

Tax Loss Harvesting Calculator - Offset Gains with Losses

By Worldtickers ·

Calculate your tax savings from harvesting investment losses to offset capital gains, including wash sale rules and the $3,000 deduction limit.

This tax loss harvesting tool focuses on calculating your tax savings from harvesting investment losses to offset capital gains, including wash sale rules and the $3,000 deduction limit. Use it to estimate tax exposure, deductions, rates, payments, and after-tax outcomes, then test how income, gains, location, filing choices, or timing may change the final estimate.

Calculator

Tax Loss Harvesting Calculator

See how harvesting losses can offset your gains and reduce taxes.

What Is Tax Loss Harvesting?

Tax loss harvesting is an investment strategy that involves selling securities at a loss to offset capital gains from other investments. The realized losses first reduce gains of the same type — short-term losses offset short-term gains, and long-term losses offset long-term gains — then can offset gains of the other type. If total losses exceed total gains, up to $3,000 of the net loss can be deducted against ordinary income each year, with any remainder carrying forward indefinitely.

The strategy is particularly valuable because capital gains tax rates — especially on short-term gains — can be substantial. A taxpayer in the 37% bracket paying short-term capital gains rates could save $3,700 in federal tax for every $10,000 of losses harvested. Even at the 15% long-term rate, harvesting $50,000 in losses could save $7,500 or more in federal tax.

The key challenge with tax loss harvesting is the wash sale rule, which prohibits claiming a loss if you repurchase a substantially identical security within 30 days before or after the sale. Many investors work around this by immediately reinvesting in a similar but not identical investment — for example, selling one S&P 500 index fund and buying a different Total Stock Market fund — to maintain market exposure while capturing the tax benefit.

How to Use This Calculator

Enter your total realized capital gains for the year (both short-term and long-term), separated by type. Then enter the investment losses you are considering harvesting — the amounts you would realize by selling securities at a loss.

The calculator determines how your losses offset your gains, the resulting net gain or loss, and the estimated federal tax savings. It accounts for the different tax rates on short-term vs. long-term gains and shows the effective tax rate you would pay after harvesting.

If your losses exceed your gains, the calculator shows how much of the $3,000 annual ordinary income deduction you can use and how much would carry forward to future tax years. This gives you a complete picture of the multi-year tax impact of your harvesting strategy.

Formula

Tax loss harvesting follows a specific ordering of offsets:

Step 1: ST Losses offset ST Gains → Net ST Gain/Loss

Step 2: LT Losses offset LT Gains → Net LT Gain/Loss

Step 3: Cross-offset (excess losses offset the other type)

Step 4: Up to $3,000 of net loss offsets ordinary income

Step 5: Remaining loss carries forward

The tax savings depend on your marginal tax rate and the type of gains being offset. Short-term gains are taxed at ordinary income rates (10%-37%), while long-term gains are taxed at preferential rates (0%, 15%, or 20%). The $3,000 deduction against ordinary income is taxed at your marginal rate, which is typically the most valuable offset.

Examples

Example 1: Offsetting Short-Term Gains

You realize $30,000 in short-term gains from stock sales and harvest $25,000 in losses from other positions. Net short-term gain: $5,000. At a 32% marginal rate, you owe approximately $1,600 instead of $9,600 — a tax savings of $8,000. The $25,000 in losses saved you $8,000 in federal tax.

Example 2: Excess Losses Beyond Gains

You have $10,000 in long-term gains and harvest $18,000 in losses. After offsetting gains, $8,000 in net losses remains. You deduct $3,000 against ordinary income (saving approximately $1,110 at the 37% bracket) and carry forward $5,000 to next year. Total tax savings this year: approximately $4,810 ($3,000 long-term gain offset at 15% = $450 + $3,000 ordinary deduction at 37% = $1,110 + the $10,000 gain offset at 15% = $1,500).

Example 3: No Gains to Offset

You have $0 in capital gains this year but harvest $3,000 in losses. You deduct the full $3,000 against ordinary income, saving approximately $1,110 at the 37% bracket. The remaining losses (if more than $3,000) carry forward to future years. Even without gains, harvesting losses still provides meaningful tax savings through the ordinary income deduction.

Tips

Beware the Wash Sale Rule

The wash sale rule disallows the loss if you buy a substantially identical security within 30 days before or after the sale. To harvest losses without triggering wash sales, sell the losing investment and reinvest in a similar but different fund or ETF. For example, if you sell an S&P 500 index fund, buy a Total Stock Market fund or a different S&P 500 fund from a different provider. Wait 31 days before repurchasing the original fund if you want to own it again.

Harvest Losses Before Year-End

To count losses for the current tax year, you must sell the investment before December 31. The trade must settle by the settlement date (typically T+1 for stocks), so plan your sales at least a few days before year-end. Many investors set a reminder in November to review their portfolio for harvesting opportunities.

Don't Let the Tax Tail Wag the Dog

Tax loss harvesting should complement your investment strategy, not drive it. Do not sell a fundamentally strong investment just to harvest a small loss. Focus on positions you were already considering selling or those where your investment thesis has changed. The tax benefit is a bonus, not the primary reason to sell.

Track Your Carryforwards

Capital loss carryforwards can be used in future years without expiration. Keep a running total of your unused losses so you can apply them against future gains. Many tax software programs track this automatically, but it is worth verifying that your carryforward balance is accurate each year.

FAQ

What is tax loss harvesting?

Tax loss harvesting is the strategy of selling investments at a loss to offset capital gains from other sales, thereby reducing your tax liability. The losses first offset gains of the same type (short-term losses offset short-term gains, and long-term losses offset long-term gains), then can offset gains of the other type. Any remaining net losses can offset up to $3,000 of ordinary income per year, with the rest carrying forward.

What is the wash sale rule?

The wash sale rule prevents you from claiming a tax loss if you buy a substantially identical security within 30 days before or after the sale. If triggered, the loss is disallowed for tax purposes and added to the cost basis of the replacement shares. The 30-day window is a total of 61 days (30 before, the sale date, and 30 after). The rule applies to stocks, bonds, mutual funds, and other securities.

How much can I deduct from losses each year?

You can deduct up to $3,000 of net capital losses against ordinary income per year ($1,500 if married filing separately). Any losses beyond this limit carry forward to future tax years indefinitely until used. There is no expiration on capital loss carryforwards, so you can use them over as many years as needed.

Can I harvest losses in my retirement account?

No. Tax loss harvesting only applies to taxable brokerage accounts. In tax-advantaged accounts like IRAs and 401(k)s, there is no capital gains tax on sales, so harvesting losses provides no tax benefit. Additionally, buying substantially identical securities in an IRA within 30 days of selling in a taxable account can trigger the wash sale rule.

What are the best investments to harvest losses from?

The best candidates are investments with significant unrealized losses that you would be comfortable selling and (if desired) replacing with a similar but not identical investment. Index funds, ETFs tracking different benchmarks, and individual stocks with large declines are common candidates. Avoid selling investments you want to keep long-term just for a small tax benefit — the transaction costs and potential tax consequences of repurchasing may outweigh the savings.

When should I harvest losses during the year?

You can harvest losses at any time during the year, but many investors do it in the fourth quarter (October–December) to ensure the losses are captured before the tax year ends. However, if an investment has a large loss earlier in the year, harvesting it sooner locks in the tax benefit and allows you to reinvest the proceeds. The key is to act before December 31 to count the loss for the current tax year.

Does tax loss harvesting affect my investment returns?

Tax loss harvesting can improve after-tax returns, but it does not change pre-tax returns. The strategy involves selling an investment at a loss and typically reinvesting in a similar (but not identical) security to maintain market exposure. The net effect is a tax savings without significantly altering your portfolio allocation — you end up with a similar investment but a lower tax bill.

What is the $3,000 deduction limit?

If your total capital losses exceed your total capital gains in a given year, you can deduct up to $3,000 of the net loss against your ordinary income ($1,500 for married filing separately). This reduces your adjusted gross income, which can lower your tax bill in multiple ways. Any unused losses carry forward to future years indefinitely. This limit applies to the net of all short-term and long-term losses combined.