Tax-Loss Harvesting Explained: A Legal Strategy to Reduce Your Tax Bill

Selling investments at a loss to reduce your taxes sounds counterintuitive — but done correctly, tax-loss harvesting can save you thousands per year without changing your portfolio strategy.

Tax-Loss Harvesting Explained: A Legal Strategy to Reduce Your Tax Bill

Advertisement

What Tax-Loss Harvesting Is

Tax-loss harvesting is the practice of selling investments that have declined in value, realizing the capital loss, and using that loss to offset capital gains or ordinary income on your tax return. You then reinvest the proceeds into a similar (but not identical) investment to maintain your portfolio's risk/return profile. The result: your investment strategy stays essentially the same, but your tax bill decreases.

Federal tax law allows you to use realized capital losses to offset capital gains dollar-for-dollar. If your losses exceed your gains, you can deduct up to $3,000 of net capital losses against ordinary income per year. Any remaining losses carry forward to future tax years indefinitely.

How It Works in Practice

Let's say you own a total stock market index fund that you purchased for $50,000, and it's currently worth $42,000 — an $8,000 unrealized loss. You sell the fund, realizing the $8,000 loss. You then immediately purchase a different but similar fund — say, an S&P 500 index fund or a large-cap value fund — to maintain your exposure to the stock market.

On your tax return, you can use that $8,000 loss to offset $8,000 in capital gains from other investments. If you don't have capital gains, you can deduct $3,000 against your ordinary income this year and carry the remaining $5,000 forward to future years. At a 24% marginal tax rate, that $3,000 deduction saves you $720 in taxes. Over years of consistent harvesting, these savings compound.

The Wash Sale Rule

The IRS has one critical rule that limits tax-loss harvesting: the wash sale rule. If you sell a security at a loss and buy a "substantially identical" security within 30 days before or after the sale, the loss is disallowed. This means you can't sell a Vanguard Total Stock Market fund, claim the loss, and buy it back the next day — or buy a Fidelity Total Stock Market fund, since it tracks the same index and would likely be considered "substantially identical."

The workaround: buy a similar but not identical replacement. If you sell a total stock market fund, you can buy an S&P 500 fund, a large-cap growth fund, or a total international stock fund. These are different enough to avoid the wash sale rule while maintaining similar market exposure. After 31 days, you can switch back to your original fund if you prefer it.

When Tax-Loss Harvesting Makes the Most Sense

Tax-loss harvesting is most valuable when: you have a high marginal tax rate (the higher your rate, the more each dollar of deduction saves you), you have realized capital gains to offset (from selling other investments, receiving capital gains distributions from mutual funds, or selling a business), you're in a down market (more opportunities to harvest losses), and you have a taxable brokerage account (this strategy doesn't work in tax-advantaged accounts like 401(k)s and IRAs because gains aren't taxed).

It's less valuable when: your marginal tax rate is low, you don't have capital gains to offset, or your unrealized losses are minimal. And it's never worth harvesting a loss just for the tax benefit if it means selling out of a position you believe will recover and disrupting a sound long-term investment strategy.

The $3,000 Deduction and Carryforward

Capital losses first offset capital gains dollar-for-dollar. If your losses exceed your gains, you can deduct up to $3,000 of the excess against ordinary income each year — a real reduction in your taxable wages, not just investment income. Anything beyond that does not disappear: it carries forward indefinitely to future tax years, where it can offset future gains or another $3,000 of ordinary income annually. A large loss in a bad market year can therefore keep lowering your tax bill for years to come.

Advertisement

Who Should Not Bother

Tax-loss harvesting only helps in taxable brokerage accounts. Inside a 401(k), traditional IRA, or Roth IRA, there are no capital gains taxes to offset, so harvesting losses there accomplishes nothing. It also matters less if you are in the 0% long-term capital gains bracket, and the paperwork can outweigh the benefit on very small balances. Never let the tax tail wag the investment dog — selling a holding purely for the deduction only makes sense if you would be comfortable owning a similar (but not "substantially identical") investment in its place.

Keep Clean Records

Tax-loss harvesting only works at tax time if your records are accurate. Your brokerage reports cost basis on Form 1099-B, but you are responsible for tracking wash-sale adjustments across accounts the broker cannot see — including a spouse's accounts and IRAs, which the IRS treats as related. Choosing the "specific identification" cost-basis method (rather than the default first-in-first-out) lets you sell your highest-cost lots to maximize the harvested loss. If you harvest across multiple accounts or reinvest dividends automatically, consider reviewing the year's transactions before December so an accidental wash sale does not quietly disallow the loss you were counting on.

Remember: It's Often a Deferral, Not a Gift

Be clear-eyed about what harvesting really does. When you sell at a loss and buy a similar investment, your new holding has a lower cost basis — so if it later recovers and you sell, you will owe tax on a larger gain. In many cases you are deferring tax to the future, not erasing it. That deferral is still valuable (you keep and invest the tax savings in the meantime, and rates may be lower later), and losses used against ordinary income are a genuine benefit. But treat harvesting as a timing and cash-flow tool, not a way to make taxes vanish entirely.

Automated Tax-Loss Harvesting

