# Average cost calculator: average down or up

URL: https://funkfolio.com/tools/average-cost-calculator

> Average cost per share across several buys, and how many shares at a given price would bring your average down (or up) to a target. Stocks, ETFs or crypto.

---

## Average cost calculator

Enter up to six buys, each with shares and a price. The calculator gives your average cost per share, the shares held and the total paid; then, for a price and a target average, how many more shares to buy to reach it — or why that target cannot be reached at that price.

### Calculator

Average cost a share

$46.67

over 2 buys

Shares

150

Total cost

$7,000.00

#### To bring the average to $42.00

Shares to buy at $35.00

100

Cost of that buy

$3,500.00

Shares after

250

Rows with zero shares are skipped. Fees are not included unless you fold them into the prices. Your tax lots may be counted differently (first in, first out, or specific lots); this is the plain average.

### How it is calculated

#### The average

The total paid divided by the total shares. Rows with zero shares are skipped. Fees are not included unless you add them to the prices.

#### Reaching a target

Buying n more shares at price P turns an average A on S shares into (S·A + n·P) ÷ (S + n). Setting that equal to the target X and solving gives n = S·(A − X) ÷ (X − P).

A new buy can only pull the average toward its own price, so the target must lie between the new price and the current average. Outside that range the calculator says the target cannot be reached.

#### Tax lots

This is the plain average. For tax, a broker may track each purchase as its own lot (first in, first out, or lots you choose); the average-cost method is mainly used for mutual fund shares.

#### The formula

```
average = Σ shares_i × price_i ÷ Σ shares_i
n = S × (A − X) ÷ (X − P)
```

### The default inputs, worked through

100 shares at $50 and 50 shares at $40 cost $7,000 for 150 shares: an average of $46.67.

To bring the average to $42.00 by buying at $35: n = 150 × (46.67 − 42) ÷ (42 − 35) = 100 shares, costing $3,500. Afterwards 250 shares cost $10,500, an average of $42.00.

### Questions and answers

**How do I calculate my average cost per share?**

Multiply each buy's shares by its price, add those up, and divide by the total number of shares.

**What does averaging down mean?**

Buying more of a holding below your average cost, which lowers the average. It also makes the position larger, so a further fall costs more.

**Why can my target not be reached?**

A new purchase moves the average toward its own price and never past it. To bring a $46.67 average to $42 you must buy below $42; buying at $43 can never get there.

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

Not always. The tax basis depends on the method your broker or tax authority applies, such as specific lots or first in, first out. In the US an average basis can be elected mainly for mutual fund shares.

### Sources

- [Mutual funds (costs, distributions, etc.)](https://www.irs.gov/help-resources/tools-faqs/faqs-for-individuals/frequently-asked-tax-questions-answers/capital-gains-losses-and-sale-of-home/mutual-funds-costs-distributions-etc) — Internal Revenue Service

### Related

#### Calculators

- [DCA calculator](https://funkfolio.com/tools/dca-calculator) — A monthly amount into a real stock, against a lump sum
- [Position size calculator](https://funkfolio.com/tools/position-size-calculator) — How many shares to buy for the risk you choose
- [Stock return calculator](https://funkfolio.com/tools/stock-return-calculator) — What an investment in a stock is worth now, with dividends

#### Guides

- [Cost basis and average cost](https://funkfolio.com/learn/portfolio/cost-basis)

#### On this site

- [Track your holdings and their average cost](https://funkfolio.com/portfolio)

Updated Nov 12, 2026. Results are arithmetic on the figures you enter, not advice.

### Cite this page

Funkfolio, “Average cost calculator: average down or up”. https://funkfolio.com/tools/average-cost-calculator
