Tax-Loss Harvesting: How to Turn Investment Losses into Tax Savings
Tax-loss harvesting is the practice of strategically realizing capital losses in a taxable investment account to reduce your current or future tax liability. Rather than waiting passively for a losing position to recover, you sell it, recognize the loss for tax purposes, and reinvest the proceeds in a similar but not substantially identical security to maintain your market exposure. Done correctly, it is one of the most consistently available tax-planning tools available to individual investors — and one that improves in value the higher your marginal tax rate.
Estimate Your Capital Gains Tax
Model how harvested losses offset your gains and reduce your net tax liability for the year.
In this article
- What is Tax-Loss Harvesting?
- How it Works: Step by Step
- The $3,000 Ordinary Income Deduction
- Carrying Forward Unused Losses
- Wash Sale Rule Interaction
- Replacement Securities: Similar but Not Substantially Identical
- Tax-Loss Harvesting With ETFs
- Direct Indexing and Automated Harvesting
- Year-End Strategies
- Long-Term vs Short-Term Loss Optimization
- When Tax-Loss Harvesting Does Not Make Sense
- Tax Alpha: Measuring the Benefit
- Frequently Asked Questions
What is Tax-Loss Harvesting?
Every taxable investment account holds a mix of positions — some worth more than you paid for them (unrealized gains) and some worth less (unrealized losses). For tax purposes, gains and losses are irrelevant until you realize them by selling. Tax-loss harvesting is the deliberate act of realizing losses to use them as a tax tool, while maintaining roughly the same investment exposure through a replacement security.
The core mechanics are straightforward:
- Identify positions in your taxable account that are currently below your cost basis (unrealized losses)
- Sell those positions to realize the loss
- Reinvest the proceeds in a similar but not substantially identical security to maintain market exposure
- Use the realized loss to offset taxable gains elsewhere in your portfolio — reducing the tax you owe this year
- Any excess loss beyond your gains reduces ordinary income by up to $3,000 per year, with the remainder carrying forward indefinitely
The term "harvesting" reflects the seasonal nature of the strategy — like harvesting a crop at its peak moment of usefulness. A loss that goes unharvested at year-end is not gone, but you have missed the opportunity to accelerate its tax benefit. Unlike most financial decisions, where waiting has a cost of opportunity, harvesting a tax loss now versus later has a concrete present-value benefit: you defer or eliminate taxes sooner, keeping more capital invested and compounding.
Tax-loss harvesting is not a strategy for eliminating taxes permanently in most cases — it is a deferral and optimization strategy. The replacement securities you buy in place of sold positions have a lower cost basis, meaning future gains on those positions will be larger. The benefit comes from the time value of the tax deferral and from the possibility of converting short-term gains into long-term gains through rebalancing over time.
How it Works: Step by Step
Here is a concrete walkthrough of a tax-loss harvesting transaction from start to finish.
Step 1: Review Your Portfolio for Unrealized Losses
Log in to your brokerage account and look at unrealized gain/loss figures for each position. Most platforms display cost basis and current value side by side. Focus on positions where you hold an unrealized loss — particularly short-term losses, which offset short-term gains that are taxed at ordinary income rates.
Step 2: Assess the Wash Sale Risk
Before selling, confirm that you have not purchased substantially identical securities in the prior 30 days — including through dividend reinvestment plans (DRIPs) or automatic contributions. If you have, the loss on shares purchased in that window will be disallowed. You may also want to confirm your spouse's account activity and any IRA automatic contributions. See our full guide to the wash sale rule for details.
Step 3: Sell the Losing Position
Execute the sale. Note the exact date, the number of shares sold, and the realized loss amount. If you hold multiple tax lots at different cost bases, specify which lots you are selling — most brokerages allow you to select specific lots. Selling the highest-cost lots first maximizes the loss recognized.
Step 4: Immediately Reinvest in a Replacement Security
To avoid being out of the market, purchase a replacement security the same day or the next business day. The replacement must not be substantially identical to the sold security (to avoid a wash sale), but it should provide similar economic exposure to maintain your target asset allocation. Replacement security selection is discussed in detail in a later section.
Step 5: Track the Loss and Apply It on Your Tax Return
Your brokerage will report the realized loss on Form 1099-B at year-end. You or your tax professional will report the loss on Form 8949 and summarize it on Schedule D, where it offsets capital gains. After offsetting all gains, any remaining net loss reduces ordinary income by up to $3,000, with the rest carrying forward.
The $3,000 Ordinary Income Deduction
One of the most valuable features of capital loss rules is that a net capital loss — after offsetting all capital gains — can be deducted against ordinary income (wages, interest, self-employment income, etc.) up to $3,000 per year ($1,500 for married filing separately). This is governed by Internal Revenue Code Section 1211.
The significance of this deduction is that ordinary income is typically taxed at higher marginal rates than long-term capital gains. For an investor in the 32% federal marginal bracket, a $3,000 ordinary income deduction saves approximately $960 in federal taxes — equivalent to the benefit of a $3,000 deduction on business expenses. For an investor in the 22% bracket, the saving is approximately $660.
Order of Loss Netting Under IRS Rules
The IRS requires capital losses to be applied in a specific order before any excess reaches ordinary income:
- Short-term losses first offset short-term gains (both taxed as ordinary income)
- Long-term losses first offset long-term gains (taxed at preferential rates)
- Any remaining net short-term loss offsets net long-term gains
- Any remaining net long-term loss offsets net short-term gains
- Any remaining net capital loss (of either type) reduces ordinary income by up to $3,000
- Losses exceeding $3,000 carry forward to the next year
This ordering has an important implication: a long-term loss that offsets a long-term gain saves you the preferential long-term rate (0%, 15%, or 20%), while a short-term loss that offsets a short-term gain saves you the higher ordinary income rate. All other things equal, it is generally more tax-efficient to use short-term losses to offset short-term gains and preserve long-term losses for long-term gains — but the IRS ordering rules are mandatory, not elective.
Carrying Forward Unused Losses
If your net capital losses for the year exceed your net capital gains plus the $3,000 ordinary income deduction limit, the remaining losses carry forward to future tax years. There is no expiration date — carryforward losses can be used in any future year in which you have gains or ordinary income to offset.
Carryforward losses retain their character: a short-term carryforward loss offsets short-term gains first in the carryforward year; a long-term carryforward loss offsets long-term gains first. You report the carryforward amount on Schedule D, and your tax software or tax professional typically handles this automatically if your prior-year returns are in the system.
Building a Loss Bank
In years when the market experiences significant volatility or a broad decline, aggressive tax-loss harvesting can generate large capital loss carryforwards — sometimes called a "loss bank." This loss bank can then be used in future years to shelter gains from rebalancing, from selling a concentrated position, or from other taxable events without paying tax until the loss bank is depleted.
Wash Sale Rule Interaction
The wash sale rule is the primary constraint on tax-loss harvesting. If you sell a security at a loss and repurchase the same or substantially identical security within the 61-day window (30 days before the sale through 30 days after), the loss is disallowed for the current tax year.
The most important wash sale traps in the context of tax-loss harvesting are:
- Dividend reinvestment plans (DRIPs): An automatic dividend reinvestment in the 30 days before a planned harvest triggers a wash sale on those shares.
- IRA contributions: A contribution to an IRA that invests in the same fund within 30 days after a taxable account harvest can permanently destroy the loss (no basis adjustment is available inside an IRA).
- Year-end purchases: Buying a position in early January after a late December harvest that falls within 30 days disallows the prior-year loss.
- Spousal accounts: A purchase by your spouse within the 61-day window triggers the rule even in separately held accounts.
The solution is to reinvest harvest proceeds in a replacement security that is similar in risk and return characteristics but not substantially identical to the sold security. This allows you to maintain your investment exposure while preserving the tax loss.
Replacement Securities: Similar but Not Substantially Identical
Selecting the right replacement security is one of the most important decisions in a tax-loss harvesting transaction. The goal is to find something that:
- Is sufficiently different from the sold security to avoid a wash sale (not substantially identical)
- Provides similar economic exposure so that your portfolio's risk and return characteristics remain approximately the same
- Has similar costs (expense ratio for funds, liquidity for individual stocks)
Common ETF Replacement Pairs
ETF-based portfolios are particularly well-suited to tax-loss harvesting because the market offers many funds with high correlation but different underlying indexes or issuers. Common replacement approaches (each with different legal risk profiles — consult a qualified tax professional) include:
| Sold Security (Example) | Possible Replacement (Example) | Rationale |
|---|---|---|
| S&P 500 ETF (Fund A) | S&P 500 ETF (Fund B) or Total US Market ETF | Different issuer or slightly different index |
| Total US Market ETF | S&P 500 ETF or Large-Cap Value ETF | Overlapping but distinct composition |
| International Developed Markets ETF | Different-issuer international fund | Same geography, different index provider |
| US Aggregate Bond ETF | Investment-grade corporate bond ETF | Similar duration and credit quality |
| Technology sector ETF | Growth equity ETF (broader) | High overlap in holdings, different composition |
Individual Stocks
For individual stocks, replacement options are more limited. Stocks in the same company are clearly substantially identical. Stocks in a different company in the same industry are generally not substantially identical, but they carry more idiosyncratic risk — the replacement company may perform very differently from the sold company. Some investors use a sector ETF as a replacement for an individual stock to maintain sector exposure while clearly avoiding a wash sale.
Tax-Loss Harvesting With ETFs
ETFs have become the dominant vehicle for systematic tax-loss harvesting because they offer several structural advantages:
- Intraday liquidity: You can sell and buy replacement ETFs in a single day, eliminating market exposure gaps.
- Low internal capital gains distributions: ETFs rarely distribute capital gains to shareholders, which means your primary tax event is your own sale — not an unexpected year-end distribution.
- Broad market coverage: For nearly every asset class, multiple ETFs exist from different issuers tracking similar (but non-identical) benchmarks, providing harvest flexibility.
- Low costs: Expense ratios on major index ETFs are typically 0.03%–0.20%, meaning the carrying cost of holding a replacement ETF during the 31-day waiting period is negligible.
An ETF-based portfolio can be structured with designated "primary" and "secondary" ETFs for each asset class, alternating between them whenever a loss-harvesting opportunity arises. After the 31-day restriction period passes, you may either sell the secondary ETF and return to the primary (if the secondary has not itself generated a loss) or continue holding the secondary indefinitely.
Direct Indexing and Automated Harvesting
Direct indexing is an approach where, instead of buying a single ETF that tracks an index, you purchase the individual constituent stocks of that index directly in your account. This creates far more tax-loss harvesting opportunities because individual stocks within an index diverge from each other constantly — even in years when the index as a whole appreciates, dozens of constituent stocks may be down, creating harvestable losses at the stock level.
With a direct-index portfolio of, say, 500 individual stocks, an investor's tax management software can continuously scan for positions below their cost basis and execute harvests throughout the year — replacing sold positions with other stocks in the same sector or factor exposure to maintain the overall portfolio characteristics. This approach, historically available only to ultra-high-net-worth investors, has become more accessible through fractional shares and zero-commission trading platforms.
Automated Tax-Loss Harvesting
Several robo-advisors and digital wealth platforms offer automated tax-loss harvesting as a feature. These systems monitor portfolios daily, identify harvesting opportunities above a threshold size, execute the sale and replacement automatically, and track wash sale exposure across the account. For ETF-based portfolios, the automation uses pre-defined replacement ETF pairs.
Automated harvesting can be more consistent than manual harvesting because it operates continuously rather than only at year-end, and it eliminates the risk of missing a harvesting opportunity during a volatile day when you are not monitoring your portfolio. However, it typically does not account for activity in other accounts (such as spousal accounts or IRAs), so cross-account wash sale risks remain the investor's responsibility.
Year-End Strategies
While tax-loss harvesting can be done at any point during the year, the fourth quarter brings heightened urgency because December 31 is the last day to realize losses that count against the current tax year.
Year-End Checklist
- Tally realized gains: Review all realized gains for the year. Short-term gains are particularly expensive; identify losses that can offset them.
- Review unrealized losses: Scan your portfolio for positions with unrealized losses. Calculate the pre-tax value of harvesting each one.
- Check DRIP activity: Suspend automatic dividend reinvestment in any fund you plan to harvest, or check the date of the most recent DRIP purchase to assess wash sale risk.
- Coordinate with IRA contributions: If you planned to make an IRA contribution in January, be aware that a late-December harvest followed by an early-January IRA purchase of the same fund may trigger a permanent loss disallowance.
- Mind the settlement window:Stock trades typically settle two business days after the trade date (T+2). Trades must be executed by December 29 or 30 (depending on the year's calendar) to settle by December 31 and count in the current tax year.
- Do not let the tail wag the dog: Harvesting a loss only makes sense if the tax savings justify the transaction costs and the risk of tracking error from the replacement security.
The December 31 Deadline for Short-Term Qualification
Holding period matters for loss character too. A loss on a position held for exactly 12 months is short-term; a loss on a position held for one year and one day is long-term. If you have a position that will cross the one-year mark in January and is currently at a loss, it may be worth considering whether to harvest before year-end (capturing a short-term loss that can offset higher-taxed short-term gains) or to wait until the one-year anniversary passes (converting it to a long-term loss, which is less valuable for offsetting short-term gains but offsets long-term gains without penalty).
Long-Term vs Short-Term Loss Optimization
Not all losses are equally valuable. The tax code creates a hierarchy of usefulness:
| Loss Type | First Offsets | Tax Rate Saved (Example) | Relative Value |
|---|---|---|---|
| Short-term loss | Short-term gains | 22%–37% (ordinary income rates) | High |
| Long-term loss | Long-term gains | 0%–20% (preferential rates) | Moderate |
| Excess net capital loss | Ordinary income (up to $3,000) | 22%–37% | High (for first $3,000) |
The implication: a short-term loss that offsets a short-term gain is generally more valuable than a long-term loss that offsets a long-term gain, because the short-term rate (ordinary income rate) is higher than the long-term preferential rate. If you have both short-term and long-term losers to harvest and limited capacity (e.g., you want to avoid generating a carryforward you cannot use this year), prioritize harvesting short-term losses first.
Long-term losses are still valuable, particularly for investors with long-term gains they want to shelter. But be aware that if a long-term loss ends up offsetting only the $3,000 ordinary income deduction after gains are netted, the value of that long-term loss is the ordinary income tax rate times $3,000 — the same as a short-term loss in that scenario.
When Tax-Loss Harvesting Doesn't Make Sense
Despite its benefits, tax-loss harvesting is not always the right decision. Several circumstances can reduce or eliminate its value.
1. You Are in the 0% Capital Gains Bracket
For tax year 2025, the 0% long-term capital gains rate applies to taxable income up to $47,025 for single filers and $94,050 for married filing jointly (after deductions). If your long-term gains fall within this range, harvesting long-term losses to offset those gains produces no tax benefit — the gains were already untaxed. Harvesting in this scenario only reduces your basis, creating larger future gains that will eventually be taxed when rates are potentially higher.
2. You Expect to Hold Until Death (Stepped-Up Basis Planning)
Under current law, assets held until death receive a stepped-up cost basis to their fair market value at the date of death, wiping out all embedded gains for income tax purposes. If you plan to hold a position indefinitely and pass it to heirs, harvesting a small loss today reduces your basis — which matters less if the position will ultimately receive a step-up. The long-term benefit of the basis reduction is eliminated at death.
3. Transaction Costs Exceed the Tax Benefit
For very small positions or in accounts where transaction costs are meaningful, the cost of executing the harvest — commissions, bid-ask spreads, potential market impact — can exceed the tax savings. Most major US brokerages now offer zero-commission equity trading, which has reduced this concern significantly, but it remains relevant for certain bond or international fund trades.
4. You Have Large Loss Carryforwards Already
If you already carry a substantial unrealized loss bank from prior years, the incremental value of harvesting additional losses may be low if you cannot foresee generating enough gains to use them. Loss carryforwards are valuable assets, but their present value declines if they are unlikely to be used in the near term.
5. State Tax Complications
Some states have capital loss deduction rules that differ from federal rules, including lower annual deduction limits or different carryforward periods. In high-tax states, the combined federal + state analysis is important before deciding on a harvesting strategy. A qualified tax professional familiar with your state can assess the full picture.
Tax Alpha: Measuring the Benefit
In investment management literature, the term tax alpha refers to the after-tax return improvement generated by tax-efficient strategies, including tax-loss harvesting, asset location, and cost basis management. It is the "extra return" that comes not from better security selection or risk-taking, but from more efficient tax management within a given investment strategy.
Academic research and industry studies have estimated that systematic tax-loss harvesting generates roughly 0.5%–2.0% of additional after-tax return per year for taxable investors in moderate-to-high tax brackets, depending on portfolio volatility and the investor's specific tax situation. The range is wide because the benefit depends on how much volatility the portfolio experiences (creating harvesting opportunities), the investor's marginal tax rate, and the availability of suitable replacement securities.
Tax alpha from loss harvesting compounds over time. Deferring a $10,000 tax payment for 10 years at a 7% investment return allows that $10,000 to grow to approximately $19,700 — meaning the actual benefit is not just the deferred tax today but the investment growth on that deferred amount. This is the core of why financial planners consistently rank tax-loss harvesting among the highest-value portfolio management activities available to taxable investors.
The Relationship Between Harvesting and Long-Term Gains
It is worth acknowledging that tax-loss harvesting is primarily a deferral strategy — not a permanent elimination. When you harvest a loss and purchase a replacement security at a lower basis, the future gain on that replacement is larger. In the most basic case, you are converting a current-year tax liability into a future-year tax liability at (potentially) the same rate.
The net benefit therefore comes from: (1) the time value of the deferred tax, (2) the possibility that future gains will be taxed at lower long-term rates than the current short-term rates you are offsetting today, (3) the $3,000 ordinary income deduction for excess losses, and (4) the stepped-up basis rules at death that may eliminate future tax on the higher-basis replacement position entirely. For long-term, buy-and-hold investors especially, the interaction between loss harvesting and eventual step-up planning can generate significant permanent — not just deferred — tax savings.
For more background on how capital gains tax rates interact with these calculations, see our companion guide on capital gains tax on stocks.
Frequently Asked Questions
Can I tax-loss harvest in a retirement account such as an IRA or 401(k)?
No. Tax-loss harvesting only produces a benefit in taxable brokerage accounts. Gains and losses inside traditional IRAs, Roth IRAs, and 401(k) plans are not recognized for federal income tax purposes during the account's life. Selling at a loss inside a retirement account generates no deductible loss — and, as described in the wash sale rule discussion, repurchasing a substantially identical security inside an IRA within 30 days of selling at a loss in a taxable account can permanently destroy the tax benefit of the harvested loss.
How many years can I carry forward unused capital losses?
Capital loss carryforwards are indefinite under current US federal tax law. You may carry them forward year after year until they are fully used, either to offset future capital gains or to claim the annual $3,000 deduction against ordinary income. The losses retain their character (short-term or long-term) in carryforward. They do not expire.
Is tax-loss harvesting worth it if I am in a low tax bracket?
The benefit of tax-loss harvesting depends directly on the tax rate you would otherwise pay on the gains being offset. Taxpayers in the 0% long-term capital gains bracket (which applies to roughly the first $94,050 of taxable income for married filing jointly in 2025) receive little or no benefit from harvesting long-term losses, because the gains they would offset are already untaxed. Harvesting short-term losses to offset short-term gains can still be worthwhile since short-term gains are taxed as ordinary income at higher rates. The incremental benefit of tax-loss harvesting increases with your marginal tax rate.
What is the difference between tax-loss harvesting and tax avoidance?
Tax-loss harvesting is a fully legal tax planning strategy that Congress has expressly permitted — you are doing exactly what the tax code allows by recognizing losses to offset taxable gains. It is not tax avoidance in any pejorative sense. The IRS wash sale rule was specifically enacted to prevent abusive round-trip loss transactions, and compliance with the wash sale rule is part of legitimate tax-loss harvesting. Tax avoidance, in the legal sense, simply means arranging your affairs within the boundaries of the law to minimize tax — tax-loss harvesting falls squarely within this category.
Does tax-loss harvesting make sense in a year where I have no capital gains?
Yes, even without capital gains to offset, harvesting a loss can still be valuable. Up to $3,000 of net capital losses per year can be deducted against ordinary income (such as wages, interest, or self-employment income), which is typically taxed at a higher rate than long-term capital gains. Any excess losses beyond $3,000 carry forward indefinitely and can offset future gains or ordinary income. In a year with no gains, the immediate benefit is capped at $3,000 in ordinary income relief, but the carryforward preserves the full remaining loss for future use.
Ready to Estimate Your Tax Savings?
Use our Capital Gains Tax Calculator to model how harvested losses reduce your net tax bill across different scenarios.