The regulation's requirement is precise about timing, and the timing is the part most often missed. Treasury Regulation 1.1012-1(c)(3) provides that for shares held with a broker or other agent, an identification is adequate where, at the time of the sale or transfer, the taxpayer specifies to that broker or agent the particular shares to be sold, and, within a reasonable time afterward, the broker or agent confirms that specification in writing. Both halves matter: the instruction has to be given at the moment of the trade, and it has to be followed by written confirmation. A taxpayer who simply decides later, when preparing a tax return, which shares they meant to sell has not made an adequate identification, because the regulation requires the choice to be made at the transaction itself, not reconstructed afterward.
What the identification actually controls is the gain's size and its character, and those two effects can pull in different directions. Identifying the highest-basis lot available generally minimizes the taxable gain on the sale, or maximizes a deductible loss, since a higher basis means a smaller spread between basis and sale proceeds. Identifying the longest-held lot can instead be used to secure long-term treatment on shares that would otherwise be short-term, even where that lot has a lower basis and produces a larger gain. Which of these matters more depends on the investor's situation: someone harvesting a loss wants the highest-basis lot regardless of holding period, while someone trying to avoid short-term rates on an otherwise appreciated position may accept a somewhat larger gain in exchange for long-term treatment. Specific identification is the only one of the basis methods that gives the investor this kind of direct control over the outcome, lot by lot, at the time of each sale.
Nothing about specific identification changes how the underlying basis of each lot was established or how it is adjusted over time. The regulation governs which lot a sale is charged against; it does not change the basis of any particular lot, which is set at acquisition and then adjusted for events such as reinvested distributions, exactly as covered on the page for cost basis. Specific identification is a tool for choosing among already-established lots, not a way to change what any one lot's basis is.
Miss the moment, and the default rule takes over automatically. Treasury Regulation 1.1012-1(c)(1)(i) provides that where a taxpayer sells shares of stock and does not adequately identify which shares were sold, the shares are charged against the earliest lot purchased or acquired, which is the first-in, first-out default. There is no way to retroactively claim a specific identification after the sale has already settled without one; the earliest-lot default has already applied by then. This is why the identification is described as a choice made at, or before, the moment of sale rather than a preference recorded at any later point.
Mutual fund shares eligible for the average basis method are a partial exception worth flagging, even though this page is about the general stock rule. A shareholder who has elected the average basis method for eligible mutual fund or dividend reinvestment plan shares is generally bound by that election going forward for those shares, which limits the ability to switch to specific identification for that position afterward. The average basis method itself, including which shares are eligible for it, is covered on its own page.