Trusted by 50,000+ monthly readers · Updated for 2026

24blog.finance
Tax May 20, 2025 · 10 min read

Tax-Loss Harvesting: A Complete Guide to Saving $3,000 Per Year in Taxes

By the 24blog Finance Editorial Team · Reviewed for accuracy

Most investors think the only way to make money in the stock market is to buy low and sell high. But the tax code quietly offers a second, almost counterintuitive strategy: deliberately selling some of your losers to capture a tax deduction that can be worth thousands of dollars per year. This technique, called tax-loss harvesting, is one of the few genuine free lunches in investing — but only if you execute it correctly. Done wrong, it triggers wash-sale penalties, raises your future tax bills, and erodes long-term returns.

This guide explains how tax-loss harvesting works, walks through the math of the $3,000 ordinary-income offset, breaks down the wash-sale rule in detail, and shows a concrete worked example with real numbers. We will also cover the rise of automated "direct indexing" platforms that harvest losses daily, the situations where harvesting backfires, and a year-round playbook you can run on a taxable brokerage account. By the end, you will know exactly when to harvest, how much to harvest, and what to do with the cash.

What Is Tax-Loss Harvesting, in Plain English

Tax-loss harvesting is the deliberate sale of an investment at a loss so the loss can be used to offset capital gains — and, if losses exceed gains, up to $3,000 of ordinary income each year. Any leftover losses carry forward to future tax years indefinitely. The mechanics are simple: you sell a position that is trading below your cost basis, realize the loss on your tax return, and then decide what to do with the cash and how to stay invested in the market.

The strategy only works inside a taxable brokerage account. Losses inside a 401(k), traditional IRA, Roth IRA, or HSA are not deductible because those accounts already shelter investment activity from current taxation. This is one of several reasons why disciplined investors often hold a taxable brokerage account alongside their tax-advantaged retirement accounts — the taxable account is the only place where tax-loss harvesting, qualified dividends, and long-term capital gains rates are available.

The psychological trick of harvesting is that you are converting a paper loss (which feels bad but does nothing for your taxes) into a realized loss (which feels worse for a moment but produces a real, usable tax deduction). As long as you stay invested in the market — by immediately buying a similar-but-not-identical replacement security — your portfolio's economic exposure stays the same while your tax bill drops. That is the entire game.

The $3,000 Ordinary Income Offset: How the Math Actually Works

The most powerful feature of capital losses is that they can offset not just capital gains, but also up to $3,000 of ordinary income per year. Ordinary income — wages, self-employment income, interest, non-qualified dividends — is taxed at your highest marginal rate, which for many two-earner households is 22% or 24%, and for high earners 32%, 35%, or 37%. A $3,000 deduction against ordinary income at the 24% bracket saves you $720 in federal tax each year, every year, until the loss carryforward is used up.

The offset rules work in a specific order. First, short-term losses offset short-term gains, and long-term losses offset long-term gains. Second, any remaining short-term losses can offset long-term gains, and any remaining long-term losses can offset short-term gains. Third, if total net losses still exceed total gains, up to $3,000 of the remaining loss offsets ordinary income that year. Fourth, anything left over after that carries forward to the next tax year, where the same waterfall repeats.

A $30,000 harvested loss in a single bad year can generate roughly $720 of federal tax savings per year for ten straight years, plus whatever it offsets against future capital gains — a total benefit that can easily exceed $8,000–$10,000 over the carryforward period.

Married couples filing jointly get the same $3,000 cap; the limit does not double. Single filers also get $3,000. Married filing separately is capped at $1,500 each. Importantly, the $3,000 figure is in 2025 dollars and has not been indexed for inflation since it was set decades ago, which means the real value of this deduction erodes every year — another reason to harvest aggressively when the opportunity appears.

The Wash-Sale Rule: The One Trap You Cannot Ignore

