
Tax Lot Optimization Tools: What Software Should Do
Tax lot optimization tools are software systems that compare every taxable lot in a brokerage portfolio before an investor sells, so the investor can choose the shares with the best after-tax result. A good tool does not just show gain or loss. It reads cost basis, holding period, current value, realized gains, wash sale windows, and the investor's current-year tax situation. TaxHarvest applies this layer to existing brokerage portfolios, so investors can keep their accounts where they are while the software finds the better lot-level decision.
The key word is "lot."
If you bought 100 shares of the same ETF in January, 100 in March, and 100 in June, you do not own one tax object. You own three. Each purchase can have a different cost basis, date, gain character, and tax outcome.
A brokerage app may show one blended position. The tax return does not work that way.
What Are Tax Lot Optimization Tools?
Tax lot optimization tools help investors decide which specific shares to sell.
The IRS rules make this decision important. In IRS Publication 550, the IRS explains that if an investor can adequately identify the shares sold, the basis is the basis of those particular shares. If the investor cannot adequately identify the shares, the basis generally falls back to the securities acquired first, except for certain mutual fund rules.
That is the difference between intentional tax management and default tax management.
A useful tool should show at least six fields for every lot:
| Field | Why it matters |
|---|---|
| Purchase date | Determines short-term or long-term treatment |
| Cost basis | Determines the gain or loss if sold |
| Current value | Shows the available tax result today |
| Holding period | Can change the tax rate on a gain |
| Wash sale exposure | Can disallow a loss if replacement shares were bought too close to the sale |
| Tax use | Shows whether the lot offsets gains, creates a carryforward, or pairs with another trade |
The tool should not stop at the table. It should turn the table into a recommendation.
"Sell this lot" is useful only when the software can explain why.
Why Do Tax Lot Optimization Tools Matter?
Tax lot optimization tools matter because two investors can sell the same dollar amount of the same holding and report very different tax results.
Suppose an investor owns 300 shares of an ETF. They want to sell 100 shares to raise cash.
The position looks simple at the account level:
| Lot | Shares | Basis per share | Current price | Result if sold |
|---|---|---|---|---|
| January lot | 100 | $80 | $100 | $2,000 gain |
| March lot | 100 | $118 | $100 | $1,800 loss |
| June lot | 100 | $103 | $100 | $300 loss |
If the investor sells the January lot, they realize a $2,000 gain.
If the investor sells the March lot, they realize a $1,800 loss.
The cash raised is the same: 100 shares x $100 = $10,000.
The tax result is not the same.
If the investor has other realized gains this year and is in the 23.8% federal capital gain and net investment income tax zone, the March lot loss can offset $1,800 of gain. The estimated federal tax benefit is:
| Loss harvested | $1,800 |
| Federal rate used | 23.8% |
| Estimated federal tax saved | $1,800 x 23.8% = $428.40 |
The difference between the January lot and March lot is larger than $428.40 because the January lot also creates a taxable gain. Selling the January lot creates $2,000 of taxable gain. At 23.8%, that is $476 of estimated federal tax.
So the spread between the two choices is:
| Tax cost from selling January lot | $2,000 x 23.8% = $476 |
| Tax benefit from selling March lot | $1,800 x 23.8% = $428.40 |
| Total swing | $904.40 |
Same holding. Same sale proceeds. Different lot.
That is the whole case for tax lot optimization.
What Should Tax Lot Optimization Software Check Before a Sale?
A serious tool should check more than unrealized gain or loss.
First, it should compare all lots, not just the default method shown in the brokerage interface. FIFO can be fine in some cases. It can also be expensive. For a deeper explanation of that default, see FIFO vs specific identification of tax lots.
Second, it should check wash sale timing. The wash sale rule can disallow a loss when an investor sells stock or securities at a loss and buys substantially identical stock or securities within 30 days before or after the sale. That means the tool has to look backward and forward. A purchase that already happened can be just as important as a purchase scheduled next week.
Third, it should distinguish short-term and long-term results. Short-term gains are taxed differently from long-term gains. Short-term losses can be especially useful when they offset short-term gains, because those gains are generally taxed at ordinary income rates.
Fourth, it should know whether the investor has gains to offset. The same $5,000 loss can be worth more in a year with realized gains than in a year with no gains. Capital losses can offset capital gains, and if losses exceed gains, the IRS allows a capital loss deduction up to $3,000 per year ($1,500 for married filing separately), with unused losses carried forward.
Fifth, it should look for basis-raising trades. Sometimes the best use of a loss is not to bank the loss. It is to spend the loss by realizing a gain in another position, which can raise cost basis without creating a net taxable gain.
TaxHarvest combines these checks into lot-level loss detection, optimal lot selection, wash sale and rebuy notifications, and matched-pair gain realization. The investor does not have to move assets into a managed portfolio. The software reads the existing portfolio and shows the tax-aware choice.
A Worked Example: Choosing the Better Lot
Consider a taxable portfolio with one winner and two possible losses.
The investor has already realized a $9,500 long-term capital gain this year. They also own the following lots:
| Security | Lot | Unrealized result | Extra detail |
|---|---|---|---|
| NVDA | 40 shares | $11,800 gain | Low-basis winner |
| AFRM | 310 shares | $11,200 loss | No wash sale risk found |
| ETF A | 120 shares | $12,000 loss | Spouse bought substantially similar shares 12 days ago |
A simple loss screener might rank ETF A first because the loss is largest.
A tax lot optimization tool should reject or delay it.
The recent spouse purchase creates wash sale risk. The loss may not deliver the current-year result the investor expects. A bigger loss is not better if it is blocked.
AFRM is smaller, but cleaner. It can offset the $9,500 realized gain. It can also leave $1,700 of remaining capital loss:
| AFRM harvested loss | $11,200 |
| Realized gain offset | $9,500 |
| Remaining loss | $11,200 - $9,500 = $1,700 |
| Estimated federal tax saved on gain offset | $9,500 x 23.8% = $2,261 |
Now the tool has a second question.
Should the investor use the extra $1,700 loss against ordinary income, carry it forward, or pair it with part of the NVDA gain?
If the investor sells enough NVDA to realize $1,700 of long-term gain, the AFRM loss can absorb it. That raises basis in the NVDA exposure if the investor replaces the position appropriately after considering wash sale and portfolio rules.
The after-tax result:
| Action | Tax effect | Portfolio effect |
|---|---|---|
| Harvest AFRM loss | Offsets $9,500 prior gain | Creates tax asset |
| Realize $1,700 NVDA gain | Absorbed by remaining AFRM loss | Raises basis in winner |
| Skip ETF A | Avoids wash sale risk | Waits for cleaner timing |
This is why "highest loss first" is too blunt. The right answer used the second-largest loss, protected the harvest, offset an existing gain, and raised basis in a winner.
For a deeper look at this type of decision, see optimal tax lot selection and matched pairs for realizing gains without paying tax.
How Do 2026 Capital Gains Brackets Change the Answer?
Tax lot optimization depends on the investor's tax bracket.
For 2026, IRS Revenue Procedure 2025-32 lists the maximum zero rate amount for long-term capital gains at $98,900 for married couples filing jointly and $49,450 for all other individuals. The maximum 15% rate amount is $613,700 for married couples filing jointly and $545,500 for all other individuals. Above the relevant range, a 20% long-term capital gains rate can apply.
High-income investors may also owe the 3.8% net investment income tax. The IRS says NIIT applies to the lesser of net investment income or modified adjusted gross income above the threshold, such as $250,000 for married filing jointly and $200,000 for single filers.
Those rates change which lot is optimal.
A retired couple inside the 0% long-term capital gains bracket may want to realize a long-term gain and raise basis. A high-income investor with current-year gains may want to harvest a clean loss first. An investor with short-term trading gains may value short-term losses differently from long-term losses.
One static rule cannot handle all of those cases.
Tax lot optimization tools need the portfolio and the tax context.
Why Brokerage Defaults Are Not Enough
Brokerage lot methods are useful, but they are not the same as tax optimization.
FIFO answers one question: which shares are treated as sold if the investor does not identify something else?
Highest cost answers another question: which lot has the highest basis?
Neither method knows the full tax plan by itself. Neither method automatically knows whether a household has gains elsewhere, whether a spouse bought a similar ETF, whether an IRA purchase creates a wash sale issue, or whether a loss should be saved for a matched-pair trade.
This is where software earns its keep.
TaxHarvest is built for investors who already have taxable accounts at places like Fidelity, Schwab, E*TRADE, Robinhood, or Interactive Brokers. The point is not to move the portfolio. The point is to add a tax decision layer above it.
That layer should surface lot-level losses inside positions that look profitable overall. It should identify the lot to sell. It should flag the purchase that could break the harvest. It should show when a gain can be realized at little or no net tax because another loss offsets it.
For the broader category, see tax loss harvesting software. For the existing-account angle, see tax loss harvesting software for your existing portfolio.
The Practical Standard
The practical standard for tax lot optimization tools is simple: could the tool explain the tax result of each sale before the investor trades?
If the answer is no, it is only a dashboard.
If the answer is yes, it can change real decisions.
The best tax lot is not always the oldest lot. It is not always the highest-cost lot. It is not always the lot with the biggest visible loss. It is the lot that creates the best after-tax result after wash sales, holding period, existing gains, carryforward value, and basis-raising opportunities are considered together.
That is hard to do by hand. It is exactly the kind of repeated, lot-level work software should do.
For more background, read what is tax lot optimization, FIFO vs specific identification of tax lots, optimal tax lot selection, and automated tax loss harvesting without moving accounts.