"Capital Gains Taxes and Tax-Loss Harvesting: The Complete Guide"
The difference between short-term and long-term capital gains can double your tax bill. Tax-loss harvesting can erase it. Here's how both actually work.
Once you have a taxable brokerage account — which anyone building wealth seriously should, beyond just 401(k) and IRA — you are in the capital gains tax game. And the capital gains system is, genuinely, one of the more favorable corners of the U.S. tax code. If you understand it, you can permanently lower your tax bill without changing your investment strategy at all.
Most people don't understand it. They sell holdings on emotion, trigger short-term gains, and hand the IRS money that a simple 12-month hold or a well-timed tax-loss harvest would have saved them. On the buy-side and in deal tax structuring, this kind of thing is treated as a first-class optimization problem — we'd build models specifically to minimize the after-tax economics of transactions. You should apply the same lens to your personal portfolio. The rules are public. The optimization is legal. Most people just don't know the game is being played.
Let's walk through it.
What's the Difference Between Short-Term and Long-Term Capital Gains?
A capital gain is what you make when you sell an investment for more than you paid for it. The IRS taxes capital gains at two very different rates, depending entirely on how long you held the asset.
Short-term capital gains (held ≤ 1 year): Taxed as ordinary income. Same rates as your salary — 10%, 12%, 22%, 24%, 32%, 35%, or 37% depending on your bracket.
Long-term capital gains (held > 1 year): Taxed at preferential rates: 0%, 15%, or 20%, depending on your total taxable income.
2026 long-term capital gains rate thresholds (single filer):
- 0% rate: taxable income up to $49,450
- 15% rate: taxable income $49,450–$545,500
- 20% rate: taxable income above $545,500
Married filing jointly:
- 0% rate: up to $98,900
- 15% rate: $98,900–$613,700
- 20% rate: above $613,700
High earners also owe a 3.8% Net Investment Income Tax (NIIT) on top of capital gains above $200K single / $250K MFJ. Add state taxes separately.
Why Does Holding for Over a Year Matter So Much?
Because the tax difference is enormous. Let's run real numbers.
You bought $10,000 of an index fund. Two years later, it's worth $15,000 — a $5,000 gain.
If you sell at 11 months (short-term) in the 32% bracket:
- Tax: $5,000 × 32% = $1,600
- After-tax gain: $3,400
If you hold for 13 months (long-term) in the same 32% bracket, paying the 15% rate:
- Tax: $5,000 × 15% = $750
- After-tax gain: $4,250
Same investment. Same gain. Two extra months of holding. You keep $850 more. On a larger position, this scales dramatically. A $50,000 gain held one day too short instead of one day past a year costs you $8,500 in extra tax.
The most common short-term trap: buying stock in April 2025 and selling in March 2026. You miss long-term by a few weeks. If you're within a month or two of the 1-year mark and there's no emergency, wait it out. The tax savings usually exceed any short-term market movement you'd capture by selling early.
What Is Tax-Loss Harvesting and How Does It Work?
Tax-loss harvesting is the practice of intentionally selling investments that are down — "harvesting" the losses — to offset capital gains (and a limited amount of ordinary income) for the year. It converts temporary paper losses into permanent tax savings without actually changing your long-term portfolio.
The mechanics:
1. You have a taxable brokerage account with positions that are down. Say $10,000 of VTSAX bought at $120/share, now worth $100/share — a $2,000 unrealized loss.
2. You sell the position, realizing the $2,000 loss.
3. You immediately buy a similar but not "substantially identical" fund — say VTI (the ETF version of total market) or FZROX (Fidelity total market) — with the proceeds.
4. You now have $2,000 of realized capital losses to offset this year's gains.
5. Your portfolio exposure is essentially unchanged. You're still in a total U.S. stock fund.
How the offset works:
Realized losses first offset realized gains, dollar-for-dollar. Short-term losses offset short-term gains first; long-term losses offset long-term gains first. Leftover losses carry over to offset the other type.
If you have any net loss remaining after offsetting all gains, you can deduct up to $3,000 per year against ordinary income. Anything beyond $3,000 carries forward indefinitely to future years.
Simple example:
- You have $5,000 in short-term gains, $10,000 in long-term gains, and $4,000 in harvested losses.
- $4,000 losses offset $4,000 of short-term gains first (highest-taxed bucket).
- Remaining taxable gains: $1,000 short-term + $10,000 long-term.
- If short-term would have been taxed at 32% and long-term at 15%, you just saved $1,280 on this year's taxes. Over 30 years of disciplined harvesting, this compounds meaningfully.
What Is the Wash Sale Rule?
This is the single most important rule to understand before you start harvesting. Get it wrong and your harvest doesn't count.
The rule: If you sell a security at a loss and then buy the same or a "substantially identical" security within 30 days before or after the sale, the IRS disallows the loss for tax purposes. The 61-day window (30 before + day of + 30 after) is the wash sale window.
What counts as substantially identical:
- The same exact security (obviously): selling VTI and buying VTI back.
- Contracts or options to buy the same security.
- IRS hasn't definitively ruled on this, but funds tracking the same index are considered higher risk. Example: selling VTI (Vanguard Total Market ETF) and buying VTSAX (Vanguard Total Market Mutual Fund) tracks the same index — treat this as likely substantially identical and avoid.
What does not count as substantially identical:
- Similar but different-index funds. Selling VTI (total market) and buying VOO (S&P 500) is generally considered safe because they track different indexes. Some gray area exists.
- Similar-exposure funds from different providers. Selling Vanguard Total Market (VTI) and buying iShares Core S&P Total Market (ITOT) is widely practiced and treated as acceptable.
- A fund in the same asset class but meaningfully different composition.
The common safe harvesting pairs:
- VTI ↔ ITOT (both total U.S. market, different providers)
- VOO ↔ IVV (both S&P 500, different providers)
- VXUS ↔ IXUS (both total international, different providers)
- BND ↔ AGG (both total bond, different providers)
Wash sales also apply across accounts. If you sell a stock at a loss in your taxable brokerage and buy the same stock in your IRA within 30 days, it's still a wash sale. The IRS considers these the same "taxpayer." This trips people up constantly.
Dividend reinvestment is a wash sale trap. If you're harvesting losses, turn off automatic dividend reinvestment on the position you're selling for at least 30 days. A $30 dividend reinvestment on a stock you just sold for a loss triggers a wash sale on $30 worth of the loss.
How Do Capital Gains Interact with Your Ordinary Income?
This is the part most people miss. Long-term capital gains are taxed at their own preferential rates, but they stack on top of your ordinary income for purposes of determining which rate applies.
Simplified example: You earn $60,000 in wages and have $20,000 of long-term capital gains.
- Your ordinary income ($60,000) is taxed normally via the ordinary income brackets.
- Your long-term capital gains ($20,000) stack on top. The first portion of those gains fills the space up to the 0%/15% threshold.
- In 2026 (single filer), the 0% cap gains threshold ends at $49,450 of total taxable income. Since your ordinary income already exceeds that, all $20,000 of your LTCG is taxed at the 15% rate.
The "0% bracket gift": If your total taxable income (wages + gains) is below $49,450 single / $98,900 MFJ, your long-term gains are taxed at 0%. This is a massive and underused planning opportunity for:
- Early retirees living off savings
- Sabbatical years
- Years between jobs
- Graduate school years
- Parental leave years
If you have a low-income year and appreciated long-term holdings, realizing gains up to the 0% threshold is free money in tax terms. You can sell, pay zero federal tax on the gain, and immediately buy the same security back (the wash sale rule doesn't apply to gains — only losses). You've now "reset" your cost basis higher without paying tax. This is called tax-gain harvesting, and it's the opposite-side play to tax-loss harvesting.
How Do You Use Tax-Loss Harvesting Without Disrupting Your Strategy?
The mistake people make is thinking tax-loss harvesting requires active trading or constant monitoring. It doesn't. Here's the low-effort playbook.
Step 1: Only harvest in taxable brokerage accounts. 401(k), Traditional IRA, Roth IRA, HSA — none of these accounts generate capital gains tax, so there's nothing to harvest. Losses in these accounts are just losses.
Step 2: Identify "harvestable" positions once or twice a year. Open your brokerage, filter for positions with a red unrealized loss column. Any position down more than, say, $500-$1,000 is worth considering. Anything smaller often isn't worth the paperwork and wash sale attention.
Step 3: Sell the losing position. Immediately buy the substitute. Pick a substitute from the safe pairs list above. Most brokerages execute both trades in minutes; your market exposure is effectively unchanged.
Step 4: Wait 31+ days before rotating back if you want to return to the original security. Or just stay in the substitute — they track nearly identical exposure.
Step 5: Track the realized loss so you can deduct it at tax time. Most brokerages report this on a 1099-B automatically. Your tax software (or CPA) handles the rest.
When to harvest:
- Market correction or crash: the best harvesting opportunities come when broad markets drop. Position yourself to harvest during a downturn, not wait for one.
- Late-year review: December is traditional harvesting season. Look at all unrealized losses and realize them before year-end.
- After a major loss event: a single stock or sector crashes hard. Realize the loss, rotate to a broader fund.
Robo-advisors do this automatically. Wealthfront, Betterment, and Schwab Intelligent Portfolios run daily tax-loss harvesting across your accounts. If you don't want to manage this manually, using a robo-advisor for your taxable brokerage is a valid choice — fees typically run 0.25-0.40%/year, and estimated harvesting benefits can offset or exceed that for high-income investors.
When Should You Not Harvest Losses?
When the wash sale would trigger. If you'll be buying back the same security within 30 days (automated 401(k) contributions buying similar funds, scheduled Roth IRA purchases, dividend reinvestments), pause those or use a different substitute.
When you're in the 0% long-term capital gains bracket. If your income is low enough that long-term gains are taxed at 0%, harvesting losses doesn't help you — you already owe zero tax on gains. Use tax-gain harvesting instead: realize gains up to the threshold, pay nothing, and reset cost basis higher.
When the position is below $500-$1,000 of loss. Transaction tracking effort exceeds the tax benefit. Let small losses ride.
When it distorts your asset allocation. If the "substitute" fund is meaningfully different exposure than what you sold, you've traded tax savings for portfolio drift. Stay within your target allocation (see bonds and asset allocation by age for the framework).
When you're approaching withdrawal. Retirees drawing down portfolios may prefer to realize gains strategically rather than harvest losses. The planning calculus shifts once you're in distribution mode.
What's the Bottom Line?
The capital gains system rewards patience. A 12-month hold can literally cut your tax bill in half. Tax-loss harvesting, done right, turns portfolio drawdowns into permanent tax savings. Tax-gain harvesting, in low-income years, lets you realize gains at 0% federal tax.
These aren't aggressive strategies. They're rule-following. The IRS publishes the rules; the optimization is entirely legal; the only thing standing between you and the benefit is understanding the mechanics.
The minimum viable playbook for most people:
1. Hold taxable positions at least 12 months and a day before selling, whenever possible.
2. Turn off dividend reinvestment in taxable accounts if you plan to harvest — or be aware of the wash sale risk if you don't.
3. Once or twice a year, scan for harvestable losses. Sell, rotate to a substitute, move on.
4. Know your 0% LTCG threshold. In low-income years, realize gains strategically.
5. Coordinate across accounts. Wash sales apply across all accounts, including IRAs and spouses' accounts.
For how capital gains interact with your broader tax strategy, see tax-advantaged accounts explained and the Tax-Advantaged Accounts Cheat Sheet. For the foundational piece on which bracket you're actually in, see what tax bracket am I actually in.
The rules are the rules. Once you know them, the math works for you instead of against you.
Curious where capital gains strategy fits into your full financial picture? The Pulse scores 5 dimensions of your financial health in 3 minutes and tells you where the real leverage is — free, no sign-up.
Get smarter with your money every week.
Join The Money Muse newsletter — actionable insights, zero fluff.
Free weekly newsletter. Unsubscribe anytime.
You're in! Check your inbox.