Blog

Understanding Cost Basis: How to Calculate Your Average Price With Dollar-Cost Averaging

By Ammad Humayun ·

Illustration of multiple purchase prices being combined into a single weighted average cost basis∑

After a dozen small purchases at different prices, "what did I actually pay?" stops being a simple question — unless you know which average to calculate.

Buying the same asset at five different prices over five months is common practice — it's the entire idea behind dollar-cost averaging — but it leaves behind a question that a single-purchase investor never has to ask: what price, exactly, did I pay? The answer is a weighted average, not a simple average, and the difference between those two matters.

Why a simple average is the wrong calculation

A simple average treats every purchase price equally regardless of how much was bought at that price. If you bought a small amount at a high price and a large amount at a low price, a simple average overstates your real cost, because it doesn't weight by quantity purchased. The correct calculation is a weighted average: total money spent divided by total units acquired.

The formula

Average Cost Basis = Total Amount Invested ÷ Total Units Purchased

A worked example

Average Cost Basis = $600 ÷ 17.000 units = $35.29 per unit
PurchaseAmount investedPrice per unitUnits acquired
1$200$40.005.000
2$200$25.008.000
3$200$50.004.000
Total$600—17.000

Why this differs from the simple average

A simple average of $40, $25 and $50 is exactly $38.33 — higher than the correct $35.29 weighted figure. The weighted average is pulled lower because more units were bought at the cheaper $25 price, and that purchase should count for more in the average precisely because more money and more units were involved.

Finding your break-even point

Once you have the average cost basis, your break-even price is the same number, before accounting for fees and taxes: if the current market price is above your average cost basis, the position is showing an unrealized gain; below it, an unrealized loss.

Unrealized Gain/Loss (%) = ((Current Price − Average Cost Basis) ÷ Average Cost Basis) × 100
Example: Current price $45 vs average cost basis $35.29 → (($45 − $35.29) ÷ $35.29) × 100 ≈ 27.5% unrealized gain

Fees change the real average cost

Trading fees, whether a flat amount or a percentage per transaction, effectively increase what you paid for each purchase. To calculate a true average cost, add total fees paid to total amount invested before dividing by total units — skipping this step slightly understates your real break-even price.

Why dollar-cost averaging affects the average itself

Because DCA buys a fixed dollar amount at regular intervals rather than a fixed quantity, it automatically buys more units when the price is low and fewer units when the price is high. This naturally pulls the weighted average cost basis toward the lower prices in a volatile period, which is the mathematical reason DCA tends to produce a lower average cost than buying a fixed number of units on the same schedule.

How irregular purchase amounts still average correctly

The weighted average formula works identically whether every purchase is the same dollar amount (classic DCA) or the amounts vary — an inheritance added as a lump sum, or a smaller purchase during a tight month. As long as every purchase's dollar amount and resulting units are tracked, summing the totals and dividing produces an accurate average cost basis regardless of how irregular the contribution pattern was.

Why tracking every purchase matters more with volatile assets

For an asset with large price swings, such as many cryptocurrencies, the weighted average can move meaningfully with each new purchase, especially early on when the total position is still small. Keeping a running log of each purchase's date, amount and price — rather than relying on a platform's summary, which doesn't always calculate cost basis the same way for tax purposes — avoids a mismatch between what you believe your break-even price is and what a tax filing later requires.

A three-purchase example with fees included

Say you buy 10 units at $50 for $500, then 10 units at $40 for $400, then 5 units at $60 for $300, paying a $2 fee on each purchase. Total invested is $500 + $400 + $300 + $6 = $1,206 for 25 units, so the average cost basis is $1,206 ÷ 25 = $48.24 per unit. Averaging the three prices instead, ($50 + $40 + $60) ÷ 3 = $50, ignores how many units each purchase bought and overstates the cost.

Your break-even selling price is at least $48.24, and higher if a selling fee applies. Keep a record of the date, units, price and fee for every purchase. Some jurisdictions require particular lot-matching rules when you sell part of a holding, so this figure is for planning and does not replace tax guidance.

Make the cost basis match the records

Average cost is only as reliable as the purchase history behind it. Keep the quantity, purchase price, fees and dates for each transaction, especially when assets are sold between purchases or transferred between accounts. A simple average of the listed prices can be misleading because purchases may represent different numbers of units.

Frequently asked questions

Does average cost basis account for units I've already sold?

It should. If you sold some units, most cost-basis methods recalculate the average using only the units still held, or use a specific accounting method like FIFO — check which method applies in your situation, since it affects taxes.

Is average cost basis the same worldwide for tax purposes?

No. Some tax authorities require FIFO (first-in, first-out) or specific-lot identification instead of an average-cost method, particularly for stocks. Confirm which method your tax jurisdiction requires.

Does average cost basis include transfers between wallets or accounts?

Simply moving an asset between your own wallets or accounts shouldn't change its cost basis, but it's important to keep records, since exchanges and wallets don't always track cost basis across a transfer automatically.

Why is a simple average of purchase prices often wrong?

Because each purchase may contain a different quantity. Average cost should weight each purchase by the number of units acquired.

Do fees belong in average cost?

If your accounting or tax method treats transaction fees as part of acquisition cost, they affect the effective cost basis. Follow the rules applicable to the asset and jurisdiction.

Conclusion

Your true average cost with multiple purchases is a weighted average — total money in divided by total units held — not a simple average of the prices you saw along the way. Include fees in the total invested amount, and use the resulting figure as your real break-even price when deciding whether a position is actually profitable.

Written by Ammad Humayun
Ammad Humayun writes the calculation guides on this site, using stated formulas and worked examples. If you spot an error or an unclear step, please tell us and we will check it against the formula.
Run your own numbers
Try the Crypto DCA Calculator to apply this to your own figures.

Figures in this article are illustrative. Results depend on your own rates, fees, taxes and circumstances, and are for educational and planning purposes rather than financial advice.

Related articles

← Back to Blog