Average cost calculator
Works out the average price paid per share across several purchases (the cost basis), and solves the reverse question: how many shares at a given price would move the average to a target. Fees are not included; add them to the price if you want them counted.
Inputs
Result
At $35.00 a share the position is worth $7,000.00: −$1,500.00 (−17.65%) against the cost basis. Break-even price: $42.5000.
Reach a target average
Adding 50.00 shares at $30.00 ($1,500.00) moves the average from $42.5000 to $40.00, on 250.00 shares in total.
Worked example
Purchases: 100 shares at $50, 50 at $40, 50 at $30.
Total cost = 100 × 50 + 50 × 40 + 50 × 30 = $8,500. Total shares = 200. Average cost = 8,500 ÷ 200 = $42.50.
To bring the average down to $40 by purchasing at $30: n = 200 × (42.50 − 40) ÷ (40 − 30) = 50 shares ($1,500.00). Check: (8,500 + 1,500) ÷ 250 = $40.00.
How it is calculated
The target can only be reached when it lies strictly between the purchase price and the current average: purchases below the average pull it down toward the purchase price but never past it, and purchases above it pull it up. Otherwise the calculator explains why there is no answer. Brokers may compute cost basis per lot (FIFO, specific identification) for tax purposes; this is the simple weighted average across all lots.
Other calculators
- CAGR calculatorCompound annual growth rate between a starting and an ending value over any number of years.
- Compound interest calculatorFuture value of a lump sum plus monthly contributions, with a year-by-year table.
- Dividend calculatorDividend income over time from a yield and a growth rate, with or without reinvesting (DRIP).
- Stock return calculatorPrice return and CAGR of a US stock between two dates, from our stored price history.
- DCF calculatorTwo-stage discounted cash flow model value per share, with a discount-rate sensitivity table.
Questions about the data behind these tools: see the help centre and the data methodology.
Data for information only, not investment advice. Figures may be delayed or inaccurate; verify against company filings. See our disclaimer.