Taxstra Logo
Investment Tax Guide

Direct Indexing: How the Tax Benefits Work

How direct indexing harvests losses lot by lot, the wash sale traps, the $3,000 limit, why losses mostly defer tax, and who it does not fit.

★ 5.0 on Google113 reviews4.9 from 114 BiggerPockets reviews1,000+ clientsAll 50 states, fully remote

Quick answer

Direct indexing means owning the individual stocks of an index in your own taxable account instead of buying a fund. Because every share lot has its own cost basis, losing lots can be sold to harvest capital losses even when the index is up. Losses offset capital gains without limit and up to $3,000 a year of ordinary income, with the rest carried forward. The wash sale rule blocks a loss if substantially identical stock is bought within 30 days before or after the sale.

Direct indexing in plain terms

A fund gives you one share price and one cost basis. Direct indexing gives you hundreds of positions, each bought at a different price on a different day. That granularity is the whole tax story: in any year, some of those lots sit below what you paid, even when the market as a whole rose.

Selling those losing lots creates capital losses you can use against gains elsewhere on your return, such as a business sale, a rental property sale or a stock option exercise. The account then buys similar but not identical stocks so the portfolio still tracks the index.

This page covers the tax side only: how the losses work, the wash sale rule, what the strategy really buys you, and where it breaks down. It is tax education, not investment advice. Taxstra does not manage investments or recommend any fund, platform or manager.

Harvesting mostly moves tax to later. That can still be worth a lot.

Every harvested loss lowers the cost basis of what you hold, so more gain is waiting when you eventually sell. The real permanent savings come from three places: using the loss against short-term gains or ordinary income now while paying lower long-term rates later, never selling the replaced shares and passing them at death with a basis step-up, or giving the appreciated lots to charity.

How lot-level loss harvesting works

In a direct-indexed account you own each stock outright, often in many lots. When you sell part of a position, you can choose which lots go first, as long as you adequately identify them: for shares held by a broker, that means telling the broker which lots to sell at the time of the sale and getting written confirmation. If you cannot identify lots, the IRS treats the earliest shares bought as the ones sold.

The manager or software running the account scans for lots trading below their basis, sells them, and buys replacement stocks with similar risk so the account keeps tracking the index. You end the year with a portfolio that looks about the same and a stack of realized losses.

Those losses go on Form 8949 and Schedule D like any other sale. They first offset capital gains. If losses exceed gains, up to $3,000 a year ($1,500 if married filing separately) offsets ordinary income, and the rest carries forward to later years.

The mechanics of harvesting itself, and how it works in an ordinary brokerage account, are on our tax-loss harvesting guide. Carryforward tracking is covered in capital loss carryover rules.

The wash sale rule under section 1091

Section 1091 disallows a loss on the sale of stock or securities if you acquire substantially identical stock or securities, or a contract or option to acquire them, during a window that starts 30 days before the sale and ends 30 days after it. That is a 61-day window counting the sale date.

A disallowed loss is not gone for good in the ordinary case. It is added to the basis of the replacement shares, and the holding period of the old shares carries over. The loss comes back when you sell the replacement shares, unless that sale is also a wash sale.

What counts as substantially identical is a facts and circumstances question. The IRS says stock of one corporation is ordinarily not substantially identical to stock of another corporation, which is why a direct-indexed account replaces a harvested stock with a different company in the same industry rather than buying the same stock back. The IRS has not published a bright-line test for when two funds tracking similar indexes are substantially identical, so treat swaps between near-identical funds with care.

Purchases that can trigger a wash sale
Who buys within 30 days before or afterWash sale?What happens to the lossSource
You, in the same or another taxable accountYes, if substantially identicalAdded to basis of the new sharesIRC 1091(a), (d); Pub. 550
Your spouseYesDisallowedPub. 550
A corporation you controlYesDisallowedPub. 550
Your IRA or Roth IRAYesDisallowed, and no basis increase in the IRARev. Rul. 2008-5; Pub. 550
An option or contract to buy the same stockYesDisallowedIRC 1091(a)

Educational summary. Dividend reinvestment and automatic purchases in other accounts count as purchases too.

Watch Out

The IRA trap is permanent

Under Rev. Rul. 2008-5, if you sell at a loss in a taxable account and your IRA or Roth IRA buys the same stock within the window, the loss is disallowed and the IRA does not get a basis increase. The loss is simply lost. If you run a direct-indexed account next to retirement accounts that hold the same stocks, someone has to watch both sides.

Why harvested losses defer tax more than they erase it

Sell a lot bought at $100 for $70, and you realize a $30 loss. The replacement stock is bought at today’s price, so your basis in the account is now $30 lower than it would have been. If the account later recovers and you sell everything, you recognize that $30 as extra gain.

