Cost Basis

Cost basis is the original value of an investment for tax purposes — usually the price paid plus costs — used to calculate the taxable gain or loss when it is sold.

When you sell an investment, the tax question is not what you sold it for, but how much you gained. To work that out you need a starting value: the cost basis. Get it wrong and you can pay tax on money you never made, or report too little. This article uses US IRS and FINRA guidance as examples; rules differ by country, and none of this is tax advice.

Category
Accounting, Tax and Operations
Reading time
5 min
Also called
Tax basis, Adjusted basis
Updated

Cost basis in plain words

Cost basis is what an investment cost you, including the costs of buying it. In the US, for shares or bonds that means the purchase price plus things like commissions and transfer fees.1

When you sell, the gain or loss is roughly the sale proceeds minus your basis. The IRS describes a capital gain or loss as the difference between the adjusted basis and the amount realised from the sale.2

Reinvested dividends can add to your basis as well.3 See Capital Gains Tax and Realized and Unrealized P&L. Rules differ by country.

How to work out cost basis, step by step

  1. Record the purchase

    Note the date, quantity and price of each buy.

  2. Add buying costs

    Add commissions and fees to the purchase price; in the US these are part of the basis.1

  3. Add reinvestments

    Reinvested dividends or distributions buy more shares and add to basis.3

  4. Adjust for events

    Some events during ownership increase or decrease basis, giving an adjusted basis.1 A Stock Split and Reverse Split changes basis per share but not the total.

  5. Choose a lot method

    When selling part of a holding, use the method your rules allow, such as specific identification or first-in first-out.4

  6. Calculate the gain or loss

    Gain or loss = sale proceeds (after selling costs) − adjusted basis of the shares sold.2

Worked examples

Example 1 — Simple stock purchase

Gain $1,480

You buy 100 shares at $40 and pay a $10 commission. Later you sell all 100 at $55 with a $10 commission.

Example 1 — Simple stock purchase — calculation
Cost basis100 × $40 + $10 = $4,010
Net proceeds100 × $55 − $10 = $5,490
Gain$5,490 − $4,010 = $1,480

The commission on the purchase is part of the basis, which reduces the taxable gain.1

Example 2 — Reinvested dividends

Gain $700, not $1,000

You buy shares for $5,000. Over time, $300 of dividends are reinvested. You sell everything for $6,000.

Example 2 — Reinvested dividends — calculation
Cost basis$5,000 + $300 = $5,300
Gain$6,000 − $5,300 = $700
If you forgot the dividends$6,000 − $5,000 = $1,000 — overstated by $300

Reinvested dividends are part of the basis, so leaving them out overstates the gain.3

Example 3 — Which shares did you sell?

Gain $250–$750

You bought 50 shares at $20 and later 50 at $30. You sell 50 at $35.

Example 3 — Which shares did you sell? — calculation
FIFO basis (first 50)50 × $20 = $1,000 → gain 50 × $35 − $1,000 = $750
Specific ID (last 50)50 × $30 = $1,500 → gain $1,750 − $1,500 = $250
Difference$750 − $250 = $500 of gain

The same sale gives different gains depending on the method, which is why the method matters.4 Rules differ by country.

Cost basis vs. average entry price

AspectCost basisAverage entry price
PurposeTax reportingTrading decisions
Includes feesUsually yesOften not
Partial salesDepends on the lot methodAverage of remaining units unchanged
Set byTax lawYour platform or your own records

When cost basis matters

  • Selling investments

    Every taxable sale needs a basis to calculate the gain or loss.

  • Dividend reinvestment

    Each reinvestment adds a new lot with its own basis.

  • Transferring accounts

    Basis records must move with the holdings.

  • Tax-loss planning

    Knowing each lot’s basis shows which sales would realise losses.

Advantages and disadvantages

Advantages

  • Prevents paying tax on gains you did not make.
  • Gives an accurate gain or loss for each sale.
  • Lot methods can give some control over when gains are realised.

Disadvantages

  • Records must be kept for years.
  • Corporate actions and reinvestments make it complex.
  • Rules and methods differ by country and account type.
  • Broker figures can be incomplete for transferred or old holdings.

Going deeper

Read as far as you need. Each level builds on the one before it.

Basis is your starting value

Beginner

Basis is generally what you paid plus purchase costs.1 Gains and losses are measured from it.

Adjusted basis

Intermediate

Basis can change while you own an asset, which is why tax rules talk about adjusted basis.1 Reinvested dividends add to it.3

Lots and methods

Advanced

Each purchase is a separate lot. When you sell part of a holding, the chosen method — for example specific identification or FIFO — decides which lots are sold and so the size of the gain.4 Check the rules where you are taxed; this is not tax advice.

Common mistakes

  1. Leaving out commissions

    Using only the purchase price and overstating the gain.

  2. Forgetting reinvestments

    Ignoring reinvested dividends that added to the basis.

  3. Mixing up methods

    Assuming the broker’s default lot method is the one you wanted.

  4. Losing records

    Not keeping trade confirmations for older or transferred holdings.

Check your understanding

Test yourself before moving on. Each answer comes with an explanation.

Q1You buy 20 shares at $50 with a $5 commission. What is the cost basis?
Q2Why can forgetting reinvested dividends cost you money?

Key points to remember

  1. Cost basis is the starting value for calculating gains and losses.
  2. It usually includes purchase costs like commissions.
  3. Reinvested dividends and some events adjust it.
  4. Lot methods decide which shares are treated as sold.
  5. Tax rules differ by country; this is not tax advice.

Frequently asked questions

Is cost basis the same as the purchase price?

Not always. It usually adds purchase costs and can be adjusted later, for example by reinvested dividends.

Does my broker track cost basis?

Many brokers report it, but you are usually responsible for its accuracy, especially for transferred or older holdings.

Do these rules apply in my country?

The examples follow US guidance. Rules differ by country, so check your local tax authority or an adviser.

Further learning

Sources

This article is written in our own words. The sources below support the specific facts, rules and figures marked with a number in the text. Links open the original publisher’s page.

  1. IRS. Topic no. 703, Basis of assets (opens in a new tab) Checked .
  2. Internal Revenue Service. Topic no. 409, Capital gains and losses (opens in a new tab) Checked .
  3. FINRA. Cost Basis Basics (opens in a new tab) Checked .
  4. IRS. Publication 550, Investment Income and Expenses (opens in a new tab) Checked .

Educational content, not financial advice. Examples use hypothetical prices and simplified costs; actual fees, margin rules and regulations vary by broker, market and country. We are not affiliated with any publisher linked above. Last reviewed . Report an error or request a source credit.