CommunitySign in

Share

Trading and risk

Definition

Cost basis is the total amount paid to acquire an asset, including fees. Divided by the quantity held, it gives the average cost per unit, the reference point for measuring profit or loss and for tax reporting.

How it works

For a single purchase, cost basis = purchase price × quantity + purchase fees. For several purchases at different prices, add up everything paid and divide by the total quantity: average cost per unit = total paid including fees ÷ total units. Brokers and exchanges often show this as the average price of a holding, although some leave fees out of that figure.

Cost basis is the starting point for profit and loss. Gain or loss on a sale = sale proceeds − cost basis of the units sold. Leaving fees out makes the basis too low, so the gain looks larger than it really is. Buying more at a new price changes the average cost. Under the average-cost method, selling part of a position does not change the average cost of the units that remain.

For taxes, the rules decide which units count as sold. Some systems match the earliest purchases first (first in, first out, or FIFO), while others allow an average cost or a specific choice of units. The methods, and what counts as a cost, differ by country and by asset type, so a tax figure can differ from the average price shown in a trading app. Moving coins between wallets or exchanges can also break the record if the purchase history is not kept.

Example (hypothetical numbers)

Suppose you buy 100 shares of Company X at $20 with a $10 fee, then another 100 shares at $30 with a $10 fee.

Total paid = (100 × $20 + $10) + (100 × $30 + $10) = $2,010 + $3,010 = $5,020.

Average cost per share = $5,020 ÷ 200 = $25.10, not the $25.00 you get by averaging the 2 prices and ignoring fees.

If you later sell all 200 shares at $28, the gain before selling costs is 200 × $28 − $5,020 = $580, not $600.

Including fees in the cost basis gives the true break-even price and a more accurate gain.

Common mistakes

  • Leaving trading fees out of the cost basis, which understates the cost and overstates the gain.
  • Losing the purchase record when coins are moved between wallets or exchanges.
  • Assuming the average price shown in an app matches the cost method used for tax in your country.

Related calculators

This glossary is for education only and is not investment advice. Examples use hypothetical numbers.

All glossary terms