Stock Cost Basis Calculator

Average cost basis across multiple purchases.

Your Purchases

Average cost / share

Total shares
Total cost basis

How to Use This Calculator

1. Enter each purchase lot: number of shares, price per share and any commission.
2. Add as many lots as you need with “+ Add lot”.
Your average cost per share and total cost basis update instantly.

Calculation Method

Average cost basis = Total cost / Total shares
Total cost = Σ (shares × price + commission) for every lot

This uses the average-cost method, common for mutual funds and a simple baseline for stocks.

Source: Average-cost basis method.

Two lots

100 @ $50 + 50 @ $60

$53.33 / share

Dollar-cost

3 monthly buys

Blended average

With fees

Commission added per lot

Raises basis slightly

Frequently Asked Questions

What is cost basis?

The total amount you paid for an investment, including commissions. It is used to compute capital gains when you sell.

Which cost-basis method does this use?

The average-cost method. Brokerages may also offer FIFO or specific-identification, which can change your taxable gain.

Do commissions affect cost basis?

Yes — purchase commissions increase your cost basis and reduce your taxable gain.

How do stock splits affect cost basis?

A split changes your share count and per-share basis but not your total basis. Adjust the shares accordingly.

Is this tax advice?

No. This is an educational estimate — confirm your basis with your broker and a tax professional.

Related Calculators

Related Guides

Share X f in
Investment Disclaimer: Calculations are estimates based on assumptions. Past performance does not guarantee future results. Investments involve risk, including potential loss of principal. SmartStockCalcs is not a registered investment advisor. For educational purposes only — consult a licensed financial advisor before making investment decisions.

Last updated: May 24, 2026