Stock Average Calculator
Calculate your weighted average stock price across multiple purchases. See total shares, cost basis, unrealized P&L, and break-even price. Supports FIFO, LIFO, and average cost methods.
sh
$
sh
$
sh
$
$
Weighted Average Cost Basis
—
Total Shares
Total Invested —
Current Value —
Unrealized P&L —
P&L % —
Extended More scenarios, charts & detailed breakdown ▾
sh
$
sh
$
$
New Average Cost
—
Total Shares
Cost Basis Reduction —
Shares Needed to Hit Target —
Cost to Hit Target Price —
Professional Full parameters & maximum detail ▾
sh
$
$
sh
$
$
sh
$
$
sh
$
sh
$
$
$
days
Cost Basis Methods
Average Cost Basis —
FIFO Cost Basis —
LIFO Cost Basis —
Position Summary
Total Shares
Total Invested (with commissions) —
Current Value —
Unrealized P&L —
Annualized Return at Sell Price —
How to Use This Calculator
- Enter the Shares and Price per Share for each purchase lot (Buy 1, Buy 2, Buy 3).
- Enter the Current Market Price to see your unrealized P&L.
- Use the Average Down tab to calculate how many shares to buy to hit a target average.
- Use the Dollar Cost Average tab to project DCA investing over multiple months.
- Use the Professional tab for up to 5 lots with commissions, FIFO/LIFO, and annualized return.
Formula
Weighted Average Cost = Total Cost (all lots) / Total Shares
Total Cost includes commissions per trade.
Unrealized P&L = (Current Price − Average Cost) × Total Shares
Annualized Return = ((Sell Price / Avg Cost)^(365 / Days Held)) − 1
Total Cost includes commissions per trade.
Unrealized P&L = (Current Price − Average Cost) × Total Shares
Annualized Return = ((Sell Price / Avg Cost)^(365 / Days Held)) − 1
Example
Example: Buy 1: 100 shares at $50 = $5,000. Buy 2: 50 shares at $40 = $2,000.
Total: 150 shares, $7,000 invested. Average cost: $46.67/share.
Current price $45: Unrealized P&L = −$250 (−3.57%). Break-even: $46.67.
Total: 150 shares, $7,000 invested. Average cost: $46.67/share.
Current price $45: Unrealized P&L = −$250 (−3.57%). Break-even: $46.67.
Frequently Asked Questions
- Weighted average cost basis = Total Amount Invested / Total Shares. For example: 100 shares at $50 + 50 shares at $40 = $5,000 + $2,000 = $7,000 total invested / 150 total shares = $46.67 average cost.
- Averaging down means buying more shares of a stock after its price has fallen, which lowers your overall average cost basis. This reduces the price the stock needs to reach for you to break even. It only makes sense if you believe the stock will recover.
- FIFO (First In First Out) assumes you sell your oldest shares first — cost basis is the price of the first lot purchased. LIFO (Last In First Out) assumes you sell your newest shares first. This affects your taxable gain when you sell. Average cost blends all lots.
- Dollar Cost Averaging means investing a fixed dollar amount at regular intervals (e.g., $500/month) regardless of price. When prices are lower, you buy more shares; when higher, fewer shares. Over time, this typically results in a lower average cost than lump-sum buying at a peak.
Related Calculators
Sources & References (5) ▾
- SEC — Investor Bulletin: Stocks — U.S. Securities and Exchange Commission
- FINRA — Dollar-Cost Averaging — Financial Industry Regulatory Authority
- IRS — Publication 550: Investment Income and Expenses — Internal Revenue Service
- IRS — Topic 409: Capital Gains and Losses — Internal Revenue Service
- SEC — Mutual Fund Cost Calculator — U.S. Securities and Exchange Commission