The wash-sale rule is the single most important constraint on tax-loss harvesting, and it trips up more investors than any other tax rule in the code. Under IRS Section 1091, if you sell a security at a loss and buy "substantially identical" security within 30 days before or after the sale — a 61-day window centered on the sale date — the loss is disallowed. The disallowed loss is added to the cost basis of the replacement shares, which preserves the deduction in theory, but in practice many investors lose track and never recover it.

"Substantially identical" is straightforward for individual stocks — selling Apple and buying back Apple within 30 days is a wash sale. It is murkier for mutual funds and ETFs. The IRS has never issued bright-line guidance, but the conservative consensus among tax professionals is that two S&P 500 index funds from different providers (e.g., VOO from Vanguard and IVV from iShares) are not substantially identical, even though they track the same index, because they are issued by different companies with different legal structures. Selling a Total Stock Market fund and buying an S&P 500 fund is even safer.

The wash-sale rule also applies across accounts. If you sell a stock at a loss in your taxable brokerage account and your spouse buys the same stock in their IRA within the 61-day window, the loss is permanently disallowed — it does not even transfer to the IRA's basis. This is one of the few areas where an IRA's tax shelter actively hurts you. The fix is to either wait 31 days before repurchasing or to buy a clearly different replacement security.

Original HoldingSafe Replacement (No Wash Sale)Risky Replacement (Wash Sale Likely)
Vanguard Total Stock Market (VTI)S&P 500 ETF (VOO, IVV, SPY)Another total-market ETF from same issuer
Apple (AAPL)Microsoft (MSFT) or a tech-sector ETFApple shares within 30 days
Fidelity Total International (FTIHX)Vanguard Developed Markets (VEA)Another Fidelity international fund
Vanguard Total Bond Market (BND)iShares Aggregate Bond (AGG)Same fund in another account

A Worked Example: $500K Portfolio, $20K in Losses

To make the strategy concrete, consider a 45-year-old investor with a $500,000 taxable brokerage account that contains a mix of broad index funds and a handful of individual stocks picked in calmer markets. After a turbulent quarter, the portfolio has roughly $60,000 in unrealized long-term gains and $20,000 in unrealized long-term losses across two names that have been dragging on performance. The investor is in the 24% federal marginal bracket and has already realized $5,000 of long-term gains earlier in the year from a rebalance.

Without harvesting, the investor would owe long-term capital gains tax on the $5,000 of realized gains at the 15% LTCG rate — roughly $750 in federal tax. By harvesting the $20,000 in losses, the math changes substantially. First, the $5,000 of realized gains is fully offset, eliminating the $750 tax bill. Second, the remaining $15,000 of losses is applied to the $3,000 ordinary income offset, generating another $720 of savings at the 24% bracket. The remaining $12,000 of loss carryforward sits on the tax return for future years.

The cumulative federal tax benefit in year one is $1,470 ($750 + $720). Over the following four years, the $12,000 carryforward continues to offset $3,000 per year of ordinary income, generating another $720 × 4 = $2,880 in savings — assuming no further gains to absorb. Total benefit over five years: roughly $4,350 in federal tax saved, plus whatever state tax savings apply. State results vary; some states do not tax capital gains preferentially, others mirror federal treatment.

The cash freed up by harvesting can be immediately reinvested in a similar-but-not-identical security, keeping market exposure constant while locking in the loss. Over a 20-year horizon, the compounded value of that $4,350 in tax savings, reinvested at a 7% real return, exceeds $16,800 — a meaningful boost to terminal wealth from a single afternoon of selling and rebuying.

Direct Indexing and Automated Harvesting

Historically, tax-loss harvesting was a manual exercise: an investor reviewed their taxable account in December, identified obvious losers, sold them, and bought a similar replacement. The rise of direct indexing — platforms that hold the individual stocks of an index like the S&P 500 rather than an ETF wrapper — has automated and accelerated the process dramatically. Major brokerages and wealth-tech platforms now offer direct indexing with daily or weekly loss harvesting at every dip, including at the individual-stock level.

