If you buy stocks, ETFs or cryptocurrencies across several trades over time, it's easy to lose track of whether your investment is up or down. The answer doesn't depend on the price of your latest purchase — it depends on your average cost basis, a simple concept that a lot of people calculate wrong, or don't calculate at all.
What is average cost basis?
Average cost basis is the single equivalent price that summarizes all your purchases of the same asset, weighted by how much you bought in each trade. It's not a simple average of the prices: if you bought more units in one trade than another, that trade carries more weight in the final result.
Average cost = (quantity₁ × price₁ + quantity₂ × price₂ + ...) ÷ (quantity₁ + quantity₂ + ...)
A numbers example
Imagine you buy shares of a company across three separate trades:
| Purchase | Quantity | Price | Cost |
|---|---|---|---|
| 1 | 10 | €100 | €1,000 |
| 2 | 10 | €90 | €900 |
| 3 | 5 | €110 | €550 |
| Total | 25 | — | €2,450 |
Your average cost basis is €2,450 ÷ 25 = €98 per share. If the current price is €105, your unrealized gain is (105 − 98) × 25 = €175 — not what it would look like if you only compared it to your last purchase at €110, which on its own would appear to be a loss.
What is dollar-cost averaging (DCA)?
Buying periodically with a fixed amount, instead of investing all your capital at once, is known as dollar-cost averaging (DCA). It's one of the most commonly recommended strategies for anyone investing on a recurring basis — for example, every month out of their paycheck — because it removes the need to time the "best moment" to enter the market, something even professionals rarely manage to do consistently.
With DCA, when the price drops you buy more units with the same money, and when it rises you buy fewer. Over time, this smooths out the effect of volatility on your average cost.
Advantages and disadvantages versus investing a lump sum
In favor of DCA:
- Reduces the risk of putting all your capital in right before a sharp drop.
- Easier to stick with psychologically, especially in volatile markets like crypto.
- Fits naturally with anyone investing out of monthly savings rather than a lump sum already on hand.
Against it:
- If you already have all the capital available upfront and the market trends upward, investing it all at once has historically returned more on average, simply because the money spends more time invested.
- It means more transactions, which can add up in fees if your broker charges per trade.
Average cost and taxes
When you sell only part of your holdings, many countries use average cost (or other methods like FIFO, "first in, first out") to calculate the gain or loss for tax purposes. The exact method varies by country of residence and asset type, so it's worth checking your local rules before selling, especially if you bought at very different times and prices.
Calculate your average cost now
Instead of doing the math by hand every time you buy, use our average cost calculator: enter your purchases and the current price, and instantly get your average cost, your unrealized gain or loss, and the total value of your position.