Stock Average Calculator
This Stock Average Calculator computes weighted average share price, updates averages after additional purchases or sales, and helps estimate target sell prices. It supports both aggregate totals and up to six detailed trade rows for flexible input.
Results assume the average-cost approach to cost basis unless you track lots (FIFO/LIFO). Use row entry or aggregate totals as appropriate. For tax reporting or lot-level profit calculations, consult your broker or tax advisor.
Update your average price after buying additional shares. Uses weighted average (cost basis aggregated).
Inputs
Advanced inputs
Trade rows (up to 6)
Results
Updated average price
$10.18
Total shares after purchase
110
Total cost after purchase
$1,120.00
| Output | Value | Unit |
|---|---|---|
| Updated average price | $10.18 | USD |
| Total shares after purchase | 110 | shares |
| Total cost after purchase | $1,120.00 | USD |
Visualization
Methodology
The tool uses weighted-average arithmetic: average price = total cost / total shares. When adding purchases we sum prior cost and new cost, then divide by combined shares.
For sales, the calculator assumes the average-cost method where cost basis decreases proportionally; realized profit or loss is computed as shares sold × (sale price − average cost). Lot-level accounting (FIFO/LIFO) is outside this calculator's scope.
Worked examples
Aggregate example: 150 shares total cost $1,650 → average = 1650 / 150 = $11.00 per share.
Add purchase example: hold 100 shares at $10, buy 50 shares at $12 → new average = (100×10 + 50×12) / 150 = $10.67.
Sale example: hold 100 shares at $10, sell 20 at $15 → realized profit = 20 × (15 − 10) = $100; remaining shares = 80 and average remains $10 under average-cost method.
Key takeaways
Use aggregate mode when you have total shares and total cost. Use row entry for per-trade inputs. Use add-purchase to update average after a new buy, and use sale mode to compute realized P/L assuming average-cost basis.
This tool is not a substitute for broker lot reports or tax advice. For precise tax treatment, refer to your tax authority and broker statements.
Further resources
External guidance
Expert Q&A
Does this calculator handle FIFO or LIFO?
No. This calculator uses the average-cost approach. For FIFO/LIFO (lot-level) calculations you need transaction-level lot tracking and broker reports; consult your broker or tax advisor for lot-level realized P/L.
Are results exact for tax reporting?
Results are estimates based on the inputs and assumptions you select. Taxable gain/loss depends on jurisdictional rules, broker lot selection, fees, and applicable tax regulations. Consult a tax professional before filing.
Can I include transaction fees and commissions?
Yes. For accurate cost basis, add fees to the cost of the corresponding purchase (or subtract from sale proceeds). This calculator treats fees as part of cost when included in the inputs.
What rounding and precision does the calculator use?
Displayed values are rounded to two decimal places for prices and currency amounts. Underlying calculations use full precision; round-off may produce small differences.
Sources & citations
- NIST - National Institute of Standards and Technology — https://www.nist.gov
- ISO 31000 — Risk management — https://www.iso.org/iso-31000-risk-management.html
- IEEE standards (numeric computing and formats) — https://www.ieee.org
- OSHA — Occupational Safety and Health Administration — https://www.osha.gov