Stock Weighted Average Price Calculator

Track multiple trades in one place with detailed weighted price calculations instantly. Compare lots, adjust quantities, and instantly recalculate your blended cost per share. Export scenarios to CSV or PDF for recordkeeping and portfolio reviews. Use charts to explore positions and refine investment decisions.

Enter stock lots

Enter each purchase lot on its own line. Shares and price per share are required; fees are optional and can be included or excluded from cost basis.

# Symbol Shares Price per share Fees / commission Remove
Options
Results
Total shares
0
Total cost
0.00
Weighted average price
0.0000

Weighted average price = total cost ÷ total shares.

# Symbol Shares Price per share Fees Lot cost
Per-symbol summary
Symbol Total shares Total cost Weighted average price
Export results

After calculating, export the latest calculation as CSV or PDF for your records or portfolio tracking tools.

Cost distribution chart

Visualize how much each lot or symbol contributes to total cost. Switch chart mode to view distribution by lot or aggregated by symbol.

Example calculation
Example: three lots of the same stock
Lot Symbol Shares Price Fees Cost
1 ABC 100 10.00 4.95 1,004.95
2 ABC 50 12.00 4.95 604.95
3 ABC 75 11.00 4.95 829.95
Totals 225 2,439.85

Weighted average price = 2,439.85 ÷ 225 ≈ 10.84 per share.

Formula used

The calculator uses a standard weighted average price formula that accounts for both share quantities and optionally fees or commissions.

For each lot i:

When fees are included in cost basis:
Total cost = Σ (Qi × Pi + Fi)

When fees are excluded from cost basis:
Total cost = Σ (Qi × Pi)

Total shares are:
Total shares = Σ Qi

Weighted average price is:
Weighted average price = Total cost / Total shares

Per-symbol weighted averages apply the same formula, restricted to lots with that symbol only.

How to use this calculator

  1. For each purchase or lot, enter the stock symbol, number of shares, price per share, and any fees or commission paid.
  2. Use the “Include fees in cost basis” option to decide whether trading fees are folded into cost or reported separately.
  3. Click “Add row” to include additional lots. Use the remove button to delete rows you no longer need.
  4. Click “Load example data” to see a sample setup and verify how the weighted average calculation behaves.
  5. Press “Calculate weighted average price” to compute total shares, total cost, and the blended entry price across all entered lots.
  6. Review the detailed lot breakdown table, optional per-symbol summary, and cost distribution chart for insights.
  7. Use “Download CSV” or “Download PDF” to export the current calculation for budgeting tools, brokers, or your personal records.

Why weighted average price matters

Weighted average price shows your true blended entry across many trades. It replaces rough mental estimates with an exact figure that already includes partial fills, staggered entries, and different fee levels.

Knowing this number helps you decide when to take profits, cut losses, or rebalance. It also keeps discussions about performance consistent between different accounts and brokers.

Comparing weighted price with market price

Once you have a blended entry price, you can compare it with the current market quote. The difference reveals your unrealized profit or loss, expressed in both absolute currency and percentage terms.

A positive gap means the position is in profit. A negative gap highlights drawdown and can trigger re-evaluation of position size, conviction, or exit rules in your trading plan.

Handling partial sells and remaining lots

Real portfolios often include partial sells where you close some shares but keep a core position. The remaining shares still carry a cost basis that should be updated after each sale.

A common approach removes shares from the earliest or latest lots first. After each sale, you can re-enter the remaining lots in this calculator to refresh the weighted average price.

Incorporating dividends and corporate actions

Dividends, splits, and other corporate actions can change the effective cost per share. Cash dividends reduce your net capital at risk, while splits alter the number of shares without changing total value.

You can approximate these effects by adjusting total cost or total shares within the calculator. Keep a separate record of dividends if you need tax reporting or yield calculations.

Common mistakes when tracking cost basis

Investors often forget to include commissions and regulatory fees when tracking cost basis. Ignoring these costs slightly understates real entry price and overstates performance, especially for frequent traders.

Another mistake is mixing currencies or accounts without conversion. Always align values into a single reporting currency and keep clear notes about which broker or platform each lot belongs to.

Related Calculators

Inverse Function Finder CalculatorPolynomial Long Division Calculatorroots of cubic equation calculatorquadratic function from 3 points calculatorWeighted linear regression calculatorremainder and factor theorem calculatordivide using long division calculatorsynthetic division remainder calculatorLCM fraction Calculatorfactor polynomials by grouping calculator

Important Note: All the Calculators listed in this site are for educational purpose only and we do not guarentee the accuracy of results. Please do consult with other sources as well.