You bought the same security at different prices and need a consistent scenario estimate before comparing a sale price.
Stock Average Cost Calculator
Calculate weighted average purchase cost, total shares, total invested amount, and optional transaction fees across multiple stock purchases.
Enter the shares and price for each purchase.
Your purchase entries are calculated locally in your browser and are not uploaded to a server.
Combine several purchases into a weighted average
Purchases
Use the same currency for every price. Fractional shares are allowed.
| Purchase | Shares | Price per share | Cost with fee | Remove |
|---|---|---|---|---|
| 1 | $400.00 | |||
| 2 | $1,500.00 |
Purchase arithmetic only. Broker and tax cost basis may include lot elections, wash-sale adjustments, corporate actions, distributions, taxes, and other account-specific rules.
Calculate weighted average cost across stock purchases
Add each purchase's share count, price, and optional fee to calculate total shares, total invested amount, and weighted average cost per share.
The arithmetic average may not equal the tax cost basis shown by a broker because tax lots, corporate actions, wash sales, and local rules can differ.
Position Size Calculator: Estimate shares from account risk, entry price, stop price, available capital, and optional transaction fees.
About this tool
Calculate weighted average purchase cost, total shares, total invested amount, and optional transaction fees across multiple stock purchases.
Your purchase entries are calculated locally in your browser and are not uploaded to a server.
This is purchase arithmetic, not a broker-confirmed or tax cost basis. Corporate actions, reinvested distributions, wash-sale or equivalent rules, foreign exchange, taxes, and account-specific adjustments may change official records.
How to use it
- Enter the shares and price for each purchase.
- Choose an optional fixed or percentage fee method and use one currency consistently.
- Calculate total shares, total cost, and weighted average cost per share.
Common use cases
- Combine several purchases into a weighted average
- Estimate a new average before adding shares
- Include simple transaction-fee assumptions
- Separate purchase arithmetic from current market performance
Weighted Average Purchase Cost
Multiply the shares in each purchase by its price, add any transaction costs you choose to include, total all purchases, and divide by total shares. Do not average the price rows without weighting them by quantity.
| Purchase | Cost before fees | Weighted contribution |
|---|---|---|
| 10 shares at $40 | $400 | 10 shares |
| 30 shares at $50 | $1,500 | 30 shares |
| Combined | $1,900 | $47.50 per share before fees |
Calculator Average Versus Tax Cost Basis
The arithmetic result can help with scenario planning, but a tax cost basis may depend on the security type, jurisdiction, account election, lots sold, reinvested distributions, wash-sale adjustments, and corporate actions.
- Reconcile the calculator with broker confirmations rather than replacing official records.
- Keep fees either included for every row or excluded for every row when comparing scenarios.
- Ask a qualified tax professional which lot-identification or average-basis rules apply to the account.
FAQ
How is average stock cost calculated?
Add the cost of every purchase, including any fees you choose to include, then divide by the total number of shares.
Is this a simple average of the prices?
No. It is weighted by share count, so a larger purchase has more effect on the average than a smaller purchase.
Can I enter fractional shares?
Yes. The calculator accepts fractional shares as long as the value is positive.
Does this calculate my tax basis?
No. Tax basis can depend on jurisdiction, account elections, wash sales, corporate actions, and broker adjustments. Use official records or a qualified tax professional.