# Tax Loss Harvesting Calculator

Estimate tax savings and loss carryforward amounts by netting capital gains against harvestable investment losses each year.

---

- **Canonical URL:** https://dothecalculation.com/calculators/tax-loss-harvesting-calculator
- **Category:** Financial calculators
- **Publisher:** Do The Calculation (https://dothecalculation.com)
- **Cost:** Free, no account or sign-up required
- **Privacy:** Runs entirely in the browser; inputs are never sent to a server
- **Methodology:** https://dothecalculation.com/methodology

---

## Tax Loss Harvesting Calculator — Capital Gains Netting

Optimize capital gains tax liabilities by netting short-term and long-term gains against harvestable investment losses, and calculate ordinary income offsets.

- Separate short-term vs. long-term capital netting
- Ordinary income offset of up to $3,000
- Capital loss carryforward trackers

## Tax Loss Harvesting and Capital Netting Rules

Tax loss harvesting is the strategy of selling investments that have lost value to offset capital gains tax liabilities. Under IRS guidelines, capital gains and losses must be netted using a strict sequence of steps.

Gains and losses are categorized by holding period: **Short-Term** (assets held for 1 year or less, taxed at ordinary income rates) and **Long-Term** (assets held for more than 1 year, taxed at lower preferential rates).

## How to Use This Calculator

Enter your short-term capital gains and losses, your long-term capital gains and losses, and your ordinary (short-term) and capital-gains (long-term) tax rates.

The calculator nets gains against losses within each category, cross-offsets any remaining loss against the other category, applies up to $3,000 against ordinary income if a net loss remains, and shows your current tax liability, tax liability after harvesting, and net tax savings.

## Worked Example: Netting Gains and Losses Across Categories

Short-term gains $25,000, short-term losses $15,000, long-term gains $40,000, long-term losses $20,000, ordinary tax rate 35%, long-term capital gains rate 15%.

Tax owed before any netting (on gross gains only): $25,000 × 35% + $40,000 × 15% = $8,750 + $6,000 = $14,750.

Net short-term result: $25,000 − $15,000 = $10,000 gain. Net long-term result: $40,000 − $20,000 = $20,000 gain.

Tax owed after netting each category's own gains against its own losses: $10,000 × 35% + $20,000 × 15% = $3,500 + $3,000 = $6,500.

Net tax savings from harvesting the $15,000 short-term loss and $20,000 long-term loss: $14,750 − $6,500 = $8,250 — with no leftover loss to carry forward since both categories still net to a gain after their own internal offsets.

## The Netting Sequence

The capital netting process is performed as follows:

1. **Net Short-Term**: Subtract short-term capital losses from short-term capital gains to find Net Short-Term Capital Gain or Loss.

2. **Net Long-Term**: Subtract long-term capital losses from long-term capital gains to find Net Long-Term Capital Gain or Loss.

3. **Cross-Netting**: If one category is a net gain and the other is a net loss, offset the two. For example, a net short-term loss of $5,000 offsets a net long-term gain of $8,000, leaving a net long-term gain of $3,000.

## Offsetting Ordinary Income and Carryforward Rules

If the netting process results in a net capital loss, investors can use up to **$3,000** of that net loss to offset ordinary income (such as salary) in the current tax year:

$$\text{Ordinary Income Offset} = \min(\text{Net Capital Loss}, 3000)$$

Any remaining net capital loss exceeding the $3,000 limit cannot be deducted immediately. Instead, it must be carried forward to the following tax year as a capital loss carryforward, retaining its character (short-term or long-term) to offset future capital gains.

## The Wash Sale Rule Warning

To claim a tax loss, investors must avoid the wash sale rule. A wash sale occurs if you sell a security at a loss and buy a "substantially identical" security within **30 days before or after** the sale.

If a wash sale occurs, the tax loss is disallowed for the current year, and the loss amount is added to the cost basis of the newly purchased security, delaying the tax benefit.

## Related Calculators

Estimate the standalone tax bill on a specific sale with the [capital gains calculator](/calculators/capital-gains-calculator), or if the loss came from a crypto or stock trade, trace it back with the [crypto profit calculator](/calculators/crypto-profit-calculator) or [stock profit calculator](/calculators/stock-profit-calculator).

## Frequently asked questions

### What is the wash sale rule?

The wash sale rule disallows a tax deduction for a security sold at a loss if you buy a substantially identical security within 30 days before or after the sale date.

### How much ordinary income can I offset with capital losses?

You can offset up to $3,000 of ordinary income per year using net capital losses. Married individuals filing separately are limited to $1,500 each.

### Do short-term losses offset long-term gains?

Yes, but only after offsetting their own category. Short-term losses must offset short-term gains first, and long-term losses must offset long-term gains first. Any remaining net loss can then cross-offset the other category.

### What is capital loss carryforward?

Capital loss carryforward is the unused portion of a net capital loss (above the $3,000 ordinary income offset) that rolls over to future tax years indefinitely until fully utilized.

### What tax rates apply to capital gains?

Short-term capital gains are taxed at ordinary income tax rates (up to 37%). Long-term capital gains are taxed at preferential rates (0%, 15%, or 20%), depending on your taxable income.

### Can I harvest losses in a tax-advantaged account like an IRA or 401(k)?

No. Tax-advantaged retirement accounts do not trigger capital gains taxes on sales, so capital losses inside these accounts cannot be harvested to offset external taxable gains.

### How is cost basis adjusted in a wash sale?

If you trigger a wash sale, the disallowed loss is added to the purchase price (cost basis) of the new security, which reduces the taxable gain when you eventually sell the new security.

### Does tax loss harvesting make sense if I plan to reinvest immediately?

Yes, provided you purchase a different security (e.g., an ETF tracking a different index) to avoid the wash sale rule, allowing you to claim the tax benefit while remaining invested in the market.

### What is the netting order of losses?

Short-term losses offset short-term gains first. Long-term losses offset long-term gains first. Remaining losses in either category offset the opposite category's gains. Any remaining net loss offsets up to $3,000 of ordinary income.

### How does tax loss harvesting affect my cost basis?

Harvesting losses involves selling assets at a loss, which lowers your cost basis when you buy replacement assets. This means you will owe more tax in the future if those assets appreciate, essentially deferring taxes to a later date.

## Related concepts

- **Wash Sale** — An IRS rule disallowing capital loss deductions for repurchased identical assets.
- **Capital Netting** — The sequential process of offsetting capital gains and losses.
- **Cost Basis** — The original purchase price of an asset, adjusted for splits, dividends, and wash sales.

## Related guides

- [Capital Gains Tax Guide: Basis, Selling Costs, and After-Tax Sale Proceeds](https://dothecalculation.com/blog/finance/capital-gains-tax-guide) — Estimate taxable gain more accurately by separating sale price, adjusted basis, selling costs, tax assumptions, and after-tax proceeds.
- [Understanding Calculator Formulas: How DTC Turns Inputs into Results](https://dothecalculation.com/blog/site-guides/understanding-calculator-formulas) — Understand how Do The Calculation formulas are presented, what the explanation blocks mean, and how to verify calculator logic before using a result in a real decision.

## Related calculators

- [Capital Gains Calculator](https://dothecalculation.com/calculators/capital-gains-calculator) — Estimate capital gains and the resulting tax impact from selling stocks, property, or other investment assets that you own.
- [HSA Tax Savings Calculator](https://dothecalculation.com/calculators/hsa-tax-savings-calculator) — Estimate federal income tax and FICA tax savings from contributing pre-tax dollars to a Health Savings Account each year.
- [Emergency Fund Calculator](https://dothecalculation.com/calculators/emergency-fund-calculator) — Estimate how much emergency savings you need based on monthly expenses to cover unexpected income loss or urgent expenses.
- [FIRE Calculator](https://dothecalculation.com/calculators/fire-calculator) — Estimate your financial independence number and early retirement timeline based on savings rate and expected investment returns.
- [Rainwater Harvesting Calculator](https://dothecalculation.com/calculators/rainwater-harvesting-calculator) — Estimate harvestable rainwater based on roof size and local rainfall, project cistern sizing, and calculate water bill savings.
- [Weighted Average Cost of Capital (WACC) Calculator](https://dothecalculation.com/calculators/wacc-calculator) — Estimate Weighted Average Cost of Capital, after-tax cost of debt, and capital weights to evaluate investment and financing decisions.

---

_This tool is for educational purposes only. Mortgage rates, PMI premiums, property valuations, tax assessments, and insurance underwriting details depend on individual credit profiles, local government policies, and lender overlays. Always consult a licensed mortgage broker, financial planner, or tax professional before making property transactions._

---

_Source: [Do The Calculation](https://dothecalculation.com/calculators/tax-loss-harvesting-calculator). Quote freely with attribution and a link to this page._