The mechanics are powerful. By owning 500 separate stocks instead of one ETF, the platform can harvest losses on any individual stock that drops below its cost basis — and there are almost always some, even in rising markets. Over a typical year, a direct-indexing strategy on the S&P 500 can harvest 8–15% of the portfolio's value in losses, depending on volatility. For a $1 million account, that is $80,000–$150,000 of losses generated per year, which can offset gains, offset $3,000 of ordinary income, and build a large carryforward pool for future years.

The catch is that direct indexing usually carries fees of 0.20%–0.40% per year on top of the underlying trading costs, and the harvested loss capacity tends to fade over time as the bull market lifts all the original positions above their basis. The "harvesting yield" of a new direct-indexing account is highest in the first two to three years and declines thereafter. Investors considering direct indexing should weigh the after-fee tax benefit against the simplicity and ultra-low cost of a plain index ETF — for portfolios below $250,000, the math often does not justify the complexity.

When Tax-Loss Harvesting Backfires

Tax-loss harvesting is not always a good idea. The most common backfire happens when the replacement security outperforms the original during the 30-day wash-sale window, and the investor is forced to either hold an inferior position or realize a new gain to switch back. Suppose you harvest a $20,000 loss on an S&P 500 ETF and buy a total-market ETF as the replacement. If the market rallies 5% over the next month, your replacement position has a $25,000 gain (on a $500K portfolio) that you cannot harvest without selling the replacement and incurring short-term capital gains tax.

The second backfire is more subtle but more dangerous: permanently lower cost basis. Every dollar of loss you harvest reduces the cost basis of the replacement position by the same dollar. Years later, when you finally sell the position in retirement, your gain — and the tax on that gain — is correspondingly higher. Tax-loss harvesting does not eliminate tax; it defers tax and converts capital-gains tax rates (15% or 20%) into ordinary-income tax savings (up to 37%) in the year of the harvest. The bet is that today's marginal rate is higher than your future LTCG rate, which is true for most working investors but not all.

The third backfire is purely behavioral. Investors sometimes harvest losses in panic during a market crash, sit in cash, and miss the recovery. Or they harvest and immediately repurchase the same security, triggering a wash sale and forfeiting the deduction. Or they overtrade, churning the account and generating short-term gains that wipe out the harvested losses. The discipline of harvesting only when the replacement security is genuinely different — and only when you intend to stay invested — is what separates successful harvesters from those who pay more tax, not less.

A Year-Round Harvesting Playbook

The most effective tax-loss harvesting is not a December ritual but a year-round discipline. Markets dip constantly, and waiting until year-end often means missing the best harvesting opportunities — or chasing them after the rebound. A practical playbook looks like this: review the taxable account monthly for any position with an unrealized loss greater than $1,000 (or whatever threshold justifies the trading effort). When a loss appears, sell the position, immediately buy a similar-but-not-identical replacement, and log the harvested loss on a running spreadsheet.

Pay special attention during market corrections of 10% or more. These events create broad-based losses that can be harvested across many positions simultaneously, often generating enough loss to offset several years of ordinary income. After a correction, the harvested cash can be redeployed into the same replacement security across the entire portfolio, restoring market exposure while locking in the deduction. The 2022 bear market, for example, allowed disciplined harvesters to bank $50,000–$100,000+ in losses on a $1M portfolio — a once-in-a-decade opportunity.

