# 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.

Source: https://www.exent.ai/learn/cost-basis · Reviewed by David, Senior Analyst, Exent · Published Nov 19, 2026 · Updated Nov 19, 2026

## 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 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](https://www.irs.gov/taxtopics/tc703)). Shares you inherit or receive as a gift follow different rules.

## How is cost basis calculated across several purchases?

- **Average cost:** total paid ÷ total shares. See [the average cost method](https://www.exent.ai/learn/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).

| Method | Basis of the 5 shares sold | Realized 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](https://www.exent.ai/learn/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: [Exent portfolio check](https://www.exent.ai/portfolio)

## Frequently asked questions

### Does cost basis include commissions?

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

### What happens to cost basis after a stock split?

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

### What if I don’t know my cost basis?

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

### Is cost basis the same as average cost?

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

---

Educational content, not investment advice. Past performance does not guarantee future results.
