WebToolsHub Logo
WebToolsHubOnline Tool Suite

Stock Average Calculator

Calculate your exact weighted average share price across unlimited buy tranches with zero sign-up and zero server uploads. Pre-loaded with a worked example so you can test immediately, solve exactly how many more shares to buy at today's price to hit a target average, track unrealised profit or loss, import lines from CSV, and switch formatting across INR, PKR, USD, and GBP locally inside your browser.

100% Client-Side • Free • Updated

What Is a Stock Average Calculator?

A stock average calculator is a browser-based portfolio math tool that computes your true cost basis per share when you buy the same stock across two or more separate orders at different prices. Whenever share prices dip or rally after your initial entry, entering each tranche's share quantity and buy price shows your updated total shares, total capital invested, and exact weighted break-even price instantly.

Whether you call it an average stock calculator or a cost-basis tool, calculating weighted averages accurately matters because standard two-input calculators fall short the moment you accumulate a position across three, five, or ten purchases. Our calculator supports unlimited buy rows, optional per-order user-entered fees, CSV paste import, and private browser-only execution with zero tracking or account walls.

Average Down Calculator — Reach Your Target Average

One of the most practical questions investors face during market pullbacks is not merely what their current average is, but how many additional shares they need to buy today to pull their average down to a specific goal. Most simple web calculators leave you guessing by trial and error. Our built-in Target-Average Solver solves the exact algebraic equation in one click:

Shares to Buy = Shares Held × (Current Average − Target Average) ÷ (Target Average − Today's Price)

For example, suppose you currently hold 100 shares at a current average of 500, today's market price is 400, and you want to lower your break-even target average to 450:

  • Numerator: 100 × (500 − 450) = 5,000
  • Denominator: (450 − 400) = 50
  • Result: 5,000 ÷ 50 = 100 shares to buy at 400, costing 40,000, giving a combined holding of 200 shares at exactly 450.00.

If your target is already reached or mathematically impossible (for instance, trying to average down when today's price is equal to or higher than your desired target average), the solver displays a clear plain-language explanation instead of broken numbers or division-by-zero errors.

Share Average Calculator — Worked Examples in ₹ and Rs

Let's walk through two realistic multi-tranche examples using our share average calculator across South Asian rupee markets to see exact weighted averages in action:

Example 1: Indian Rupee (₹ INR) Two-Order Average Down

Suppose you buy your first tranche of 100 shares at ₹500 each (100 × ₹500 = ₹50,000). After a pullback, you add a second tranche of 50 shares at ₹420 each (50 × ₹420 = ₹21,000):

  • Total Shares: 100 + 50 = 150 shares
  • Total Invested: ₹50,000 + ₹21,000 = ₹71,000.00
  • Weighted Average Price: ₹71,000 ÷ 150 = ₹473.33 per share (pre-loaded automatically in the calculator above so you can verify immediately).

Example 2: Pakistani Rupee (Rs PKR) Three-Tranche Position

Consider a PSX-style multi-buy scenario in Pakistani Rupees where you accumulate across three dips: Buy #1 of 200 shares at Rs 120 (Rs 24,000), Buy #2 of 300 shares at Rs 95 (Rs 28,500), plus an optional user-entered fee of Rs 100 total across orders:

  • Total Shares: 200 + 300 = 500 shares
  • Total Invested (incl. fee): Rs 24,000 + Rs 28,500 + Rs 100 = Rs 52,600.00
  • Weighted Average Price: Rs 52,600 ÷ 500 = Rs 105.20 per share.

When working with spreadsheets from broker trade-book downloads, paste lines formatted as qty, price, qty @ price, or qty, price, fee into our Bulk Paste / CSV Import box to populate all rows at once without typing manually.

How to Calculate Average Share Price

The universal formula for calculating average share purchase cost across any stock exchange is:

Weighted Average Price = Total Capital Invested ÷ Total Shares Bought

Or written tranche by tranche including optional user-entered commissions:

Weighted Average = Σ(Quantity × Buy Price + Optional Fee) ÷ Σ(Quantity)

Why weighted average beats simple average: A very common beginner mistake is adding two prices and dividing by two (for example, computing (500 + 420) ÷ 2 = 460). A simple arithmetic mean assumes you bought the exact same number of shares at both prices. When you bought 100 shares at 500 and only 50 shares at 420, twice as much weight belongs to the 500 entry — pulling your real weighted break-even price up to 473.33, not 460.00. If you rely on the incorrect 460 number and sell at 465, you actually lock in a net loss instead of a gain.

Tracking Unrealised Profit / Loss and Break-Even Price: Once you know your weighted average, entering today's live quote in the optional Current Market Price box computes your exact portfolio market value, unrealised rupee or dollar gain/loss, percentage return, and break-even price target. Keeping fees entered per tranche ensures your break-even calculation accounts for real commissions when you want it to, without forcing a static fee table that quickly goes stale.

Fast Bulk Import, Copy & Print Export: If you manage ten or twenty buy orders in a spreadsheet, export or copy your columns and paste them into Bulk Paste / CSV Import (accepting qty, price, qty @ price, or qty, price, fee). Invalid lines are flagged right away with exact line numbers while valid lines still import smoothly. You can also copy a plain-text breakdown to your clipboard or click Print Summary for clean paper or PDF records.

Stock Average Price Calculator for PSX, NSE & US Stocks

Because investors track holdings across multiple regional exchanges, our stock average price calculator includes instant currency format presets tailored for ₹ INR (Indian lakh/crore grouping such as ₹1,00,000.00 via Intl.NumberFormat('en-IN')), Rs PKR (Western digit grouping with Rs prefix for PSX holdings), $ USD (NYSE/NASDAQ), and £ GBP (LSE).

Two intentional design rules keep every figure transparent and maintenance-free:

  • Formatting Only (No FX Conversion): Switching between INR, PKR, USD, and GBP re-formats symbols and comma separators without multiplying numbers by stale exchange rates.
  • User-Entered Fees Only: Brokerage commissions, stamp duties, CDC charges, GST, STT, and capital gains levies differ per broker, account tier, and exchange regulation. Nothing is hardcoded or guessed — enter your exact fee amount per order only if you want transaction costs rolled into your break-even average.
Feature WebToolsHub Stock Average Calculator Basic 2-Buy Form Calculators
Buy Rows Allowed Unlimited purchase tranches + Bulk CSV / paste import Fixed at 2 to 4 manual rows
Target-Average Solver Built-in solver for exact shares to buy & capital required Not included (trial and error)
Fee Handling Optional user-entered fee per row (never hardcoded) Omitted or hardcoded to one broker
Currency Presets ₹ INR (Indian lakh grouping), Rs PKR, $ USD, £ GBP Single currency or plain numbers only
Data Privacy 100% browser-side, zero uploads, zero sign-up Often tracker-heavy or account-gated

Looking for other planning, revenue, and writing utilities in the WebToolsHub suite? Explore our YouTube Money Calculator for creator RPM forecasting, estimate token budgets with the LLM API Cost Calculator, check note lengths in our Word & Character Counter, or browse all free browser tools.

Disclaimer: This calculator is strictly an educational and informational math utility. It does not constitute investment, tax, or financial advice, and WebToolsHub has no affiliation with any stock exchange or brokerage platform.

Frequently Asked Questions

What is the formula for average share price?

The weighted average share price formula is Total Invested divided by Total Shares: sum(Quantity x Buy Price + Optional Fee) / sum(Quantity). Every share's cost carries weight proportional to its order size.

What is the difference between weighted average and simple average?

Simple average adds purchase prices and divides by the number of orders, assuming equal quantities in every trade. Weighted average multiplies each price by how many shares you bought at that price, giving your true break-even cost when order sizes differ (such as 100 @ 500 and 50 @ 420 = 473.33, not 460).

How many shares should I buy to reach a target average price?

Use the Target-Average Solver formula: Shares to Buy = Shares Held x (Current Average - Target Average) / (Target Average - Today's Price). For example, holding 100 shares at 500 average with today's price at 400 requires buying 100 shares (cost 40,000) to bring your average down to 450.

Does this calculator include brokerage commissions and taxes?

Only if you enter them yourself in the optional Fee / Tax box on each buy row. Because brokerage rates, regulatory fees, and tax slabs differ across brokers and countries, we never hardcode exchange or broker rate tables.

Can I use this for PSX, NSE, BSE, NYSE, or LSE stocks?

Yes. Weighted share cost math is identical across all global stock exchanges. You can switch display formatting between Rs PKR (PSX), ₹ INR with lakh grouping (NSE/BSE), $ USD (NYSE/NASDAQ), and £ GBP (LSE) anytime.

Is my portfolio data saved or uploaded anywhere?

No. Everything executes 100% client-side inside your web browser with zero backend API calls or server storage, so your buy prices and quantities never leave your device.

Is this calculator financial advice?

No. This stock average calculator is provided strictly for informational and mathematical reference only and is not financial, investment, or tax advice.