Coordinate harvesting with rebalancing. When your target asset allocation drifts and you need to sell winners to rebalance, that is a natural moment to harvest losers in the same transaction, offsetting the realized gains. Also coordinate with charitable giving: appreciated stock can be donated to avoid the capital gain entirely, while losses can be harvested for the deduction — a two-part play that maximizes after-tax wealth. Finally, keep meticulous records of every harvest: date, security, loss amount, replacement security, and wash-sale window close date. The IRS can ask for this documentation years later, and a clean log makes tax season painless.

  • Monthly review: Scan for losses over $1,000; harvest with a non-substantially-identical replacement.
  • Correction playbook: Harvest aggressively during 10%+ market drops; redeploy cash into replacement securities immediately.
  • Rebalance coordination: Pair gain realization with loss harvesting in the same transaction to net out tax impact.
  • Charitable pairing: Donate appreciated winners (no gain) and harvest losers (deduction) in the same year.
  • Record keeping: Maintain a spreadsheet of every harvest with date, security, loss, replacement, and wash-sale window close.

Frequently Asked Questions

Can I harvest losses inside my IRA or 401(k)?

No. Tax-advantaged accounts shelter investment activity from current taxation, which means losses inside them are not deductible on your tax return. Tax-loss harvesting only works inside a taxable brokerage account. This is one of the strongest reasons to maintain a taxable account alongside your retirement accounts, even after maxing out the tax-advantaged options.

What happens to my harvested loss if I have no capital gains this year?

You can still use up to $3,000 of the loss to offset ordinary income (wages, interest, non-qualified dividends) in the current year, and any remainder carries forward indefinitely to future tax years. There is no expiration on the carryforward. Each future year, the same waterfall applies: offset gains first, then up to $3,000 of ordinary income, then carryforward the rest.

How do I avoid a wash sale if I want to buy back the same stock?

You must wait at least 31 days after the sale before repurchasing the same security. The wash-sale window is 30 days before the sale through 30 days after — a 61-day total window. If you cannot wait, buy a clearly different security: a different individual stock in the same sector, a different ETF from a different provider tracking a different (but correlated) index, or a sector ETF that includes your stock.

Is tax-loss harvesting worth it for a small portfolio?

For portfolios under $50,000, the absolute tax savings are usually too small to justify the trading effort and wash-sale complexity. The break-even depends on your marginal tax rate and the volatility of your holdings, but as a rough rule, taxable portfolios of $100,000 or more benefit meaningfully from a harvesting discipline, and portfolios of $500,000+ benefit substantially — especially through market corrections.

Does tax-loss harvesting help with the 3.8% Net Investment Income Tax?

Yes. Capital losses reduce net investment income, which is the base for the 3.8% NIIT that applies to high earners with modified AGI over $200,000 (single) or $250,000 (married filing jointly). A harvested loss can therefore generate additional savings of 3.8% on top of the ordinary-income or capital-gains rate it offsets, pushing the effective savings rate on a $3,000 ordinary offset to 27.8% for a 24% bracket investor subject to NIIT.

Should I harvest losses in December only?

No. December is the traditional harvesting season, but waiting until year-end means missing dips earlier in the year that often rebound before December. The most effective harvesting happens year-round, especially during market corrections. December is a useful checkpoint to ensure you have captured all available losses before the tax year closes, but it should not be the only harvesting moment.

Key Takeaways

  • Tax-loss harvesting converts paper losses into real deductions. Sell a losing position, capture the loss, and stay invested with a similar replacement.
  • The $3,000 ordinary income offset is the crown jewel. At a 24% bracket, that is $720 of federal tax savings per year, every year, until the carryforward is exhausted.
  • The wash-sale rule is unforgiving. Avoid repurchasing a "substantially identical" security within 30 days before or after the sale, including across all your accounts and your spouse's accounts.
  • Harvesting defers tax, it does not eliminate it. The replacement position has a lower cost basis, so future gains — and future tax — are correspondingly higher. The bet is that today's ordinary rate exceeds your future LTCG rate.
  • Direct indexing amplifies the strategy. Owning individual stocks instead of an ETF allows daily harvesting at the stock level, often generating 8–15% of portfolio value in losses per year — but watch the fees.
  • Harvest year-round, not just in December. Monthly reviews plus an aggressive correction playbook capture the best opportunities that the market actually offers.

Put this into practice

Run the numbers yourself with our free tax calculators.

Explore tax calculators →