Cost-Basis Lot Picker

FIFO or specific-ID cost basis for a stock sale.

Covers: cost basis, fifo, specific identification, lots, capital gains, shares.

Open the Cost-Basis Lot Picker tool →

How this works

When you sell part of a position you bought at different prices, which shares you sell changes your taxable gain. Two methods: FIFO sells your oldest lots first (the broker default), while specific identification lets you choose exactly which lots go, often to harvest losses or favor long-term shares. A harvested loss is only real if you stay out of the security: buying the same or a substantially identical one within 30 days either side of the sale disallows the loss under the wash-sale rule (IRC §1091), which moves it into the basis of the replacement shares instead. Enter each lot's shares, cost per share, and whether it's long-term (held more than one year), then a sale price.

We split the realized gain into short-term (taxed as ordinary income) and long-term (the preferential capital-gains rate), because the character matters as much as the amount. Feed the result into the Capital Gains tile to see the tax. Pure arithmetic on your numbers: confirm your broker's basis records, especially after splits or reinvested dividends.

Others in this area

Learn more

Free forever, with no account and no ads. Computed entirely on your device for U.S. taxes and benefits — nothing is ever sent anywhere. Educational information, not financial, tax, investment, or legal advice.

See all enklayve calculators →