Tax-Loss Harvesting
How to Turn Investment Losses Into Tax Savings — and the Mistakes That Erase Them
Tax-loss harvesting is the practice of selling an investment that has declined in value, realizing the loss for tax purposes, and immediately reinvesting in a similar position to maintain your market exposure. The realized loss offsets capital gains elsewhere in your portfolio — or, if no gains exist, reduces your ordinary income by up to $3,000 per year, with any excess carrying forward indefinitely.
Done consistently, tax-loss harvesting does not change your investment returns. What it changes is the timing of your tax obligations — deferring taxes that would otherwise be paid today into future years, and potentially converting them from higher-rate short-term gains to lower-rate long-term gains. For high-income earners in taxable accounts, this deferral has real, compounding value. The tax you do not pay today stays invested and earns returns of its own.
The Benefit: What Tax-Loss Harvesting Actually Does for You
The direct benefit is straightforward: a realized capital loss reduces your tax bill in the year it is harvested. If you sell a position for a $20,000 loss, that loss first offsets any realized capital gains for the year. If you have $20,000 in gains elsewhere, the net taxable gain drops to zero. If you have no gains, up to $3,000 of the loss offsets ordinary income, and the remaining $17,000 carries forward to future years.
For a tech worker in California in the 37% federal bracket and 13.3% state bracket, eliminating $20,000 of short-term capital gains saves approximately $10,000 in combined federal and state tax. That $10,000, left invested, compounds over the years remaining until the deferred tax is eventually owed. The longer the deferral and the higher the applicable tax rate, the more valuable the harvest.
The indirect benefit is subtler but often larger over time: tax-loss harvesting systematically lowers the cost basis of your portfolio. Each time you harvest a loss and repurchase a similar position, the new position starts with a lower cost basis than the original. This deferred gain grows alongside the portfolio. If you donate appreciated shares to charity or a DAF instead of selling — or hold them until death, where heirs receive a stepped-up basis — the deferred gain may never be taxed at all. In this scenario, tax-loss harvesting creates a permanent tax benefit, not just a deferral.
Quantifying the value: research and industry estimates suggest that systematic tax-loss harvesting adds 0.5%–1.5% per year in after-tax return for investors with significant taxable accounts and meaningful annual volatility — with higher values in years of sharp market drawdowns and lower values in years of continuous gains. Over 20–30 years, this compounds into a material difference in after-tax wealth.
How It Works: The Mechanics Step by Step
The mechanics of a tax-loss harvest involve three decisions: what to sell, what to buy as a replacement, and when to act.
Step 1: Identify positions with unrealized losses. In your taxable brokerage account, scan your holdings for positions where the current market value is below your adjusted cost basis. The loss is the difference between what you paid (your cost basis) and what the position is worth today. Brokerage platforms report unrealized gains and losses directly — most show them by lot, which matters because different lots of the same security may have been purchased at different prices and therefore have different individual gain/loss profiles.
Step 2: Sell the losing position. Execute the sale to realize the loss. At this point the loss becomes a recognized capital loss for tax purposes. Short-term losses (positions held less than one year) offset short-term gains first; long-term losses offset long-term gains first. After netting within each category, any excess crosses over: net short-term losses can offset long-term gains, and vice versa.
Step 3: Immediately purchase a replacement. This is the step most people miss or underestimate. The goal is to maintain your target asset allocation and market exposure — not to sit in cash while the market recovers. If you sell a broad U.S. stock market ETF at a loss, you replace it with a different but economically similar ETF tracking the same general market. If the market rises the next day, you participate. You have harvested the loss without sacrificing your investment position.
Step 4: Wait at least 31 days before repurchasing the original. The wash-sale rule prohibits buying back a substantially identical security within the 61-day window centered on the sale date — 30 days before, the day of sale, and 30 days after. To be safe, wait until the 31st calendar day after the sale before switching back to your original holding. Many investors continue with the replacement fund permanently rather than returning to the original, which sidesteps the timing risk entirely.
Step 5: Track and apply the loss on your tax return. Capital gains and losses are reported on Schedule D and Form 8949. Your brokerage provides a 1099-B each year showing proceeds and cost basis for all sales. Losses carry forward automatically when you file — the IRS does not require any special election.
Short-Term vs. Long-Term Losses: Which Are More Valuable
Not all harvested losses have equal value. The tax benefit of a realized loss depends on what gains it offsets.
Short-term capital gains — on positions held less than one year — are taxed as ordinary income, at federal rates up to 37% plus state tax. Long-term capital gains — on positions held more than one year — are taxed at preferential rates of 0%, 15%, or 20% federally, plus the 3.8% Net Investment Income Tax (NIIT) for high earners, plus state tax.
A short-term loss that offsets a short-term gain eliminates tax at the highest applicable rate — potentially 37% federal plus 13.3% California, or over 50 cents on the dollar for high earners. A long-term loss that offsets a long-term gain eliminates tax at 20% federal plus 13.3% California — still significant, but a lower rate. The most valuable harvest is a short-term loss offsetting a short-term gain. The least efficient outcome is a long-term loss offsetting a long-term gain in a low-bracket year when long-term gains might already be taxed at 0% or 15%.
One underappreciated nuance: when losses exceed gains and only the $3,000 ordinary income deduction remains, the IRS requires you to apply short-term losses before long-term losses to satisfy it. Because short-term losses are your most valuable losses — they would otherwise offset the highest-taxed gains — the IRS effectively forces you to spend your best losses first on the lowest-value application. This is a disadvantage to the taxpayer and another reason to prioritize harvesting in years when you have substantial realized gains to offset, rather than years with no gains at all.
This hierarchy is relevant when you have a choice between harvesting different positions. Prioritize losses that offset your highest-rate gains first.
The NIIT interaction: High earners — single filers with modified AGI above $200,000, married filing jointly above $250,000 — owe an additional 3.8% NIIT on net investment income (NII), which includes capital gains. The NIIT is levied on the lesser of your NII or the amount by which your MAGI exceeds the threshold. This distinction matters: harvested losses reduce NII directly — but they only reduce your NIIT bill if your NII is the binding constraint. If you earn $500,000 in salary and have $10,000 in capital gains, harvesting a $20,000 loss eliminates the $10,000 in gains but does not reduce the NIIT on your interest and dividends — because your salary already puts your MAGI so far above the threshold that NII remains the smaller number regardless. The full NIIT benefit of tax-loss harvesting applies when the investor's investment income, not their earned income, is what pushes them over the threshold — a more common situation for retirees or those with large taxable portfolios than for actively employed tech workers with high salaries.
The Wash-Sale Rule: The Constraint That Defines the Strategy
The wash-sale rule is the primary constraint on tax-loss harvesting. Under IRS rules, if you sell a security at a loss and purchase a "substantially identical" security within a 61-day window — the 30 days before the sale, the day of the sale itself, and the 30 days after — in any account you or your spouse owns, the loss is disallowed. A common and costly error is treating the window as simply "30 days after the sale." It is not. You must wait until the 31st calendar day after the sale date before repurchasing. Buying back on day 30 triggers a wash sale. The consequence depends critically on where the replacement purchase occurs:
- Replacement in a taxable account: The disallowed loss is not permanently lost — it is added to the cost basis of the replacement purchase, deferring the tax benefit to a future sale.
- Replacement in an IRA or Roth IRA: The loss is permanently and irrecoverably lost. Because IRA cost basis cannot be adjusted by outside transactions, there is no mechanism to recapture the disallowed loss. It disappears entirely. This is one of the most damaging wash-sale outcomes and one of the least understood.
The rule applies across all accounts: if you sell a losing ETF in your taxable brokerage account and your spouse's IRA automatically reinvests dividends in the same ETF within the 30-day window, the wash sale is triggered — and the loss is permanently gone. This cross-account, cross-spouse application catches many investors off guard.
What constitutes "substantially identical" is not precisely defined by the IRS for mutual funds and ETFs, but the practical guidance is:
- Same fund, different share class: Substantially identical — a wash sale.
- Two ETFs tracking the exact same index (e.g., two S&P 500 ETFs from different providers): Likely substantially identical — avoid.
- Two ETFs tracking different but similar indexes (e.g., the S&P 500 and the total U.S. stock market): Generally not substantially identical — acceptable replacement.
- Two ETFs in different asset classes (e.g., a large-cap ETF replaced by a small-cap ETF): Not substantially identical — acceptable, but this changes your allocation.
- Individual stocks: A specific stock is substantially identical only to itself — selling Apple and buying Microsoft is not a wash sale, even though both are tech stocks.
The safest approach is to select replacement ETFs in advance — identifying pairs of similar but not identical funds for each asset class in your portfolio — so that when a harvest opportunity arises, you can act immediately without scrambling to find an appropriate replacement.
When to Harvest: Opportunistic vs. Systematic
Tax-loss harvesting can be done opportunistically — whenever a meaningful loss appears — or systematically, on a scheduled basis. Both approaches have merit; the right choice depends on your portfolio size, account complexity, and willingness to monitor.
Opportunistic harvesting captures losses as they arise, typically during market drawdowns. A 10–15% correction across a broadly diversified portfolio can generate harvesting opportunities across dozens of positions simultaneously. The 2022 market decline — when the S&P 500 fell roughly 20% and growth stocks fell 30–50% — was one of the most productive harvesting environments in recent memory. Investors who acted systematically during that year generated substantial loss carryforwards that offset gains for years afterward.
Systematic harvesting — reviewing the portfolio monthly or quarterly and harvesting any positions below a loss threshold (often 5–10%) — captures smaller, more frequent losses that opportunistic harvesting might miss. This approach is more labor-intensive but produces steadier results across different market environments.
For investors with large taxable accounts, the most practical approach is systematic monitoring with opportunistic action during significant drawdowns. Set calendar reminders to review your portfolio at least quarterly, and monitor more actively during periods of elevated volatility.
One important timing note: harvesting before year-end is not required. Losses realized in any month offset gains from any month of the same tax year. The preference for December harvesting is a myth — a loss harvested in March is just as useful as one harvested in December for the same tax year.
Common Mistakes
Mistake 1: Triggering a Wash Sale Without Realizing It
The most common and costly error in tax-loss harvesting is inadvertently triggering the wash-sale rule by repurchasing a substantially identical security too soon. The most frequent cause: automatic dividend reinvestment. If your brokerage automatically reinvests dividends from a fund you just sold at a loss — and the reinvestment happens within 30 days — the wash sale is triggered on the reinvested amount. The fix is simple: turn off automatic dividend reinvestment in taxable accounts, or redirect dividends to a cash settlement account rather than back into the same fund.
A subtler version: you harvest a loss in your taxable account and your 401(k) or IRA holds the same fund with automatic contributions or rebalancing. Cross-account wash sales apply to all accounts you or your spouse controls. Coordinate harvesting across every account before acting.
Mistake 2: Sitting in Cash Between the Sale and the Replacement Purchase
Some investors sell the losing position to harvest the loss and then wait — for the market to stabilize, for clarity on the replacement, or simply from inertia. This is a mistake. Every day sitting in cash is a day of market exposure you are not capturing. If the market rises 5% in the two weeks you are in cash, the harvest has cost you 5% of gains on that position — potentially more than the tax savings.
The replacement purchase should happen on the same day as the sale, or as close to it as possible. Identify your replacement funds before you harvest, so execution is immediate.
Mistake 3: Harvesting Losses in Tax-Advantaged Accounts
Tax-loss harvesting only applies to taxable brokerage accounts. Sales inside a traditional IRA, Roth IRA, or 401(k) do not generate recognized capital gains or losses — all activity inside those accounts is tax-deferred or tax-free until withdrawal. There is no tax benefit to harvesting losses inside a retirement account, and doing so may disrupt your investment strategy inside those accounts unnecessarily. Confine harvesting activity to taxable accounts only.
Mistake 4: Ignoring the Impact on Future Gains
Tax-loss harvesting defers taxes; in most cases it does not eliminate them. When you sell at a loss and repurchase at a lower cost basis, the future gain on the replacement position is larger. If you eventually sell the replacement position in a high-income year at ordinary income rates (because you held it less than a year) or at high long-term capital gains rates, the deferred gain may be taxed at a rate similar to or higher than what you would have paid without harvesting. The strategy is most valuable when the deferred tax is eventually paid at a lower rate — through long-term capital gains rates, in a low-income year, through donation of appreciated shares, or through the stepped-up basis at death.
Mistake 5: Over-Harvesting in Low-Gain Years
If you have no capital gains in a given year, harvested losses offset ordinary income — but only up to $3,000. Additional losses carry forward. Carrying forward large loss balances is not inherently bad, but aggressively harvesting in a year when you have minimal gains and your income is already low means the losses are offset against income taxed at a low marginal rate. The same losses would be more valuable harvested in a high-income year with significant realized gains. Prioritize harvesting in years when you have substantial short-term gains at high ordinary income rates.
Mistake 6: Changing Your Asset Allocation to Harvest
A harvest should not alter your target asset allocation. If you sell a U.S. large-cap ETF and replace it with a small-cap ETF purely because no large-cap replacement is available without triggering a wash sale, you have changed your investment strategy in service of a tax move — not the other way around. Tax-loss harvesting is a tax efficiency tool, not an investment strategy. The investment decision comes first; the tax harvest is layered on top. If harvesting a position would require a replacement that meaningfully changes your portfolio's risk profile or expected return, the harvest may not be worth it.
Mistake 7: Neglecting State Tax Rules
California conforms to the federal wash-sale rule and taxes capital gains as ordinary income at rates up to 13.3% — making California one of the highest-value states for tax-loss harvesting, since the combined federal-plus-state tax rate on short-term gains can exceed 50%. Other states vary significantly in how they treat capital losses, and some rules are far more restrictive than the federal standard in ways that are not obvious. The critical distinction is not how long you can carry losses forward — no state currently imposes a shorter carryforward period than the federal indefinite standard — but whether you can carry losses forward at all. Pennsylvania, for example, does not permit capital loss carryforwards for individuals. If you harvest a loss in Pennsylvania and cannot use it in the same tax year because you have no gains to offset, the loss disappears permanently at the state level. There is no carryforward, no offset against ordinary income, and no recovery mechanism. If you live in a state other than California, confirm your state's specific treatment before assuming the federal rules apply.
One California-specific risk worth knowing: while the federal carryforward is indefinite and governed by statute, California has a history of temporarily suspending or limiting loss deductions for high-income taxpayers during budget crises — most recently between 2020 and 2022, when net operating loss deductions were suspended for taxpayers with income above $1,000,000. California capital loss carryforwards were not directly suspended in that period, but the episode illustrates that state-level tax treatment is subject to legislative change in ways the federal code is not. Relying on a decades-long California loss carryforward carries a small but real policy risk that does not exist at the federal level. Use California loss carryforwards while still a California resident rather than banking them for future years.
Tax-Loss Harvesting and Roth Conversions: What the Pairing Actually Does
Tax-loss harvesting and Roth conversions are often discussed together as complementary strategies, and they can be — but with an important and widely misunderstood limitation that must be stated clearly.
Capital losses cannot offset Roth conversion income beyond $3,000 per year. A Roth conversion generates ordinary income — when you move $100,000 from a traditional IRA to a Roth, you owe income tax on $100,000. Capital losses, including harvested losses, can only offset ordinary income up to $3,000 annually after netting against capital gains. If you have $80,000 of harvested capital losses and convert $100,000 to Roth, you cannot apply those losses against the conversion income. You still owe tax on the full $100,000 of ordinary income (less any $3,000 ordinary income offset from the capital losses). Assuming otherwise can produce a large, unexpected tax bill.
Where the strategies do interact usefully: both are most powerful in the same market environment — a year of broad market decline when incomes may be temporarily lower. A down market creates the most harvesting opportunities, and lower earned income reduces the marginal rate at which Roth conversion income is taxed. The two strategies benefit from the same conditions even though they do not directly offset each other. In early retirement years with low income and significant market volatility, it makes sense to pursue both simultaneously — harvest losses to offset capital gains from taxable account rebalancing, and convert traditional IRA funds to Roth at a low marginal rate — but not to expect the losses to reduce the conversion tax bill beyond the $3,000 ordinary income limit.
Frequently Asked Questions
See the Tax Impact of Your Portfolio Decisions
Nauma tracks your taxable account positions, models tax-loss harvesting opportunities, and shows how harvested losses fit into your broader tax plan — so you capture the benefit without triggering the mistakes.
Get Started for Free