How this calculator works
Find a quantity-weighted average price across share purchases. Enter one share quantity and price per purchase, keeping the order aligned. An optional current price adds a market value and unrealized gain comparison. The calculation assumes no sales and no changes in share basis between purchases; it excludes commissions and tax adjustments.
Formula
Total shares = sum(purchase quantities). Total cost = sum(quantity × purchase price). Average purchase price = total cost / total shares. Unrealized gain = total shares × current price - total cost.
Worked example
Buying 100 shares at $20 and 50 at $26 costs $3,300 for 150 shares, averaging $22. At $24 current price the unrealized gain is $300. Buying 10 at $10 and 30 at $14 averages $13.
Advertisement
Frequently asked questions
Why not average the prices directly?
A simple price average gives each purchase equal weight even when quantities differ. This tool weights every price by shares bought.
Can I omit the current price?
Yes. Leave it blank for acquisition totals only. Entering zero explicitly values the holding at zero.
Is this my tax cost basis?
It is an acquisition-price summary. Fees, sales, reinvestments, corporate actions and local tax rules can change reportable cost basis.