Finance / Stock Average Cost

Stock Average Cost calculator

Combine several share purchases into one average cost and break-even price.

Your answer will appear here.

Formula: Average cost = (sum of shares × price for every lot + commission) ÷ total shares.

The basics

Why average cost matters

Every buy changes your cost basis, which is the number used to judge a position and to report a gain or loss. Averaging is simple: total what you spent, then divide by the shares you own. Adding a commission raises the break-even price slightly, so the position needs a marginally higher sale price to be flat. This tool does not account for reinvested dividends or stock splits.

In practice

Worked examples

Input

10, 100 and 10 @ 120

Answer

Average cost 110.00 · 20 shares

Input

5 x 10, 15 20, commission 2

Answer

Average cost 17.60 · 20 shares

Good to know

Frequently asked questions

One lot per line as shares then price, for example 10, 150. Commas, spaces, or @ between the two numbers all work.

Keep going