So the value of a harvested loss depends on the rate gap between when you use it and when you pay it back. A loss used against short-term gains or ordinary income (taxed at up to 37 percent, plus the 3.8 percent net investment income tax on investment income) that is repaid years later as long-term gain (taxed at 0, 15 or 20 percent, plus 3.8 percent) is a real rate arbitrage. A loss used against long-term gain and repaid as long-term gain mostly buys time.

Time is not nothing. Deferring tax for 10 or 20 years is like an interest-free loan from the Treasury. And if the low-basis shares are never sold, the deferral becomes permanent: assets held at death generally take a basis equal to fair market value at the date of death, and appreciated shares given to charity escape the gain entirely.

Worked example

One year of harvesting, hypothetical numbers

Account value at start of year
$1,000,000
Losses harvested from individual lots during the year
$60,000 (short-term)
Long-term gain the investor realized elsewhere that year
$50,000
Losses used against that gain
$50,000
Federal tax avoided this year on the gain, at 20% plus 3.8%
$11,900
Net loss used against ordinary income
$3,000
Loss carried forward to next year
$7,000
Reduction in the account’s cost basis (future gain)
$60,000

Hypothetical. A married couple filing jointly in the 20 percent capital gain bracket (2026 taxable income above $613,700) who owe the 3.8 percent NIIT. Short-term losses net first against short-term gains, then against long-term gains. The $60,000 of basis reduction is gain the couple will recognize later if they sell the replacement shares. State tax ignored. Educational, not individualized tax advice.

The ossification problem

Harvesting works best in the first few years. In a rising market, most lots climb above their basis and stay there, and lots bought at older, lower prices rarely dip below cost again. After several years, many direct-indexed accounts have few losses left to harvest and a large pile of embedded gain.

At that point the account is hard to change. Moving to a different strategy or a cheaper fund means selling appreciated lots and paying the tax the harvesting deferred. People sometimes describe this as the portfolio ossifying: it still tracks the index, but it is locked in place by its own gains.

Adding new cash keeps creating fresh lots that can be harvested, which is why the strategy tends to suit people who keep contributing. It is also why the exit plan matters before you start.

Using appreciated lots for charitable gifts

Because the account holds many lots at different bases, it gives you a ready supply of highly appreciated shares. Giving shares held more than one year to a public charity or a donor-advised fund generally produces a deduction at fair market value, subject to the AGI percentage limits, and the built-in gain is never taxed to you.

Paired with harvesting, the effect compounds: losing lots are sold for losses, winning lots are given away, and the account is replenished with cash at current prices. For people who already give each year, this is often where direct indexing earns its keep.

See how a donor-advised fund deduction works, including the 2026 rule changes, and how the step-up in basis at death turns deferral into permanent savings.

Direct indexing versus an index ETF, on taxes

An index exchange-traded fund is already tax-efficient: you generally pay tax on its dividends each year and on your own gain only when you sell. What it cannot do is let you harvest losses on the individual stocks inside it. You can harvest only when the whole fund is below your basis.

Direct indexing adds that lot-level harvesting, plus control: you can exclude a stock you already own too much of, such as an employer’s shares, and fund the account in kind with existing positions. What it adds in return is complexity: hundreds of trades a year on Form 1099-B, more wash sale exposure across accounts, and the ossification problem.

Tax features compared
FeatureIndex ETFDirect-indexed account
Cost basisOne basis per purchase of the fundSeparate basis for every stock lot
Loss harvestingOnly when the fund trades below your basisOn individual stocks even when the index rises
Exclude specific stocksNoYes
Wash sale monitoringSimplerHeavier, across all household accounts
Tax reportingFew transactionsOften hundreds of lines on Form 8949
Long-run behaviorGains build inside one positionHarvesting opportunities shrink over time

Placement matters too: see asset location for which holdings belong in taxable and retirement accounts.

Who direct indexing tends to fit, and who it does not

It tends to fit high income earners, business owners and real estate investors with a large taxable account, regular gains to offset (from a business sale, rental property sales, a concentrated stock position or fund distributions), ongoing contributions, and either charitable intent or a plan to hold for life.

It tends not to fit a small taxable account, where there are too few lots to harvest meaningfully; money held in IRAs or 401(k)s, where losses do nothing; someone with no gains to offset, who gets only $3,000 a year against ordinary income; someone in a low bracket now who expects a higher one later; or someone who expects to liquidate the account within a few years and give the deferral back.

If your real issue is one large low-basis holding, start with our overview of a concentrated stock position and the exchange fund alternative.

When to hire a CPA, and when you can handle it yourself

