Make every day count Free money tools for every American household
--:-- …--°

Average share cost calculator

Work out your average cost per share after buying a stock or fund at different prices, your gain or loss at today's price, and how many shares you would need to buy to bring your average to a target.

Your purchases

Price now and next purchase

The numbers are examples: type your own purchases from your broker's statements. Buying more to lower your average does not make a losing investment any less risky.

Average cost per share

–
Shares owned
Total cost
Value at today's price
Gain or loss
To reach your target average

For your own records. Your broker's cost basis, which also counts reinvested dividends and adjustments, is what goes on tax forms. Not investment advice.

What this calculator does

If you bought shares of a stock or fund at different times and prices, your average cost per share is the total you paid divided by the shares you own. Enter each purchase, the price now and, if you like, the price of a new purchase and the average you want, and the calculator shows your average cost, your gain or loss, and how many shares you would need to buy to reach that average.

How it is worked out

Average cost = (shares × price + commission, added up for every purchase) ÷ total shares. Example: 10 shares at $50, 20 at $40 and 10 at $30 cost $1,600 for 40 shares, an average of $40. At $35 a share they are worth $1,400, a $200 loss. To bring the average to $38 by buying at $30, you would need (1,600 − 38 × 40) ÷ (38 − 30) = 10 more shares, costing $300.

Average cost and taxes

When you sell, your gain or loss for taxes is figured from your cost basis. For stocks, unless you identify which shares you sell, the IRS generally treats the first shares you bought as the first ones sold. The average-cost method can be used for shares of mutual funds and certain other shares, under IRS rules (IRS Publication 550). Your broker reports cost basis on Form 1099-B.

Frequently asked questions

How do I calculate my average cost per share?

Add up what you paid for every purchase, including commissions, and divide by the total number of shares you own.

What does averaging down mean?

Buying more shares at a lower price, which lowers your average cost. It does not change the risk of the investment, and the price can keep falling.

Is my average cost the same as my tax cost basis?

Not always. For stocks, tax rules usually match the shares you sell with specific purchases, first in, first out unless you choose. Your broker's records and Form 1099-B show your cost basis.

Is my information saved?

No. The numbers stay on this page.

How we calculate

The formula in plain words

Average cost = total of (shares × price + commission) ÷ total shares. Gain = shares × current price − total cost. Shares to reach a target average at price p = (total cost − target × shares) ÷ (target − p).

Assumptions and limits

Data and sources

Main sources: IRS Publication 550: Investment Income and Expenses (capital loss carryover).

Methodology last reviewed: November 9, 2026. Methodology, rounding and corrections

Sources

The rates, limits and data on this page are based on these publications:

Markets & investing

Home & mortgage

Taxes & pay

Retirement & savings

Loans & debt

Money & business

Creators

Travel

Money games

Weather & time

Guides