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
Record the purchase
Note the date, quantity and price of each buy.
Add buying costs
Add commissions and fees to the purchase price; in the US these are part of the basis.1
Add reinvestments
Reinvested dividends or distributions buy more shares and add to basis.3
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.
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
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,480You buy 100 shares at $40 and pay a $10 commission. Later you sell all 100 at $55 with a $10 commission.
| Cost basis | 100 × $40 + $10 = $4,010 |
| Net proceeds | 100 × $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,000You buy shares for $5,000. Over time, $300 of dividends are reinvested. You sell everything for $6,000.
| 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–$750You bought 50 shares at $20 and later 50 at $30. You sell 50 at $35.
| 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
| Aspect | Cost basis | Average entry price |
|---|---|---|
| Purpose | Tax reporting | Trading decisions |
| Includes fees | Usually yes | Often not |
| Partial sales | Depends on the lot method | Average of remaining units unchanged |
| Set by | Tax law | Your 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
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
Leaving out commissions
Using only the purchase price and overstating the gain.
Forgetting reinvestments
Ignoring reinvested dividends that added to the basis.
Mixing up methods
Assuming the broker’s default lot method is the one you wanted.
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.
Key points to remember
- Cost basis is the starting value for calculating gains and losses.
- It usually includes purchase costs like commissions.
- Reinvested dividends and some events adjust it.
- Lot methods decide which shares are treated as sold.
- Tax rules differ by country; this is not tax advice.
Frequently asked questions
Is cost basis the same as the purchase price?
Does my broker track cost basis?
Do these rules apply in my country?
Further learning
- Capital Gains Tax
How gains measured from basis are taxed.
- Realized and Unrealized P&L
When a gain becomes taxable.
- Trading Fees and Commissions
Costs that change your basis.
- Stock Split and Reverse Split
How splits change basis per share.
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.
- IRS. Topic no. 703, Basis of assets (opens in a new tab) Checked .
- Internal Revenue Service. Topic no. 409, Capital gains and losses (opens in a new tab) Checked .
- FINRA. Cost Basis Basics (opens in a new tab) Checked .
- 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.