GetHossa

Guides

Cost basis methods: FIFO, specific ID, average cost

Your broker picks a default cost basis method for you. See how FIFO, specific identification and average cost change the gain on the same sale, with the numbers.

By Published 20 Oct 20266 min read

Sell 100 shares from a position you built over five years and the gain on your 1099-B depends on a choice most investors never made: which shares count as the ones you sold. Your broker made it for you with a default setting. Same trade, same price, three methods — and three different taxable gains.

This guide shows what the methods are, what the Treasury regulations say about each, and what to check at your own brokerage before the next sale.

3

Common methods

FIFO, specific identification, average cost

2011

Basis reporting starts

stock bought after 2010 is a "covered security"

2012

Average-basis funds

mutual funds and DRIP shares bought after 2011

1 year

Long-term threshold

held more than one year

What cost basis is, and why the method matters

Cost basis is what you paid for a security (plus adjustments such as commissions). When you sell, the taxable gain or loss is the proceeds minus the basis of the shares sold. If you bought a stock in several lots at different prices, "the basis of the shares sold" is ambiguous — the method settles it.

The default in the Treasury regulations is first-in, first-out: if you don't adequately identify the lot sold, the sale is charged against the earliest lot you acquired (26 CFR § 1.1012-1(c)). You can override that by identifying specific shares.

The three methods

  • FIFO (first in, first out). The oldest shares are sold first. Simple and the legal fallback, but in a rising market the oldest shares usually have the lowest basis — so the largest gain.
  • Specific identification. You choose which lot to sell. This gives you control over the size of the gain or loss and over whether it is short- or long-term.
  • Average cost. Available only for mutual fund shares (and certain dividend reinvestment plan shares) held with a custodian. The basis is the average cost of all identical shares in the account, and the shares sold are treated as the ones acquired first. It is not available for individual stocks.

One sale, three results

Say you hold one stock in three lots and sell 100 shares at $150 in October 2026, with all lots held more than one year:

Lot Shares Bought Cost per share
A 100 Jan 2021 $50
B 100 Mar 2024 $80
C 100 Aug 2025 $120

Proceeds are 100 × $150 = $15,000.

Method Basis used Gain Tax at an illustrative 15%
FIFO (lot A) $5,000 $10,000 $1,500
Specific ID (lot C) $12,000 $3,000 $450
Average (for comparison only) 100 × $83.33 = $8,333 $6,667 $1,000
FIFO$10,000
Average cost$6,667
Specific ID$3,000

The average-cost row is for comparison: you could not use it for this stock. The 15% rate is illustrative; long-term rates are 0%, 15% or 20% depending on taxable income, and net short-term gains are taxed as ordinary income (IRS Topic 409).

How to actually identify the lot

With a broker holding your shares, two things must happen under the regulation: you specify the shares at the time of sale, and the broker confirms in writing within a reasonable time. Identification is timely if made no later than the settlement date. A standing instruction to use specific identification counts as made at the time of sale.

In practice that means:

  1. 1

    Set the account default

    In your broker's cost basis settings, choose the disposal method that applies when you don't pick lots (FIFO, highest cost, tax-lot optimizer — the names vary).

  2. 2

    Pick lots on each order

    On the trade ticket, choose "specific lots" and select the lot by purchase date or cost before you submit.

  3. 3

    Check the confirmation

    The trade confirmation should list the lots sold. If it shows something else, contact the broker before settlement.

  4. 4

    Match it to your 1099-B

    After year-end, compare the basis on Form 1099-B with your own records.

Covered, noncovered, and why records still matter

Brokers must report adjusted basis to the IRS for "covered" securities: stock acquired in an account after 2010, and mutual fund or dividend-reinvestment shares acquired after 2011 (IRS Instructions for Form 1099-B). Older shares and shares transferred in without basis information are "noncovered": the broker may show the basis, but it is not reported to the IRS, and you are responsible for getting it right.

That makes your own ledger valuable. If you moved positions between brokers or held shares for decades, keep the original confirmations and a running record of every purchase, reinvested dividend and split.

Common mistakes

  • Assuming the default is what you want. The default is a setting, and settings are easy to change before a sale — after settlement the lot is locked in.
  • Mixing methods across accounts. The same stock in two accounts can have two defaults.
  • Forgetting reinvested dividends. Each reinvestment is a separate lot with its own basis and holding period.
  • Ignoring the wash-sale rule when choosing a loss lot. Picking a high-basis lot to realize a loss does not exempt you from it; see tax-loss harvesting and the wash-sale rule.

Keeping lots straight across accounts

GetHossa matches every sale to earlier purchases first-in-first-out and lists each closed position with its holding period, which is a quick way to see the FIFO baseline for what you are about to sell. If your shares sit in several accounts, import each broker's history and read our guide to tracking a portfolio across multiple brokerages. The official figure is the one on your broker's 1099-B, not on any tracker.

Frequently asked questions

What is the default cost basis method?+

If you do not adequately identify the lot sold, Treasury regulations charge the sale against the earliest lot acquired — first in, first out. Brokers may apply their own default for mutual funds, such as average cost, so check your account settings.

Can I change the cost basis method after I sell?+

Generally no. Identification must be made no later than the settlement date of the sale. Change the account default or choose lots on the order before you sell.

Does average cost work for stocks?+

No. The average basis method is available for shares in a regulated investment company (mutual funds) and certain dividend reinvestment plans held with a custodian or agent.

What is a covered security?+

A security whose basis your broker must report to the IRS on Form 1099-B: generally stock acquired in the account after 2010, and mutual fund or DRIP shares acquired after 2011.

Sources

This article is for information and education only. It isn't investment or tax advice. Rules and broker practices change — check the current rules or talk to a tax advisor.

See your portfolio next to the S&P 500

Import your Interactive Brokers history or add trades by hand — GetHossa shows your real return, your TWR and your lead over the S&P 500.

Create account

Read next