Calculate your quantity-weighted average purchase price across up to 6 purchases of anything — stocks, crypto, ETFs, or physical goods — with break-even price and an optional unrealized gain/loss check, computed instantly in your browser.
📂 Personal FinanceFill in the fields on the left with your own numbers, then press Calculate to see your result instantly. No sign-up required, and no data is sent anywhere — everything is calculated right in your browser.
When you buy the same asset multiple times at different prices — shares of a stock, units of a cryptocurrency, ETF units, or even inventory for a business — a single "average purchase price" is more useful than looking at each price separately. This is exactly the arithmetic behind a dollar-cost averaging (DCA) strategy, where you invest fixed amounts on a regular schedule regardless of price. This calculator computes that average the correct way: weighted by quantity, so a purchase of 100 units influences the average ten times more than a purchase of 10 units at the same price would. Enter the price and quantity for each purchase, and the calculator totals your cost, totals your quantity, and divides one by the other to give your true average cost basis and break-even price — optionally comparing it to a current price you supply to show your unrealized gain or loss.
It's tempting to average purchase prices the simple way — add up the prices and divide by the number of purchases. But this simple average silently assumes every purchase was the same size, which is rarely true in practice. If you bought 100 units at a low price and later just 5 units at a much higher price, a simple average of the two prices would overstate what you actually paid overall, because it treats the small, expensive purchase as equally important as the large, cheap one.
A quantity-weighted average fixes this by basing the calculation on total money spent divided by total units acquired, rather than on the prices alone. This is the same approach used to calculate a "cost basis" in investing — the reference point used to measure gain or loss when you eventually sell. Whether you're tracking shares bought over several trades, cryptocurrency bought during different market conditions, or physical inventory purchased from multiple suppliers at different times, the weighted average price answers the same practical question: what did each unit really cost me, on average, given everything I've spent and everything I've acquired?
Once you know your weighted average price, comparing it to a current market or resale price becomes meaningful — the difference tells you your unrealized gain or loss, expressed both as a total amount and as a percentage of what you spent. This calculator keeps that current price entirely optional and entirely yours to supply, since it does not look up or track any real market data itself; it only performs the arithmetic on the numbers you provide, so it stays accurate for any asset, in any currency, at any point in time.
This same weighted-average math is the arithmetic underneath dollar-cost averaging (DCA) — a strategy where you invest a fixed amount on a fixed schedule (weekly, monthly, or otherwise) regardless of whether the price is high or low that period. Because the amount invested is fixed rather than the quantity, a cheap period buys you more units and an expensive period buys you fewer, so your weighted average cost is automatically pulled toward the price levels where you bought the most — one of the main reasons DCA is used to reduce the impact of trying to time entry points. Log each of your recurring buys as a separate purchase lot here to see exactly where your DCA strategy has landed you, including the break-even price your position would need to reach for you to come out even.
It's the total amount you spent across all your purchases divided by the total quantity you bought — so a larger purchase counts proportionally more toward the average than a smaller one, unlike a simple average of the prices alone.
A simple average treats every purchase equally regardless of size. If you bought a large quantity at a low price and a small quantity at a high price, the weighted average will sit closer to the low price, because it reflects what you actually paid overall, not just the prices you saw.
DCA means buying a fixed amount of the same asset at regular intervals regardless of price, rather than investing a lump sum all at once. Enter each of your recurring buys as a separate purchase lot, and the calculator combines them into your true quantity-weighted average cost — showing how DCA naturally pulls your average toward the price levels where you bought the most.
The break-even price is the price you would need to sell at (or the asset would need to reach) to recover exactly what you spent, with no gain or loss. It is mathematically the same figure as your weighted average purchase price.
Yes — the math is the same regardless of what you're buying. You can use it for shares, cryptocurrency, ETFs, mutual funds, precious metals, inventory, or any other item bought in multiple lots at different prices.
If you enter a current market or resale price, the calculator compares it to your total cost and shows an unrealized gain or loss — the profit or loss you'd have if you sold your entire position at that price today. This field is optional and entirely up to you to fill in.
No — only the price and quantity you enter for each purchase are used. If you want fees included, add them into the price you enter for that purchase, or track them separately.