Calculate your quantity-weighted average purchase price across up to 6 purchases of anything — stocks, crypto, or physical goods — with 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, or even inventory for a business — a single "average purchase price" is more useful than looking at each price separately. 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 — 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.
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.
Yes — the math is the same regardless of what you're buying. You can use it for shares, cryptocurrency, 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.