Calculators·2026 tax year
Which shares should I sell?
If you bought the same stock at different times and prices, you get to choose which of those shares you're selling, and that choice can change your tax bill a lot. This compares the same sale under each cost-basis method, which basically just means each way of deciding which shares went out the door.
Lowest tax this year saves you this vs first in, first out
$0
| Method | Gain or loss | Short term | Long term | Est. federal tax |
|---|
How the math works
Each method picks which of your shares you're selling. Your gain is the sale price minus what you paid for those particular shares, and each lot's gain is short term or long term depending on how long you held it. Long term means more than a year. The IRS counts from the day after you bought, and the day you sell counts, so shares bought on January 15, 2025 are long term if sold on or after January 16, 2026.
- First in, first out sells your oldest shares first. It's the usual broker default for stocks if you don't pick something else, and it's what the IRS assumes when you can't show which shares you sold. The oldest shares are often the cheapest, so this can mean the biggest gain.
- Highest cost first sells the shares you paid the most for, which usually means the smallest gain. It ignores whether that gain is short term or long term, though.
- Lowest tax this year tries every split between your short-term and long-term shares, takes the lowest-gain shares within each, and keeps whichever one gives the lowest 2026 federal tax. If another method ties it, that one shows as the best instead, because it's simpler to ask your broker for.
- Average cost gives every share the same cost: the total you paid divided by the shares you own. It's only allowed for mutual fund shares (and other regulated investment companies, which can include some ETFs) and shares bought through a dividend reinvestment plan, not regular stock. For the short-term or long-term split, it treats your oldest shares as sold first.
The tax on each is your 2026 federal tax with the sale minus your tax without it, using the 2026 brackets, the 0%, 15% and 20% long-term rates and the 3.8% net investment income tax.
How you actually pick your shares
To sell specific shares, you have to tell your broker which lots before the trade settles, and get a confirmation back. Usually that just means choosing the lot method, or the exact lots, on the sell screen before you place the trade. You can't go back and pick different shares after the fact.
Mutual funds are stickier. Once you've sold shares of a fund using average cost, you can't take that back for the shares you already own: they keep their averaged cost even if you switch methods later.
And the lowest tax this year can mean more tax later. The shares you don't sell are the ones with the lower cost, so the gain you skip today is still sitting there for the next sale. A lot of the time it's a deferral more than a discount. It still pays to look before you sell, though, because a long-term rate later usually beats a short-term rate now.
What this leaves out
State income tax, itemized deductions, credits, the alternative minimum tax, married filing separately, other gains and losses you've taken this year, and wash sales: if any of the shares you'd sell are at a loss and you bought more within 30 days, check the wash-sale rule.
Watch
Sources: IRS Publication 550 (holding period, identifying the shares you sold, first in, first out and average basis), Treas. Reg. §1.1012-1 (adequate identification before settlement in (c), and the average basis method and its election in (e)) and IRS Revenue Procedure 2025-32 (2026 brackets and capital gains rates). Last checked against these sources on Nov 9, 2026.
An estimate for learning, not tax advice. I'm a CPA, but I'm not your CPA, so check with whoever does your taxes before you sell. Nothing you type leaves your browser. Full disclaimer.