How Losing Trades Can Actually Lower Your Tax Bill: A Practical Guide to Tax-Loss Harvesting
Photo: Governor Tom Wolf from Harrisburg, PA, CC BY 2.0, via Wikimedia Commons
When a Loss Becomes an Asset
Most investors view a declining position with dread. The instinct is to hold on, hope for a recovery, and avoid locking in the pain. But seasoned investors understand that a realized loss is not simply a failure — it is a financial instrument. Used correctly, it can offset taxable gains, reduce your overall tax liability, and improve your portfolio's after-tax performance without meaningfully altering your long-term investment thesis.
This is the foundation of tax-loss harvesting: a systematic practice of selling securities that have declined in value, capturing that loss on paper, and applying it against gains realized elsewhere in your portfolio. The strategy is entirely legal, widely used by institutional investors and financial advisors, and accessible to any individual investor willing to approach it with discipline.
The Mechanics: How Offsetting Works
The Internal Revenue Service allows investors to use capital losses to offset capital gains dollar for dollar. If you sold a position in a technology stock earlier in the year and realized a $6,000 gain, and you currently hold another position sitting at a $4,000 unrealized loss, selling that second position reduces your net taxable gain to just $2,000.
The tax treatment depends on how long you held each position:
- Short-term gains (assets held one year or less) are taxed as ordinary income, which can reach 37% for higher earners.
- Long-term gains (assets held more than one year) are taxed at preferential rates of 0%, 15%, or 20%, depending on your income.
The IRS pairs losses against gains of the same type first — short-term losses offset short-term gains, and long-term losses offset long-term gains. After that netting process, any remaining losses can offset the other type. If your total losses exceed your total gains for the year, you may deduct up to $3,000 of net capital losses against ordinary income, with any remaining balance carried forward indefinitely into future tax years.
For an investor in the 22% federal income bracket who offsets $10,000 in short-term gains, the direct savings could reach $2,200 in federal taxes alone — before accounting for state income taxes.
A Step-by-Step Example
Consider an investor who, by October, has accumulated the following activity in a taxable brokerage account:
- Sold shares of a consumer staples ETF: +$8,500 long-term gain
- Sold shares of a software company: +$3,200 short-term gain
- Currently holds an energy sector fund with an unrealized loss of -$5,000 (held 14 months)
- Currently holds a small-cap fund with an unrealized loss of -$2,800 (held 8 months)
By selling both losing positions before December 31, the investor can offset the $5,000 long-term loss against the $8,500 long-term gain, reducing it to $3,500. The $2,800 short-term loss offsets the $3,200 short-term gain, leaving only $400 in short-term gains. The total taxable gain drops from $11,700 to $3,900 — a reduction of $7,800 in taxable income.
Depending on the investor's tax bracket and state of residence, this single year-end exercise could produce thousands of dollars in savings.
The Wash-Sale Rule: The Trap That Catches Most DIY Investors
Here is where many self-directed investors stumble. The IRS enforces a provision known as the wash-sale rule, which disallows a loss deduction if the investor purchases a "substantially identical" security within 30 days before or after the sale. The window is 61 days total — 30 days prior, the day of the sale, and 30 days after.
In practical terms, if you sell shares of an S&P 500 index fund at a loss and repurchase the same fund within that 61-day window, the IRS will disallow the loss. The disallowed amount is not lost permanently — it adjusts your cost basis in the repurchased shares — but it defeats the purpose of harvesting the loss in the current tax year.
The rule applies to IRAs and Roth IRAs as well. If you sell a security at a loss in a taxable account and your spouse simultaneously holds the same security in a retirement account, the wash-sale rule can still be triggered. Many investors are unaware of this cross-account dimension.
The practical workaround is to replace the sold security with a similar but not substantially identical alternative. For example:
- Selling a Vanguard S&P 500 ETF and purchasing a Schwab S&P 500 ETF may trigger the rule (same index, highly similar composition).
- Selling an S&P 500 fund and purchasing a total U.S. market fund maintains broad equity exposure while likely avoiding the wash-sale classification.
- Selling a technology sector ETF and purchasing a growth-oriented broad market ETF may provide comparable exposure without violating the rule.
The IRS has not published a definitive list of what constitutes "substantially identical," so when in doubt, consult a qualified tax professional.
Which Accounts Are Eligible — and Which Are Not
Tax-loss harvesting applies exclusively to taxable brokerage accounts. Gains and losses inside traditional IRAs, Roth IRAs, 401(k) plans, and other tax-advantaged accounts do not produce taxable events — there is nothing to offset. This is one reason why asset location strategy matters: holding higher-turnover or more volatile positions in taxable accounts can create greater opportunity for harvesting losses, while long-term core holdings may be better suited to tax-advantaged wrappers.
Within a taxable account, the strategy is most effective for investors who:
- Have realized significant capital gains during the year
- Hold a diversified portfolio with multiple positions, increasing the probability that some will decline
- Are in a moderate-to-high tax bracket, where the marginal savings are most meaningful
Common Mistakes to Avoid
Harvesting losses in isolation. Selling a position simply to realize a loss, without a clear plan for reinvestment, can leave you underinvested during a market recovery. Always identify a replacement security before or immediately after executing the sale.
Ignoring transaction costs. Frequent trading to capture small losses may not be economical once commissions and bid-ask spreads are factored in, though the proliferation of commission-free platforms has largely reduced this concern.
Waiting until late December. Year-end harvesting is common, but monitoring your portfolio throughout the year allows you to capture losses when they are largest — not just when the calendar prompts you.
Overlooking state taxes. Federal savings are only part of the picture. Investors in high-tax states such as California or New York may find that state-level capital gains taxes make the strategy even more valuable.
Building Tax Efficiency Into Your Blueprint
Tax-loss harvesting is not a speculative tactic — it is a structural element of a well-engineered investment plan. The goal is not to sell your best ideas or abandon a sound long-term strategy. It is to extract every available dollar of efficiency from the portfolio you already hold.
The investors who build lasting wealth do not simply chase the highest gross returns. They pay careful attention to what they keep after taxes, fees, and inflation. In that context, a disciplined harvesting practice — executed with full awareness of wash-sale rules, account eligibility, and reinvestment strategy — is one of the most reliable, repeatable advantages available to individual investors.
Used consistently, it is not a workaround. It is part of the blueprint.