← Back to Countries
πŸ‡ΊπŸ‡Έ United States  Β·  6 min read  Β·  Published 2026-09-07  Β·  Updated 2026-09-07
Sources last verified: 2026-09-07

Choosing Which Shares to Sell

Someone selling part of a long-held position is making two decisions and usually only notices one. How much to sell is obvious. Which specific shares leave β€” bought in which year, at which price β€” decides the gain, and if no instruction is given the broker decides for you, generally in the way that realises the most.

60-SECOND ANSWER
Where you hold shares bought at different times, you can specifically identify which lots are sold, provided you do so at the time of sale. Without an identification the default is first in, first out. Mutual funds may also use an average cost method, which once elected applies to that fund.

Where the AI summary above gets this wrong

"Your broker calculates the cost basis for you, so there is nothing to decide."

That's surface-true. Here's what it misses:

β†’ Compare the gain on two ways of selling

01 The three methods

Specific identification lets you nominate which lots are sold. Where the aim is to realise as little gain as possible, that means the highest-cost lots; where the aim is to harvest a loss, the opposite. It is the only method that gives you control.

First in, first out is the default where nothing is specified. The oldest shares go first, which in an appreciated position means the cheapest go first and the gain is at its largest.

Average cost is available for mutual funds and averages the basis across all shares of that fund. It removes the arithmetic and the choice together, and once elected for a holding it generally governs that holding.

WORKED EXAMPLE β€” Try the numbers

Shows: the difference in realised gain between selling the oldest shares by default and specifically identifying the highest-cost lots for the same proceeds. Ignores: the tax rate applied to that gain, whether the identified lots are short-term or long-term, state tax, and the wash sale rule where a loss is involved.

Gain avoided by choosing the lots
$29,000
Selling the oldest lots realises $38,000 of gain. Identifying the highest-cost lots realises $9,000 β€” $29,000 less, on the same sale.

Source: Publication 550

02 Making the identification stick

The identification has to be made at the time of the sale and confirmed by the broker. Most platforms offer a lot selection screen during the trade, or a standing default that can be set to something other than first in, first out.

Setting that standing default is the single most useful administrative change available in a taxable account. Highest cost first, or a tax-efficient setting where the broker offers one, converts every future sale into the low-gain version without any further attention.

Keep the confirmation. Brokers report basis to the IRS for covered shares, and where the reporting does not match what you identified, the confirmation is the evidence. The same record-keeping discipline that harvesting losses requires applies here on the gain side.

Source: Publication 551

03 Where the choice matters most

Three situations reward attention. Drawing regular income from a taxable account: identifying high-basis lots each time keeps realised gains low year after year, which feeds directly into the order accounts are drawn in.

Harvesting losses: you need the specific lots that are underwater, not an average that shows a gain. Average cost can make a harvestable loss invisible in a fund position that is up overall.

And holding for a step-up: where the intention is to leave appreciated shares to heirs, the low-basis lots are the ones to keep. Selling high-basis lots now and holding the rest for the basis reset at death is the shape of an efficient plan.

Source: Topic 409: capital gains and losses

This is a setting, not a strategy, and it takes about four minutes. Log into the brokerage account, find the cost basis default, and change it from first in, first out to highest cost. Every sale you make for the rest of your life then realises less gain by default, and you never have to think about it again. I have never met anyone who regretted changing it and I have met plenty who wished they had done it a decade earlier.

β€” Jordan Reeves, founder

FAQ

Can I choose which shares to sell for tax purposes?

Yes, by specific identification, provided you nominate the lots at the time of sale and the broker confirms it. Without an instruction the default is first in, first out.

What happens if I do not specify which lots to sell?

The oldest shares are treated as sold first. In a position that has risen, those are usually the lowest-basis shares, so the realised gain is at its maximum.

Can I change from average cost back to specific identification?

Changing the method for a fund position you have already elected average cost on is restricted, and any change generally applies going forward rather than retroactively. It is worth choosing deliberately at the outset.

Sources

Regulator references

Calculator unit tests Β· the assertions this page's worked example is checked against, and their last result

Changelog

Run this rule against your situation

See what this rule does to your own projection β€” month by month, to age 90.

Join the Waitlist
Jordan Reeves

Jordan Reeves

Founder of Talk Through Wealth. A software engineer for over a decade before turning to retirement planning, Jordan built the projection engine after watching family members get fragmented, country-by-country advice that never reconciled. He writes about retirement the way the engine computes it: month-by-month, lifetime-long, and skeptical of any rule of thumb that hasn't been run through the math.

More from Jordan β†’ Β· LinkedIn

Disclaimer: General information for US residents, not personal financial advice. Figures use 2026 IRS rules and assumptions you can change in the worked example. Your situation may vary β€” consider speaking with a licensed financial adviser before acting.