Financial Calculators
Stock Average Calculator
Calculate the weighted average cost basis from multiple buy transactions with optional commissions locally in your browser.
Enter each buy transaction with price per share, number of shares, and optional commission. The calculator computes the weighted average cost basis for your entire position. This calculator runs privately in your browser; your numbers are not uploaded or stored.
Find your average cost per share across multiple purchases.
Enter each buy transaction with its price per share, number of shares, and optional commission. The calculator computes the weighted average cost basis: total cost including commissions divided by total shares. For example, buying 100 shares at $50 and 50 shares at $60 with $5 commission each gives a total cost of $5000 + $3000 + $10 = $8010 for 150 shares, so the average cost is $53.40 per share. Adding more transactions recalculates the overall average. This private browser estimate helps you track your cost basis for tax and portfolio decisions; it does not include fees beyond the commissions you enter, wash sales, or corporate actions, and is not financial, investment, or tax advice. Your values are not uploaded or stored.
Frequently Asked Questions
Everything you need to know about this tool, how it works, and privacy.
How does the stock average calculator work?
Enter each buy transaction with its price per share, number of shares, and optional commission. The calculator adds up the total cost (price × shares + commission) for all transactions and divides by the total number of shares to find the weighted average cost per share. For example, 100 shares at $50 with $5 commission and 50 shares at $60 with $5 commission gives a total cost of $5,005 + $3,005 = $8,010 for 150 shares, so the average cost is $53.40 per share.
What is a weighted average cost basis?
A weighted average cost basis accounts for different purchase prices and quantities. Each transaction contributes to the average in proportion to its share count, so larger purchases have more influence on the final average than smaller ones. Commissions are included in the total cost.
Can I use this for tax cost basis tracking?
This calculator provides a general planning estimate for your average cost per share. For tax purposes, you may need to use specific lot identification (FIFO, LIFO, or specific share identification) as required by your tax jurisdiction. Consult a tax professional for official cost basis reporting.
How many transactions can I enter?
You can add as many transactions as you need using the Add transaction button. Each transaction requires a price per share and number of shares; commission is optional and defaults to zero.
Do my transaction values stay private?
Yes. All calculations and copy actions run locally in your browser. CodeASystem does not upload or store the values you enter.