Free tools that run in your browser. Use any tool without an account.

Favourites Cart
Sign in
Join free

Stock Average Calculator

  • Free
  • Runs in your browser
  • No account needed

This calculator shows your weighted average cost per share, total cost, current value, profit or loss, and shares to buy for a target. Example: 150 shares with $11.80 average costs $1,770 and shows $30 profit at $12.

Average cost per share
$46.25
Total shares
200
Total cost
$9,250.00
Value at the current price
$9,600.00
Profit or loss
$350.00
Return
3.78%
Shares to buy to reach your target average
50
Runs in your browser. Your files and values are not sent to us. Report a problem
Advertisement

About the Stock Average Calculator

Enter each buy as shares and price, add total brokerage fees if you want, then type a current price. The tool computes average cost per share, total shares, total cost, value at the current price, profit or loss, return, and how many shares to buy to hit a target average. You pick your currency from USD, GBP, EUR, NGN, AED, SAR, or INR. Results update instantly as you type; there is no calculate button. The calculator runs in your browser after the page loads, so your numbers stay local unless you copy or share a link. You can copy results or create a link that reopens with your numbers. The method uses a weighted average formula and treats any entered total fees as added to total cost.

How to use it

  1. 1Enter each buy on its own line as: shares price.
  2. 2Add total brokerage fees paid (optional).
  3. 3Type the current share price.
  4. 4Set a target average and next-buy price (both optional).
  5. 5Copy results or share the link to reopen with your numbers.
Advertisement

Worked example

Inputs: Buys = 100 shares at $10 and 50 shares at $15. Total brokerage fees = $20. Current price = $12. Target average = $11. Next buy price = $9. Results: Total shares = 150. Total cost = $1,770. Average cost = $11.80. Value at $12 = $1,800. Profit = $30. Return = 1.69%. Shares to buy at $9 to reach $11 average = 60.

The formula

Average cost = (sum of shares x price for each buy + fees) / total sharesProfit = total shares x current price - total costTo bring the average down to a target T by buying at price P (below T): shares needed = (total cost - T x total shares) / (T - P)

Source: IRS Publication 550 (Investments and tax rules)HMRC guidance on share pooling (Section 104). Last checked 7 November 2026.

What it is good for

  • Shows weighted average, total cost and P/L instantly.
  • Works in your browser and keeps numbers local after load.
  • Offers a share-to-buy calculation for a target average.
  • Does not fetch live market quotes; you must type current price.
  • Does not apply tax-lot rules or compute official tax forms.
Advertisement

Questions people ask

How do you include brokerage fees?

Enter total brokerage fees in the fees field. The tool adds fees to total cost before dividing by total shares so the average includes fees.

Can I use fractional shares?

Yes. Enter fractional shares as decimals like 12.5. The calculator treats them the same in the weighted average math.

Does this give tax-ready cost basis?

No. This shows a simple weighted average for planning. For tax reporting, use your broker statements and check IRS Publication 550 or local tax guidance.

Can I fetch live prices from the tool?

No. You must type the current price. The page does not fetch quotes automatically and it runs offline after load.

How does the shares-to-buy number work?

If you want to reach target average T by buying at price P below T, the tool uses the algebraic formula provided under Method. It returns the exact number of shares needed mathematically.

Is my data uploaded to FreeToolr?

No. Calculations run in your browser after the page loads. Nothing is uploaded unless you click to share or copy a link that embeds your numbers.

Help keep every tool free

FreeToolr stays free because people help it grow. Share a tool you like, tell us what to build next, or support us on Ko-fi.

Advertisement
Advertisement