WhitmanTrading

Cost Basis

Cost basis is the amount a holding is treated as having cost for tax purposes, which sets the gain when it is sold. Where the same holding was bought several times at different prices, the method used to decide which units were sold changes the reported gain.

Cost basis is bookkeeping, which is why it gets ignored, and it decides the size of a tax bill, which is why ignoring it is expensive. The whole subject is one question: which units did you sell.

How it works

A candlestick chart with a purchase price and a sale price marked.
What you paid, for tax purposes. Illustrative chart - not real market data.

The gain on a sale is the proceeds minus the basis. For a single purchase that is trivial: the basis is what you paid, plus any commission.

The first half of a price series with several purchases at different levels.
Several purchases means several bases. Illustrative chart - not real market data.

Buy the same holding several times and there is no single price. Each purchase is a lot with its own date and its own cost, and selling part of the position means selling particular lots.

A section of the price series with one lot selected for sale.
Which lots you sold decides the gain you report. Illustrative chart - not real market data.

The method decides which ones. That is the entire subject, and the answer is not obvious because several methods are permitted.

A worked example

A window of price bars with three purchase points.
Three lots, one sale, three possible answers. Illustrative chart - not real market data.

Take three purchases of 100 units each: at 20, at 30 and at 45.

Total cost is 2,000 + 3,000 + 4,500 = 9,500 for 300 units, an average of 31.67.

Now sell 100 units at 40, for proceeds of 4,000.

First-in-first-out sells the units bought at 20, giving a gain of 2,000.

Average cost gives a gain of 4,000 − 3,167 = 833.

Specific identification of the 45 lot gives a loss of 500.

Same sale, same proceeds, three answers ranging from a 2,000 gain to a 500 loss. Nothing about the trade differed; only the record did.

The methods

The second half of a price series with different lots highlighted.
Three conventions, three different bills. Illustrative chart - not real market data.

First-in-first-out is the usual default. It sells the oldest units, which in a long-held rising position means selling the cheapest and reporting the largest gain.

Average cost pools everything into one figure. Simple, and it removes the ability to choose. Some jurisdictions require it for funds.

Specific identification lets you nominate the lots, which is the most control and the most record-keeping. It generally has to be elected at the time of the trade rather than afterwards.

None is universally best. Selling high-basis lots reduces tax now; selling low-basis lots uses up a gain while rates are low, if that is the situation you are in.

And the choice is usually irreversible. Some jurisdictions lock a fund holding into average cost once it has been used, so the first sale can decide the method for every sale after it — which is a reason to think about it before the first one rather than after.

What changes a basis

A candlestick series with a series of small automatic additions.
Reinvested dividends are purchases. Illustrative chart - not real market data.

Every reinvested dividend is a purchase and creates a lot. A holding with quarterly reinvestment held for a decade has around forty lots, each with its own date and price.

A disallowed wash-sale loss is added to the replacement’s basis, which is a correction that has to be carried forward and is easy to lose.

Splits, mergers and returns of capital adjust it too, and the adjustment usually arrives as a document that is easy to file and forget.

Why it is worth getting right

A long-horizon candlestick view with a large deferred gain.
A misplaced record overstates a gain permanently. Illustrative chart - not real market data.

A lost record generally means a basis of zero, which means the entire proceeds are treated as gain. That is the worst available outcome and it is caused by filing rather than by investing.

Broker reporting has improved and it is not complete. Holdings transferred between institutions, inherited positions and purchases made elsewhere can arrive without basis attached.

On this site’s arithmetic, 75 basis points of annual drag removes 20.2% of a thirty-year pot. Tax overpaid because of a missing record behaves the same way — a smaller base compounding for the same period. The figures are in research/series-measurements.json.

Costs

A candlestick chart annotated with the round-trip cost of a switch.
Commission is part of the basis. Illustrative chart - not real market data.

Commission on the purchase is generally added to the basis and commission on the sale is generally deducted from the proceeds, so both reduce the reported gain.

Price bars with purchases planned in advance.
And the spread is not recorded anywhere. Illustrative chart - not real market data.

The spread is not. On this site’s shared series a round trip measures about 2% of the median bar range of 0.493 — a real cost that appears in no tax record at all.

The original data

Of the 24,971 unique videos in research/search-study-corpus.jsonl, zero have a title about cost basis. Wash sales appear in 2 videos at a median of 90,257 views and capital gains tax in 1 at 233,662. The counts come from site/rank_investing.py, which deduplicates by video id.

A candlestick series with several gaps, the largest of them marked.
A corporate action can adjust it without warning. Illustrative chart - not real market data.

Zero videos on the record that determines every capital-gains bill. It is the least interesting subject in investing and it is the one that most often produces an unnecessary payment.

A stretch of price bars cut short at a decision point.
Selling part of a long-held position. Which lots? Illustrative chart - not real market data.

The answer to the question on that chart is that it depends on this year rather than on the position. In a year with realised losses to absorb, selling low-basis lots uses them up. In a high-income year, selling high-basis lots keeps the gain small. The lots are an inventory to manage across years, not a queue to work through in order.

When it fails

The expensive failure is a transfer between brokers that arrives without basis. The holding moves in kind, nothing is sold, no tax event occurs — and the receiving broker records the position with no acquisition cost attached. Years later a sale is reported against a basis of zero, and the paperwork proving otherwise is a decade of statements from an institution the account is no longer with. Nothing went wrong at the moment it mattered, which is why nobody checks.

The second failure is not electing specific identification at the trade. It is generally not retroactive.

A third is forgetting reinvested dividends are purchases. Each is a lot.

A fourth is losing wash-sale adjustments. They move the basis and are easy to drop.

A fifth is assuming the broker’s figure is complete. It cannot see other institutions.

And a sixth is worrying about this inside a wrapper. There, none of it matters.

Taxable accounts is the only place basis has consequences. The wash-sale rule is a common source of basis adjustments. And tax-loss harvesting depends entirely on the records being right.

What I actually do

The single most valuable habit is recording the lot at the moment of sale rather than reconstructing it in April. Specific identification generally has to be elected when the trade is placed, and by the time a tax return is being prepared the opportunity to choose has usually gone.

— Michael Whitman

This page is educational, not financial advice. Test every idea on your own charts before risking money.