Choosing Which 400 Shares to Sell Saved Me $2,100 in Capital Gains Tax — The Default Was the Trap
I needed to raise $18,000 from a position I'd been buying for nine years. The broker's default cost-basis method would have handed the IRS an extra $2,100. One settings page, changed in March, made the difference.
The confirmation screen glowed at 10:47 on a Wednesday night and showed a projected gain of $9,860, and something about that number felt wrong enough that I stopped with my finger hovering over the sell button. I was selling 400 shares of an index fund I'd been buying since 2017 — sporadic chunks, some at $61, some at $88, a fat lump in the 2020 dip at $52. My target was $18,000 of proceeds for a kitchen renovation, not a tax lesson. The projection on screen assumed, silently, that I was selling my oldest shares first. Nobody asked me. That's the part that kept me up.
the fridge in the gap
The stakes were real money measured against a real deadline. I was selling in a year when my income put my long-term gains rate at 15 percent, with an additional 3.8 percent net investment income tax on top because this was a strong earning year. Rough math said each $1,000 of unnecessary gain cost me about $188. The difference between my oldest lots and my newest lots on this position was over $11,000 of embedded gain. Do the multiplication and the stakes come out to approximately $2,100 — enough to buy the fridge I was pretending the renovation didn't also need.
FIFO since 2017
Here is what I absorbed over the next two weeks, and I'll keep it short because the mechanics are truly simple. Every brokerage assigns your account a default "cost basis method" — the rule for which shares get sold when you don't specify. The routine default is FIFO: first in, first out, oldest shares first. For a long-held position that's grown the whole time, FIFO is close to the worst possible choice, because it invariably sells the lots with the biggest gains. The alternatives have names like HIFO (highest cost first) and specific share identification, where you pick the exact lots yourself at trade time. My broker supported all of them. My account had been sitting on FIFO since 2017 because I'd never seen the settings page and never knew it existed.
$9,860 to $1,240
The renovation sale became my experiment. I called the broker, asked them to switch my default to specific share ID, and waited the required window for the setting to apply to future sales. Then, on the actual trade, I hand-selected 400 shares weighted toward my highest-cost lots — the $88 purchases from late 2021, the $84 batch from early 2022, enough of the mid-cost lots to reach the total. Those shares had barely any gains at all. The projected gain on the confirmation screen, same $18,000 of proceeds, dropped from $9,860 to $1,240. I sold, felt slightly criminal, paid for cabinets in cash.
settles before, not after
Three footnotes to the victory, cuz the tax code doesn't hand out free lunches without a receipt. First, specific ID only works for sales you can specify — meaning the setting and the lot selection must be in place before the trade settles, not after; you cannot sell and then retroactively decide which shares you meant. Second, the remaining 500-odd shares of that position now skew heavily toward low-basis lots, which means my future sales carry bigger embedded gains — I've deferred the tax, not deleted it, and I've began keeping a simple map of what's left. Third, and this one nearly caught me: the broker warned that shares held at certain transfer agents and some dividend-reinvested lots require the setting to be elected per position, not just account-wide. I checked every position I own the same week. Two of them needed manual overrides.
a stack, not a soup
The deeper shift is how I think about position history now. A brokerage account isn't a pile of shares — its a stack of dated purchases, each with its own tax fingerprint, and the default settings treat that stack like a smooth blended soup. For nine years I was one settings page away from several thousand dollars and didn't know the page existed. My accountant later told me most of her clients have never looked at theirs either, and that she raises it every January now, the way dentists raise flossing. I'm the annoying friend who asks about cost basis at dinner parties. My wife has banned the topic at restaurants.
the sabbatical-year trick
One more practical note for anyone with a kitchen in their future. If your gains will be modest in a given year — say your income drops, a sabbatical, a business loss year — that's the year to deliberately sell high-gain lots and reset the basis upward, sometimes at a zero or near-zero rate. I'd done the opposite for a decade, selling nothing and letting gains pile up like unopened mail. The renovation forced the mail open. If I'd waited for a high-income year to sell those old lots, the same $9,860 of gain would have cost closer to $2,800 at my marginal rates.
two numbers in pencil
The renovation finished in June. The cabinets are white, the fridge is stainless, and taped inside the sink's under-cabinet — where the dish soap lives — is the printed confirmation from that Wednesday night showing both numbers: $9,860 crossed out in pencil, $1,240 circled. Every time I load the dishwasher I see it. Cooking in that kitchen, I occasionally think about the version of me who just pressed the button at 10:47 and paid an extra $2,100 for the identical room. He was one settings page away, same as I was. The room is the same. The person cooking in it is not.