Cost basis

Also written tax lot, tax lots, specific share identification, adjusted cost base

The amount a holding is treated as having cost, against which a gain or loss is computed when it is sold. It is not one number per ticker but a number per lot, per acquisition. Which lots count as sold is set by tax rules and by what you told the broker at the time, and later events adjust the figure afterwards.

How it works

A position is made of lots. Every purchase, every reinvested dividend, every transfer in and every stock received in a corporate action creates one, with its own date and its own price. Selling "100 shares" therefore requires answering a prior question: which 100?

The US rules are written down, and IRS Publication 550 (2025) is where they sit. If the shares sold can be adequately identified — the identification made to the broker at the time of sale — that identification governs, and the basis of those specific shares is used. Where adequate identification is not possible, the default is first-in, first-out: the oldest shares are treated as sold first. For shares in a mutual fund or acquired through a dividend reinvestment plan, an average basis method may be elected instead of tracking each lot. Publication 550 also carries the wash-sale mechanism, which is a basis adjustment rather than a permanent loss: where substantially identical stock is acquired within 30 days before or 30 days after a sale at a loss, the loss is disallowed and the disallowed amount is added to the basis of the replacement shares, deferring it until those shares are sold.

Three properties of that make the software question hard.

The method is chosen at the sale, not afterwards. Specific-share identification is an instruction given when the shares go; reconstructing it later from a CSV is not the same act. A tool that lets you flip the accounting method in a settings menu is recomputing a historical figure under a rule that may not be the one that applied.

Adjustments arrive from outside the transaction list. Return-of-capital distributions, spin-offs, mergers and stock distributions all move basis without a trade happening. The arithmetic is not optional or approximate: the worked example in why adjusted close differs between sources shows a spin-off where the issuer's own filing allocated 79.74 per cent of a holder's basis to one company and 20.26 per cent to the other, derived from opening prices on a named morning. A tracker that treats that event as a price adjustment rather than a basis allocation has two wrong numbers, not one. What a corporate action does to a basis is the part that separates a cheap tracker from an expensive one.

It is jurisdictional, not universal. FIFO as a fallback and an average-basis election for fund shares are US rules from a US document. Other regimes differ in kind, not only in rate, and a tool that implements one country's logic is not producing a filing anywhere else. Sharesight is the clearest illustration in the catalogue because it is explicit about the boundary: it runs an Australian capital-gains report using FIFO parcel allocation and the ATO discount method, a Canadian report built on adjusted cost base under CRA rules and New Zealand FIF and trader reports under IRD rules, each only in a portfolio set to that tax residency — while UK and US portfolios get a sold-securities report computed on average cost, with no Section 104 pooling and no wash-sale handling, which the card describes as a starting point for an accountant rather than a filing.

Why two tools disagree about the same account

Because the method is a setting, and the settings differ. Portseido computes basis under FIFO, LIFO or weighted average and breaks each position into purchase lots with a basis and holding days per lot. Stock Events offers FIFO or LIFO for realised profit and loss. Wealthfolio is FIFO only — no LIFO, no weighted average, no specific identification — and has a holdings mode that takes current positions with no history, which cannot support a basis at all. Point three tools at one broker export and you can get three defensible numbers.

Brokers disagree with trackers for a fourth reason: they have already applied their own adjustments. TradeLog declines to build from a 1099-B precisely because the form arrives with the broker's wash-sale adjustments already applied without saying which basis figures were changed, and reports only positions closed in the year; it rebuilds from raw fills and reconciles gross proceeds against the form instead. Whatever tool you use, the fills are the primary record — how to export your broker trade history is the mechanical part.

Why it matters here

Across portfolio trackers this is the field with the highest switching cost, because it is cumulative: a basis is the whole history of a position, so a tracker you have fed two years of transactions into holds something a new one cannot be given in an afternoon. It is also the field where "supports tax reporting" spans everything from a configurable lot method to an actual filing-ready form for one named country. The distinction worth reading a help page for is which of those a product means.

None of the above is tax advice, and this catalogue is not qualified to give any. It is a description of what the documents say the mechanism is, so that a disagreement between two screens can be diagnosed rather than guessed at. The filing itself is a question for the tax authority's own material or for somebody paid to answer it.

Where you will meet this

The cards where this changes a decision, then the rest that use the word.

Sources

  1. Publication 550 (2025), Investment Income and Expenses Internal Revenue Service, read

FAQ

Why does my tracker's gain differ from my broker's?

Almost always because the two picked different lots as sold. A tracker set to first-in-first-out and a broker holding an instruction to sell specific shares will report different gains on the same sale, and neither is arithmetically wrong. The second common cause is an adjustment one side applied and the other did not, such as a disallowed loss added to the replacement shares.

Can a tracker that imports only my current holdings compute this?

No. A basis is a function of the acquisitions, their dates, their prices and every adjustment since, so a snapshot of what you hold today cannot produce it — at best the tool asks you to enter an average. This is why the import mode matters more than the feature list: transactions support a basis, holdings do not.

Updated