Finance calculators

Average Cost Calculator

Updated Sep 24, 2026 By Infinity Calculator
Rate Formulas
Asset Setup
The selected symbol is used for every price and result.
e.g. shares, tokens, ounces, units, contracts.
Quick presets
Presets only pre-fill the currency and unit label.
Purchase Lots
3 lots entered.
Target / Current Market Price (optional)
Leave blank to skip the profit / loss analysis.
Results
Average Cost Per share
Total shares Purchased
Total Amount Invested
Number of Purchase Lots
Break-Even & Profit / Loss Analysis
Enter a market price
Break-Even Price Per share
Profit / Loss Per share
Total Profit / Loss
Return on Invested Amount
Step-by-Step Solution
Per-Lot Breakdown
Breakdown of each purchase lot: quantity, price per unit, subtotal cost, share of total investment, and comparison against the weighted average cost.
Lot shares Price per share Subtotal cost % of total invested vs. average cost
Share of Total Investment by Lot

Lot Price vs. Average Cost

Dollar-Cost Averaging (DCA) Projection
Price assumption
Price is assumed to move evenly from low to high across the periods.
Total Invested
Total shares Accumulated
Projected Average Cost
Average Market Price

Introduction

The Average Cost Calculator shows what you really paid for each share, coin, or unit you own. If you bought at different prices over time, no single purchase price tells the whole story. This tool blends all your buys into one weighted average cost per unit.

Type in how many units you bought and the price you paid for each lot. Add as many lots as you need. The calculator returns your average cost per unit, your total units, and the total money you put in. You also get a step-by-step solution, a table for each lot, and charts that show which buys weigh the most.

Add today's market price and you will see your break-even point, your profit or loss per unit, your total gain or loss, and your percent return. You can pick your currency and name your own unit, like shares, tokens, or ounces.

There is also a dollar-cost averaging (DCA) tool. Set an amount, a schedule, and a price path to see how steady buying shapes your future average cost. This helps you plan your next buy and know the price you need to break even.

How to use our Average Cost Calculator

Enter what you bought, how much you paid, and the price today. The calculator shows your average cost per share, total units, total money invested, your break-even price, and your profit or loss.

Currency: Pick the money type you buy with, like USD, EUR, or BTC. Every price and result uses that symbol.

Unit label (plural): Type what you buy, such as shares, tokens, ounces, or units. This word shows up in all labels and results.

Quick presets: Click Stock Purchase, Crypto Buy, Real Estate, or Commodity to fill in the currency and unit label fast.

Lot quantity: For each buy, type how many shares or units you bought. The number must be more than 0.

Price per share: Type what you paid for one unit in that lot. Use the price before or after fees, but stay the same for all lots.

Add Another Purchase: Click this to add one more buy. Add as many lots as you need, then use the trash button to delete one.

Target / Current market price: Type the price of one unit right now, or your goal price. This gives you profit, loss, and return. Leave it blank to skip that part.

Recurring investment amount: In the DCA part, type how much money you plan to invest each time.

Frequency: Choose weekly, bi-weekly, monthly, or quarterly buys.

Number of periods: Type how many times you will buy, up to 600.

Price assumption: Choose "Price range" if you think the price will move, or "Fixed price" if you want to use one set price.

Starting price (low) and ending price (high): With a price range, type the first price and the last price. The tool moves the price evenly between them.

Fixed price per share: With fixed price, type the one price used for every buy.

Run DCA Projection: Click this to see your projected average cost, total units, and money invested over time.

Calculate and Reset: Click Calculate to update all results, steps, tables, and charts. Click Reset Calculator, then confirm, to clear your lots and start over.

What Is Average Cost?

Average cost is the price you paid for each share, coin, or unit when you bought at different prices over time. It is also called your average cost basis or average buy price. It is not just the middle of the prices you paid. It is a weighted average, so bigger buys count more than small ones.

The Average Cost Formula

The math is simple:

