Stock Average Calculator
Work out your average cost per share after buying the same stock at two different prices.
Last updated · View algorithm, constants and default inputs (JSON)
About this calculator
Calculate the weighted average purchase price and total cost from two transactions. This is arithmetic only and is not a recommendation to buy, sell or average down; fees and taxes are not included.
Worked example
calculated with the default values below
Shares in first purchase 100 shares · Price per share (first) 50 $ · Shares in second purchase 50 shares · Price per share (second) 40 $ Average cost per share 46.6667 $ · Total shares 150 shares · Total cost 7,000.00 $ · Difference from first price 3.3333 $
General background references
Disclaimer
These calculators give estimates for general information only. They are not financial, tax or investment advice and do not take your personal circumstances into account. Before borrowing, investing or filing, confirm the numbers with a qualified adviser in your jurisdiction.
Implementation source
This record describes the implementation used by this page. It is not independent validation. External references, when available, support only the stated formula or definition; estimates and custom rules retain their own assumptions.
Formula and variables
p_avg = (n₁p₁ + n₂p₂) ÷ (n₁ + n₂)
- n₁
- First lot shares
- p₁
- First price
- n₂
- Second lot shares
- p₂
- Second price
Signed difference from the first purchase price = first price − weighted average price. A positive or negative result is not money saved and does not include fees or taxes.
Frequently asked questions
How does the weighted average purchase price work?
It adds the costs of both purchases and divides by the combined number of shares. A purchase with zero shares contributes neither shares nor cost. The difference from the first purchase price can be positive or negative; it is not money saved or a break-even price after fees. Taxes and transaction fees are not included.