Stock Average Calculator
Calculate weighted average cost, total shares, cost basis, unrealized gain or loss, and the impact of an optional new purchase.
How it works
A stock average calculator totals the cash committed across each lot and divides that cost basis by the total shares acquired. Fees increase the cost basis because they are part of what you paid to build the position.
Use one line per lot with the share quantity, share price, and optional flat fee. Add a current or target price when you want a quick unrealized gain or loss estimate.
Average cost per share = total cost basis ÷ total shares
The optional new-purchase fields show how one additional buy would change total shares, total cost basis, and average cost per share before you place an order.
Assumptions and limitations
This tool is for quick position planning with positive share quantities, non-negative prices, and optional flat fees. It does not fetch market quotes, adjust for dividends, splits, wash-sale rules, short positions, taxes, foreign exchange, margin interest, or account-specific rules.
Results are estimates for education and comparison only. They are not financial, tax, legal, or investment advice.
All calculations happen locally in your browser. Your lots, prices, and planning assumptions are not sent to a server.