Understanding Cost Basis
Cost basis represents the average price you paid per share across all your purchases of a particular stock. Unlike buying a single block of shares at one price, multiple buys at varying prices require a weighted calculation to find your true average entry point.
This figure matters for three reasons:
- Profit calculation: You need cost basis to determine gains or losses when you sell.
- Tax reporting: The IRS requires accurate cost basis for capital gains calculations.
- Strategy assessment: Knowing whether you're averaging down (reducing cost basis) or chasing price increases helps evaluate your investment discipline.
Many investors underestimate how multiple purchases at different prices compound into a single meaningful metric that shapes their entire return profile.
Cost Basis Formula
Cost basis is calculated as a weighted average: multiply each purchase price by the number of shares bought at that price, sum all those products, then divide by your total share count.
Cost Basis = (p₁ × q₁ + p₂ × q₂ + ... + pₙ × qₙ) ÷ (q₁ + q₂ + ... + qₙ)
p₁, p₂, ... pₙ— Purchase price per share for each buy transactionq₁, q₂, ... qₙ— Number of shares purchased at each respective pricen— Total number of shares across all purchases
Calculating Profit and Loss
Once you know your cost basis, determining profit or loss is straightforward: subtract your average cost from the current market price, then multiply by total shares owned.
The formula is:
Profit/Loss = (Current Price − Cost Basis) × Total Shares
For example, if your cost basis is £42.50 and the stock now trades at £58.00, with 100 shares held, your unrealised gain is (£58.00 − £42.50) × 100 = £1,550.
To express this as a percentage return, divide the per-share profit by your cost basis: ((£58.00 − £42.50) ÷ £42.50) × 100 = 36.5% gain.
Cost Basis and Investment Strategy
Savvy investors use cost basis awareness to refine their approach. When you identify that you're successfully averaging down—buying additional shares at prices lower than your previous cost basis—you're mathematically reducing your risk per share and improving your breakeven point.
However, averaging down only works if you have conviction in the company's fundamentals. Blindly catching falling knives by buying a declining stock can trap you with a larger position at prices that continue to fall.
Market volatility creates opportunities to layer into positions methodically. By building positions gradually at varying price points rather than committing capital in one lump sum, you smooth your entry and potentially lower your overall cost basis during downturns.
Common Pitfalls and Considerations
Several mistakes can distort your cost basis calculation or lead to poor investment decisions based on it.
- Ignoring brokerage commissions — Trading fees can meaningfully raise your true cost per share, especially on smaller purchases. Some brokers charge per-trade commissions that can add 0.5–2% to your effective entry price. Track these separately if they're material to your analysis.
- Confusing cost basis with valuation — A low cost basis doesn't mean a stock is a good buy at current prices. You may have bought brilliantly at £25 per share, but if the stock now trades at £15 and fundamentals have deteriorated, your historical average is irrelevant to the forward decision.
- Tax-loss harvesting without tracking — If you sell part of your position, you must correctly attribute which shares were sold (FIFO, LIFO, or specific identification). Misidentifying cost basis for tax purposes can lead to overpaying capital gains tax or, worse, IRS scrutiny.
- Overlooking dividend reinvestment — If dividends are automatically reinvested, each reinvestment is a new purchase at a new price. This lowers your cost basis over time, but only if you accurately track each reinvestment as a separate transaction.