If you have one taxable account, no IRA holding the same stocks, and the brokerage reports wash sales correctly on Form 1099-B, the return is mostly data entry. Plenty of people handle that themselves.

A CPA earns the fee when the account sits next to other accounts the broker cannot see: a spouse’s account, IRAs, an employer stock plan, or a trust. A broker generally reports wash sales only for identical securities bought in the same account, so cross-account wash sales are yours to find. A CPA also helps when you are deciding how much gain to realize in a year, how harvested losses interact with a business or property sale, and whether charitable gifts of appreciated lots fit your plan. Taxstra does that tax work and coordinates with your investment adviser; we do not manage investments.

What to check before you act

A practical review sequence for the return, books, or planning file.

List every household account that can buy the same stocks: spouse, IRAs, Roth IRAs, employer plans and trusts.

Turn off dividend reinvestment in other accounts for stocks the direct-indexed account harvests.

Confirm the account identifies specific lots on every sale and keeps the confirmations.

Estimate the gains you expect to realize this year so harvested losses have something to offset.

Track capital loss carryforwards from year to year.

Decide the long-term exit: hold for life, give appreciated lots, or pay the deferred tax.

“I recently had the pleasure of working with Taxstra, and I must say, the experience exceeded my expectations. From start to finish, their professionalism, expertise, and customer care were outstanding.”
Google Reviewer · Read on Google

Published client feedback. Individual experiences vary.

High income earner, business owner or landlord? Here is what this changes for you.

Book your free 30-minute tax fit call to talk through your next steps.

Common mistakes

The shortcuts most likely to produce a confident but wrong answer.

01

Buying the same stock in an IRA

Under Rev. Rul. 2008-5 the loss is disallowed and the IRA basis does not increase, so the loss is gone for good.

02

Ignoring a spouse’s account

A purchase by your spouse within the window is a wash sale. Separate accounts do not avoid the rule.

03

Relying on the 1099-B to catch everything

Brokers generally flag wash sales only for identical securities bought in the same account. Cross-account and cross-broker wash sales still apply and still have to be reported.

04

Counting harvested losses as pure savings

Each harvested loss lowers basis. Unless the shares are held for life or given away, much of the benefit is deferral, not elimination.

05

Harvesting with nothing to offset

Without capital gains, only $3,000 a year reaches ordinary income. A large carryforward can sit unused for years.

06

Starting without an exit plan

After a few strong years the account can become locked in by embedded gains, and changing course means paying the deferred tax.

Frequently Asked Questions

What is direct indexing?

Direct indexing is owning the individual stocks in an index, or a sample of them, in your own separately managed taxable account instead of buying an index fund. Because each lot has its own cost basis, losing lots can be sold for tax losses while the account keeps tracking the index.

How does direct indexing tax-loss harvesting work?

The account sells individual lots trading below their cost basis to realize capital losses, then buys similar stocks so the portfolio still tracks the index. The losses offset capital gains, then up to $3,000 a year of ordinary income ($1,500 if married filing separately), with the rest carried forward.

Does the wash sale rule apply to direct indexing?

Yes. A loss is disallowed if you, your spouse, a corporation you control, or your IRA buys substantially identical stock within 30 days before or after the sale. Stock of a different company is ordinarily not substantially identical, which is why the account replaces sold stocks with different companies.

Is direct indexing worth it?

It tends to be worth more for people with large taxable accounts, regular capital gains to offset, ongoing contributions and charitable giving, and less for small accounts, retirement accounts or people with no gains. Much of the benefit is deferral, because harvested losses lower the basis of what you keep.

Direct indexing vs ETF: which is better for taxes?

An index ETF is already tax-efficient but can only be harvested when the whole fund is below your basis. Direct indexing allows harvesting on individual stocks and lets you exclude specific stocks, at the cost of more transactions, more wash sale monitoring and harvesting opportunities that shrink over time.

Do harvested losses expire?

For individuals, a net capital loss above the $3,000 annual limit carries forward to later years. It is used first against future capital gains and then against up to $3,000 of ordinary income each year.

Can I give shares from a direct-indexed account to charity?

Yes. Shares held more than one year given to a public charity or donor-advised fund generally produce a deduction at fair market value, subject to AGI limits, and the built-in gain is not taxed to you. Lots with the largest gains are the usual candidates.

Next Steps

Filing it yourself is fine. Optimizing it is where the money is.

Getting the form right keeps you out of trouble. The strategies below are what actually lower the bill.

Interested in working with Taxstra?

Book your free 30-minute tax fit call with our team. Tell us what you need, learn how Taxstra can help, and explore whether our services are a good fit. Tax advice, document reviews, and analysis require a paid engagement.

Tax planning slots are limited before year-end.