This tool runs in your browser. None of your data is saved or sold.
Average Cost Basis Calculator
Estimate average cost basis after buying shares at different prices.
About This Calculator
When you buy shares of the same stock at different prices, your average cost basis determines your profit or loss for tax purposes. This calculator handles two purchase lots and a current price to show your blended cost, total position, and unrealized gain or loss.
Estimates only — not financial, tax, legal, or investment advice. Verify important results with a qualified professional before making decisions.
avg cost = (Shares₁×Price₁ + Shares₂×Price₂) ÷ (Shares₁+Shares₂); unrealized P&L = (current − avg cost) × total shares
Related calculators: Dividend Yield Calculator, Portfolio Return Calculator, Compound Interest Calculator, Risk Reward Calculator