Average Cost = Total Money Invested ÷ Total Units Owned

To get the total money invested, multiply the quantity in each buy by its price, then add them all up.

Quick Example

  • Buy 1: 10 shares at $45 = $450
  • Buy 2: 15 shares at $52.50 = $787.50
  • Buy 3: 25 shares at $41.20 = $1,030

Total invested = $2,267.50. Total shares = 50. Average cost = $2,267.50 ÷ 50 = $45.35 per share.

Why Average Cost Matters

Your average cost is your break-even price. If the market price is above it, you have a gain. If the price is below it, you have a loss. Knowing this one number tells you where you stand at any time, no matter how many times you bought.

It also helps you set goals. If your average cost is $45.35, you know exactly what price you need to sell at to get your money back.

Dollar-Cost Averaging (DCA)

Dollar-cost averaging means putting the same amount of money in on a set schedule, like $250 every month. When prices drop, your money buys more units. When prices rise, it buys fewer. Over time, this usually pulls your average cost below the simple average market price. It also means you never have to guess when the right moment to buy is.

Good to Know

  • Add your fees. Commissions and trading fees raise your real cost. Add them to the price you paid for a true number.
  • Selling changes things. Selling units lowers your total holdings, but your average cost per unit stays the same.
  • Buying dips lowers your average. Buying more at a lower price pulls your average cost down. This is called "averaging down," but it also puts more money at risk.
  • Taxes. Some countries and brokers use average cost basis to figure out capital gains. Check your local rules before you sell.
  • Works for anything. Stocks, ETFs, crypto, gold, or any asset you buy in units at different prices.

Formulas used

Cost of each purchase lot
C_i = Q_i \times P_i
Weighted average cost per unit (break-even price)
\text{Average Cost} = \frac{\sum_{i=1}^{n} Q_i \times P_i}{\sum_{i=1}^{n} Q_i}
Lot share of total investment
\text{Lot \%} = \frac{C_i}{\sum_{i=1}^{n} C_i} \times 100
Lot price versus average cost
\text{Deviation \%} = \frac{P_i - \text{Average Cost}}{\text{Average Cost}} \times 100
Profit or loss per unit and in total
\text{P/L per unit} = P_{market} - \text{Average Cost}, \quad \text{Total P/L} = (P_{market} - \text{Average Cost}) \times Q_{total}
Return on invested amount
\text{Return \%} = \frac{\text{Total P/L}}{\text{Total Invested}} \times 100
DCA projected price and units per period
P_k = P_{low} + (P_{high} - P_{low}) \cdot \frac{k-1}{N-1}, \quad U_k = \frac{A}{P_k}
DCA average cost versus mean market price
\text{DCA Average Cost} = \frac{A \times N}{\sum_{k=1}^{N} \frac{A}{P_k}}, \quad \bar{P} = \frac{1}{N}\sum_{k=1}^{N} P_k

Frequently asked questions

How many more shares do I need to buy to lower my average cost?

Use this formula:

Shares to buy = Shares you own × (Current average − Target average) ÷ (Target average − New price)

Example: you own 50 shares at a $45.35 average. You want a $42 average and the price today is $38.

50 × ($45.35 − $42) ÷ ($42 − $38) = 50 × 3.35 ÷ 4 = about 42 more shares.

The closer your target is to the new price, the more shares you need. You can never push your average below the price you are paying now.

What percent gain do I need to break even after a loss?

More than the percent you lost. Losses and gains are not equal because the gain works off a smaller amount of money.

  • Down 10% → need 11.1% to break even
  • Down 25% → need 33.3%
  • Down 50% → need 100%
  • Down 75% → need 300%

The math is: Gain needed = Loss ÷ (1 − Loss). This is why your average cost matters so much. It is the exact price you must reach to get your money back.

Is averaging down a good idea?

It depends on why the price fell. Buying more at a lower price does pull your average cost down, so you break even sooner if the price recovers.

