GlossaryGlossary

What Is Cost Basis? Definition and Example

Cost basis is what you paid for an investment, and it decides your gain or loss when you sell. Here is how it is calculated, with an average‑cost and FIFO example.

Published Updated 2 min readHow we research

Key takeaways

  • Cost basis is the original value of an investment for tax and performance purposes: for shares you buy, the purchase price plus costs such as commissions. Gain or loss = sale proceeds − cost basis.
  • When you buy the same stock several times, the method matters. Illustrative: the same sale shows a $75 gain under average cost and a $200 gain under FIFO.
  • Basis changes after events such as stock splits, reinvested dividends and some wash sales, so the purchase price alone is not always the basis.

What is your own portfolio exposed to? Check it with Exent →

What is cost basis?

Cost basis is the amount you are treated as having invested. The IRS describes it as generally what you paid; for stocks and bonds, “the purchase price plus any additional costs such as commissions” (IRS Topic No. 703). Shares you inherit or receive as a gift follow different rules.

See how this applies to your own holdings with an Exent portfolio check.

How is cost basis calculated across several purchases?

  • Average cost: total paid ÷ total shares. See the average cost method.
  • FIFO (first in, first out): the oldest shares are treated as sold first.
  • Specific identification: you choose which lot you sell, if your broker supports it.

Example: average cost vs FIFO

Illustrative: buy 10 shares at $100, then 10 at $150. Later, sell 5 shares at $140 ($700).

MethodBasis of the 5 shares soldRealized gain
Average cost ($125 a share)$625$75
FIFO (from the $100 lot)$500$200
Specific ID (from the $150 lot)$750−$50

Same trade, three different taxable results. The method you use must match what your broker reports.

Why does it matter for a self‑directed investor?

Basis drives both your tax bill and your sense of what is working. Without it, you cannot separate realized and unrealized gains or judge a position’s real profit. See the average cost method.

Common mistakes

  • Forgetting reinvested dividends. Each reinvestment is a purchase that adds to basis.
  • Not adjusting for splits. After a split, basis per share falls but total basis stays the same. See stock split cost basis.
  • Ignoring wash sales. A disallowed loss is added to the basis of the replacement shares. See wash sale.

This is general education, not tax advice. Your broker’s tax forms and a tax professional are the reference for your return.

Track cost basis and P&L with Exent

  1. Upload a screenshot of your holdings, or a CSV, Excel, PDF or Google Sheet; no brokerage login.
  2. Exent tracks cost basis and P&L with the average cost method and adjusts for stock splits.

Exent is our product. Educational content, not investment advice.

Frequently asked questions

Yes. For shares you buy, the IRS says basis is the purchase price plus costs such as commissions and transfer fees.

Total basis stays the same and is spread over more shares, so basis per share falls in proportion to the split.

Brokers keep purchase records for most recent holdings. For older or transferred shares, past statements or historical prices can reconstruct it.

Average cost is one way to calculate cost basis when you bought shares at different prices. FIFO and specific identification are others.

See what your portfolio is really made of.

Upload a screenshot of your holdings and get concentration, overlap, crash exposure and a risk-matched benchmark in about a minute.

Check my portfolioLimited offer$1.95 for unlimited checks· unlimited checks

Educational content, not investment advice. Examples are illustrative; past performance does not guarantee future results.

DISCLAIMER: Exent AI is an informational research platform and does not provide investment advice, financial advice, or act as an investment adviser, broker-dealer, or fiduciary. All content, analytics, and model outputs are provided for educational and informational purposes only and should not be relied upon as a recommendation to buy, sell, or hold any financial instrument. Investing involves risk, including the possible loss of principal. Exent AI does not execute trades, hold customer funds, or provide brokerage services. Past performance and hypothetical results are not indicative of future results. Third-party data and AI-generated outputs may be incomplete or inaccurate.