Several robo-advisors — Wealthfront, Betterment, and Schwab Intelligent Portfolios — offer automated tax-loss harvesting that continuously monitors your portfolio for harvesting opportunities and executes trades automatically while maintaining your target asset allocation. Wealthfront, in particular, pioneered "direct indexing" for larger accounts, which buys individual stocks instead of ETFs and harvests losses at the individual security level for even greater tax savings.

For most investors with taxable accounts above $50,000, automated tax-loss harvesting can add 0.5–1.5% to your after-tax returns annually. Over decades, this tax alpha compounds meaningfully. If you're managing a taxable portfolio yourself, review it quarterly for harvesting opportunities — and especially during market downturns, when opportunities are most abundant.

Carrying Forward Capital Losses Across Tax Years

IRS tax law limits capital loss deductions against ordinary income to $3,000 per calendar year ($1,500 if married filing separately). However, unused capital losses do not expire.

If you harvest $15,000 in net realized losses in a down market year, you apply $3,000 to offset income in Year 1. The remaining $12,000 automatically carries forward indefinitely to offset future stock gains or ordinary income in subsequent tax years ($3,000/year for Years 2 through 5).

Automated Tax-Loss Harvesting via Robo-Advisors

Platforms like Betterment and Wealthfront perform automated tax-loss harvesting daily using proprietary algorithms. They monitor daily price movements and automatically execute trades whenever losses exceed pre-set thresholds (e.g. $50), reallocating capital across paired ETFs to harvest tax deductions while keeping portfolio risk constant.

Specific Identification vs. Average Cost Basis Accounting

When selling shares of stock or mutual funds for tax-loss harvesting, ensure your brokerage accounting method is set to Specific Identification (SpecID) rather than Default Average Cost.

Spec-ID allows you to select the exact share lots that carry the highest cost basis and highest tax losses, maximizing your immediate tax deduction rather than blending share prices across earlier lower-priced purchases.

Harvesting Short-Term vs. Long-Term Capital Losses

The IRS separates capital gains and losses into Short-Term (held 1 year or less) and Long-Term (held over 1 year). Tax-loss harvesting rules require matching short-term losses against short-term gains first (taxed up to 37%), making short-term tax-loss harvesting significantly more valuable for reducing immediate tax bills.

Tax-Loss Harvesting Exclusions in Tax-Advantaged Retirement Accounts

Tax-loss harvesting rules apply exclusively to taxable brokerage accounts. Realizing capital losses inside tax-advantaged accounts like a 401(k), 403(b), Traditional IRA, or Roth IRA generates zero tax deductions, as transactions inside retirement accounts are completely sheltered from annual capital gains reporting.

Managing Dividend Reinvestment During Tax-Loss Harvesting Windows

If an ETF or stock pays a dividend that automatically reinvests into new fractional shares within the 30-day wash-sale window, that small automatic purchase triggers a partial wash-sale. Disabling automatic dividend reinvestment (DRIP) during tax-loss harvesting cycles prevents accidental tax deduction disqualification.

Tax-Loss Harvesting in Volatile Market Environments

During broad market downturns, systematic tax-loss harvesting allows investors to convert unrealized paper losses into permanent tax assets. Cumulatively harvesting losses across multiple down market cycles builds a tax loss reserve that can offset decades of future capital gains or annual income tax liabilities.

Tax-Loss Harvesting Exclusions in Cryptocurrency and Digital Assets

While standard equity transactions are subject to the Wash-Sale Rule, current IRS tax code treats digital assets as property, providing unique tax-loss harvesting flexibility for crypto assets. Consult a CPA regarding current statutory wash-sale rules for digital property.

Maintaining clear digital transaction logs across all taxable brokerage accounts simplifies year-end tax reporting and ensures your CPA accurately claims all harvested capital loss tax deductions.

Advanced Tax-Loss Harvesting Strategies for High Net Worth Investors

For investors in high federal tax brackets (35% or 37%), tax-loss harvesting becomes a major wealth preservation tool. Beyond simple ETF-for-ETF swaps, sophisticated investors employ **Direct Indexing** and **Portfolio Transition Management**.

Direct Indexing: Harvesting Individual Stock Losses Within Index Portfolios

When you buy an S&P 500 index fund, you purchase a single composite security. If the overall S&P 500 index rises 10% in a year, you cannot harvest losses—even if 150 individual stocks within the index dropped significantly in value.

Direct Indexing solves this by purchasing the 500 individual stocks directly in your brokerage account in their exact index proportions. If 120 stocks drop during a market rally, automated software sells those specific losing stocks to harvest thousands in tax deductions while purchasing correlated substitute stocks to maintain exact index tracking.

Tax-Loss Harvesting Decision Flowchart

Market Scenario Action Required Tax Benefit Captured
Realized Capital Gains Exist Harvest losses equal to total gains Wipes out 100% of capital gains tax liability
No Capital Gains Exist Harvest up to $3,000 in losses Offsets ordinary income (saves up to $1,110 in taxes)
Losses Exceed $3,000 Threshold Harvest total loss amount $3k applied this year; remaining balance carries forward indefinitely

Related Reading: Check out our in-depth 2026 Mortgage Rate Strategy for step-by-step guidance.

Advertisement