But it also puts more money into a losing position. If the company or coin is in real trouble, you just lose more.

Ask yourself: would I buy this today if I owned none of it? If the answer is no, averaging down is just hoping. Never average down with money you cannot afford to lose.

What is averaging up?

Averaging up means buying more units at a higher price than you paid before. It raises your average cost and raises your break-even price.

That sounds bad, but it is not always. If an asset keeps climbing, adding to it means you own more of a winner. Your percent return drops a bit, but your total dollar profit can grow much larger.

Example: 10 shares at $45 plus 10 shares at $55 gives an average of $50. You still profit at any price above $50.

What is the difference between average cost and FIFO cost basis?

Both figure out what you paid, but they pick different numbers when you sell.

  • Average cost: blends every buy into one price per unit. Every share you sell uses that same cost.
  • FIFO (first in, first out): treats the oldest shares as the ones you sold first, at their original price.

In the US, average cost is mostly allowed for mutual funds and some brokers. Stocks usually use FIFO or specific lot ID. The method you pick changes your taxable gain, so check your broker and local tax rules.

How does a stock split change your average cost per share?

A split changes your share count and your average cost, but not your total money invested.

In a 2-for-1 split, your shares double and your average cost is cut in half. If you owned 50 shares at a $45.35 average, you now own 100 shares at $22.675 each. Total cost stays $2,267.50.

The rule: divide your average cost by the split ratio. For a reverse split, do the opposite. A 1-for-10 reverse split multiplies your average cost by 10.

Do dividends lower your average cost per share?

Cash dividends do not change your official average cost. You still paid the same price for the shares. They do lower your net cost in real life, since money came back to you.

Reinvested dividends (DRIP) are different. Each reinvestment is a new buy at that day's price, so it does change your average cost (up or down, depending on the price that day).

Return of capital payments are a third case. Those do lower your cost basis and are reported by your broker.

Why is my average cost different from what my broker shows?

Common reasons:

  • Your broker includes commissions and fees and you did not.
  • Reinvested dividends were counted as extra buys.
  • A stock split or reverse split adjusted the numbers.
  • Your broker uses FIFO or specific lots instead of a blended average.
  • Wash sale rules moved a disallowed loss into your cost basis.
  • You forgot a small lot or a transfer from another account.

Use the broker's figure for taxes. Use your own math for planning.

Is dollar-cost averaging better than investing a lump sum?

Lump sum wins more often, about two times out of three in past markets, because markets rise more than they fall, so getting money in early usually pays more.

But dollar-cost averaging lowers the risk of buying everything right before a drop. It also fits how most people earn money: a bit at a time from each paycheck.

If you already have a big pile of cash and a long time frame, lump sum often wins. If a big drop would make you panic and sell, DCA is the safer choice.

Is it better to dollar-cost average weekly or monthly?

The difference in your final average cost is usually tiny. What matters far more is that you keep buying and never skip.

Pick the schedule that matches when you get paid. Monthly works for most people. Weekly can smooth out price swings a little more.

One warning: if your broker charges a fee per trade, buying more often eats your returns. With a $5 fee, twelve monthly buys cost $60 a year, while weekly buys cost $260.

How do you calculate average cost for crypto?

The same way as stocks: total money spent ÷ total coins owned. Fractions are fine.

Example: you spend $500 at $25,000 per coin (0.02 BTC) and $500 at $20,000 per coin (0.025 BTC). Total spent is $1,000 and total coins are 0.045. Your average cost is $1,000 ÷ 0.045 = $22,222 per coin.

Include exchange fees and network fees in the money spent. Crypto prices need more decimal places, so keep at least six decimals on your coin amounts.

Does your average cost change when the stock price moves?

No. Your average cost is a record of what you already paid. It stays frozen no matter how high or low the price goes today.

Only three things change it: buying more units, a split, or an adjustment like reinvested dividends or a return of capital.

Selling does not change it either. If you sell half your shares, the remaining shares keep the same average cost per unit.