A Tax Bill You Can See Coming
Say you hold $2 million of company stock with a cost basis of $400,000. Maybe it came from years of RSU vests, or from exercising options early. Either way, you have $1.6 million of unrealized long-term gain.
Here is what selling it all in one year might cost at the federal level, assuming your other income already puts you in the top capital gains bracket:
- Long-term capital gains: $1,600,000 at 20 percent = $320,000
- Net investment income tax (NIIT): $1,600,000 at 3.8 percent = $60,800
- Federal total: about $380,800
In 2026, the 20 percent rate starts at taxable income of $545,500 for single filers and $613,700 for married couples filing jointly. State tax comes on top where it applies.
You cannot make that tax disappear. You may be able to reduce it. Two of the main tools are tax loss harvesting and direct indexing, and both work best when you set them up well before you sell.
Tax Loss Harvesting Basics
Tax loss harvesting means selling investments that have fallen below what you paid. The realized losses offset realized gains dollar for dollar. Realize $100,000 of losses and $100,000 of gains in the same year, and the net taxable gain is zero.
After the sale, you buy something similar, but not substantially identical, to stay invested. You might swap one large company for a competitor in the same sector, or one fund for another that tracks a different index.
The Wash Sale Rule
You cannot claim the loss if you buy a substantially identical security within 30 days before or after the sale (IRC Section 1091). That is a 61-day window including the sale date. It also applies to purchases in your spouse's accounts and your IRAs, and reinvested dividends can trigger it.
In most cases a wash sale does not erase the loss permanently. The disallowed amount is added to the basis of the replacement shares. That delays the benefit, which can defeat the point of harvesting in a year you need it. The exception is a purchase in an IRA or Roth IRA. Your basis does not increase, so the loss is not recovered.
Harvesting Defers Tax, It Does Not Cancel It
When you sell a loser and buy a replacement, your new basis is lower. That means a larger gain later. In most cases the benefit is deferral, plus the chance that the gain is taxed at a lower rate or never realized. Keep that in mind when you read any projected savings.
Why Traditional Harvesting Falls Short
You can only harvest losses that exist. Take a $500,000 diversified portfolio that is up 15 percent. The harvestable losses might be $15,000 to $25,000 in a few positions that lagged.
Against a $1.6 million gain, $20,000 of harvested losses reduces federal tax by about $4,760 at the combined 23.8 percent rate. That is real money. It does not move the total much. And after a strong market year, almost every fund in an ETF portfolio is up, so there may be nothing to harvest.
Direct Indexing
Direct indexing tries to fix this by giving you more places to find losses.
Instead of buying one S&P 500 ETF with one cost basis, you buy the individual stocks in the index, weighted to track it. You now own hundreds of separate tax lots.
Even in a rising market, many individual stocks fall at some point during the year. With direct indexing, you can sell those losers, realize the loss, and replace them with similar stocks, within the wash sale rules.
Compared with an ETF, a direct indexing portfolio may generate more harvestable losses, especially early on. How much depends on market conditions, how far individual stocks diverge from each other, and how the platform is run. Published estimates vary widely, and results are not guaranteed.
A Hypothetical Example
The following is for illustration only. It is not a projection and does not reflect any client. Suppose you fund a $1 million direct indexing portfolio tracking the S&P 500, and it harvests the following losses over three years:
| Year | Market Return | Losses Harvested | Cumulative Losses |
|---|---|---|---|
| Year 1 | +14% | $75,000 | $75,000 |
| Year 2 | +9% | $45,000 | $120,000 |
| Year 3 | +18% | $30,000 | $150,000 |
Notice the harvest shrinks each year. That is typical. As replacement stocks are bought at current prices, there are fewer new losses to find.
Now say you sell $500,000 of company stock with a $100,000 basis, a $400,000 gain. Your $150,000 of harvested losses offsets part of it.
- Gain offset by losses: $150,000
- Federal tax reduction: $150,000 at 23.8 percent = $35,700
- Remaining gain: $250,000, still taxable
That is a reduction of more than a third of the tax in this example. It also comes with a lower basis in the portfolio, so a later sale of that portfolio would carry more gain.
Start Before You Need It
This is the main point. Losses build up over time. If you open a direct indexing account the same quarter you plan to sell, the individual stocks have not had time to move, and there may be little to harvest.
A reasonable timeline:
- Two to three years before a planned sale: open the direct indexing portfolio.
- Along the way: the platform harvests losses as they appear.
- In the year of the sale: apply the accumulated losses against the gain.
If an IPO, a secondary sale window, or a job change is on the horizon, the clock may already be running.
Other Tools to Layer In
Direct indexing rarely works alone. Other levers can be combined with it:
- Donating appreciated shares. Giving shares to a donor-advised fund can avoid the gain on them and may produce a deduction. Using the earlier numbers, shares worth $200,000 carry $160,000 of gain (80 percent of value, since basis is 20 percent). Avoided tax on that gain: $160,000 at 23.8 percent = $38,080. For 2026, the tax benefit of itemized deductions is capped at 35 percent for the 37 percent bracket, so the deduction might be worth up to $70,000. Deduction limits (generally 30 percent of AGI for appreciated stock given to a donor-advised fund, with a five-year carryforward) and a new 0.5 percent of AGI floor can reduce that. Even so, you have given away $200,000. This only makes sense if you already intended to give.
- Selling in stages. Spreading a sale over two or three tax years can keep a portion of each year's gain in a lower bracket, though at high income that room is limited. The trade-off is concentration risk. While you wait, the stock can fall, and the tax savings may be smaller than the loss.
Add the donation ($38,080) to the harvested losses ($35,700) and the hypothetical federal capital gains tax falls by about $73,780 on the $380,800 baseline, before accounting for the deduction. These are illustrations, not expected results.
Who Direct Indexing May Fit
It may fit when:
- You have a taxable account large enough to run it. Some platforms set minimums in the low six figures.
- You have a known future gain, such as a concentrated stock sale, real estate sale, or business exit.
- You have a two- to three-year runway.
- You are in a high bracket, since each dollar of loss is worth your marginal rate.
It may not fit when:
- Your assets sit mostly in 401(k)s and IRAs. There are no taxable gains inside them, so no losses to harvest.
- Your taxable portfolio is small. Fees and complexity can outweigh the benefit.
- You need the money within a year.
- You have no large gain to offset. Net losses beyond gains offset only $3,000 of ordinary income per year (IRC Section 1211), though unused losses carry forward.
Costs
Direct indexing fees are usually higher than a plain index ETF. For example, an extra 0.25 percent a year on $1 million is $2,500. The tax savings have to clear that cost. Get the fee in writing, and ask how the platform handles wash sales across your other accounts.
The Bottom Line
A $1.6 million gain does not have to mean a $380,800 federal bill, but reducing it takes planning that begins years before the sale. Direct indexing can be one way to build losses. Combined with giving and staged sales, it may lower the cost in the right situation. None of it removes the tax, and none of it removes market risk.
Sources
- Rev. Proc. 2025-32, 2026 capital gains thresholds and tax rate tables
- IRC Section 1(h), maximum capital gains rates
- IRC Section 1411, net investment income tax
- IRC Section 1091, wash sales
- IRC Section 1211, limitation on capital losses
- IRC Section 170, charitable contributions including the 0.5 percent floor
- IRC Section 68, limitation on itemized deductions for the 37 percent bracket
This article is general educational information, not individualized investment, tax, or legal advice. Tax rates, brackets, and deadlines are subject to change, and how they apply depends on your specific situation. Consult a qualified tax professional before acting.
