Stock Average Calculator

Bought a stock at different prices? Find your real average cost per share across all your purchases.

Your Purchases

2 / 10 lots
Lot 1
$
Lot 2
$
Frequently Asked Questions

Stock Average Cost: The Complete Guide

Everything you need to know about average cost basis, dollar-cost averaging, and how multiple purchases affect your investment returns.

Average cost basis is the weighted average price you paid per share across all of your purchases of a particular stock. It's calculated by dividing your total investment (the sum of every purchase price multiplied by its share count) by the total number of shares you own.

Why it matters for investors:

  • Profit and loss tracking — Your average cost is the baseline for calculating whether you're up or down on a position. If your average cost is $50 and the stock trades at $65, you're sitting on a 30% unrealized gain.
  • Tax reporting — When you sell shares, the IRS (or your local tax authority) needs to know your cost basis to determine your capital gain or loss. Average cost is one of the accepted methods for calculating this.
  • Decision-making — Knowing your average cost helps you decide whether to add to a position, hold, or take profits. It turns a gut feeling into a concrete number.
  • Portfolio analysis — Comparing your average cost to the current price across all holdings gives you a clear picture of where your returns are coming from.

Most brokerage platforms calculate your average cost automatically, but they don't always account for shares held across multiple brokers, transfers, or manual tracking scenarios. That's where a standalone calculator comes in handy.

The formula is straightforward. For each purchase (or "lot"), multiply the price per share by the number of shares bought. Add up all those costs, then divide by the total number of shares across every lot.

Formula:

Average Price = Total Cost / Total Shares
where Total Cost = (Price₁ x Shares₁) + (Price₂ x Shares₂) + ...

Worked example:

  • Purchase 1: 50 shares at $100 = $5,000
  • Purchase 2: 30 shares at $120 = $3,600
  • Purchase 3: 20 shares at $80 = $1,600

Total Cost = $5,000 + $3,600 + $1,600 = $10,200
Total Shares = 50 + 30 + 20 = 100
Average Cost Per Share = $10,200 / 100 = $102.00

Notice that the average ($102) is not simply the arithmetic mean of the three prices ($100). The weighting by share count matters — the 50-share lot at $100 pulls the average toward $100 more than the 20-share lot at $80 does.

Dollar-cost averaging (DCA) is an investment strategy where you invest a fixed dollar amount at regular intervals — say $500 every month — regardless of what the stock price is doing. The result is that you automatically buy more shares when prices are low and fewer shares when prices are high.

How it connects to stock averaging:

  • DCA naturally creates multiple lots — Each periodic purchase becomes a separate lot with its own price and share count. Your stock average calculator combines all of these into one average cost.
  • DCA tends to produce a lower average cost than lump-sum timing — Because you buy more shares at lower prices, the math naturally weights your average toward the cheaper purchases. This is the core benefit of the strategy.
  • It removes emotional decision-making — Instead of trying to time the market (which even professionals struggle with), DCA turns investing into a mechanical process.

Important caveat: Academic research shows that lump-sum investing outperforms DCA about two-thirds of the time in historically rising markets. DCA's real advantage is psychological — it keeps you investing consistently and reduces the regret of buying at a peak.

Whether you're DCA-ing into index funds or building a position in a single stock over time, tracking your average cost per share tells you exactly where you stand.

Averaging down means buying more shares of a stock that has fallen below your original purchase price. It lowers your average cost basis, which means the stock doesn't need to recover as far for you to break even. But it's a double-edged sword.

When averaging down makes sense:

  • Your thesis hasn't changed — The stock dropped because of a broader market sell-off, sector rotation, or short-term noise, but the fundamental business case is intact.
  • You've done a valuation — You have a DCF model or other analysis that shows the stock is trading below fair value. You're not guessing — you have numbers backing the decision.
  • Position sizing is under control — Adding to the position doesn't make it an outsized percentage of your portfolio.

When averaging down is dangerous:

  • The business is deteriorating — Revenue declining, margins compressing, management losing credibility. A cheap stock can always get cheaper.
  • You're anchored to your original price — Buying more just because it "used to be higher" is not a strategy. Past price is irrelevant to future value.
  • You're throwing good money after bad — If you wouldn't buy the stock fresh today at the current price, you shouldn't be adding to a losing position.

The litmus test: If you had zero shares and the same amount of cash, would you buy this stock at today's price? If the answer is yes, averaging down is reasonable. If not, you're just avoiding admitting a mistake.

When you sell shares, your capital gain or loss is the difference between the sale price and your cost basis. The method you use to determine cost basis can significantly affect your tax bill.

Average cost basis method:

  • You take the total cost of all shares divided by total shares held to get a single average price.
  • Every share you sell is treated as having the same cost basis, regardless of when you actually bought it.
  • This method is simple and commonly used for mutual funds and ETFs. The IRS allows it for these, and many brokers default to it.

Tax implications of different scenarios:

  • Selling above average cost — You have a capital gain. If you held the shares for over a year, it's a long-term gain (taxed at 0%, 15%, or 20% depending on income). Under a year is short-term (taxed as ordinary income).
  • Selling below average cost — You have a capital loss, which you can use to offset gains or deduct up to $3,000/year from ordinary income.
  • Partial sales — If you sell only some of your shares, the average cost method applies the same per-share basis to whatever you sell.

Record keeping matters. Keep records of every purchase: date, price, share count, and any commissions. Your broker provides 1099-B forms, but verifying against your own records catches errors — especially after stock splits, mergers, or broker transfers.

A basic stock average calculator (like the one above) computes a simple weighted average of your purchase prices. It does not automatically adjust for dividends received or stock splits. Here's how each one works:

Stock splits:

  • In a forward split (e.g., 4-for-1), your share count multiplies and your cost per share divides by the same factor. If you had 100 shares at $400, after a 4:1 split you have 400 shares at $100.
  • A reverse split works the opposite way: fewer shares at a higher price.
  • To handle splits in this calculator: Adjust your historical lots before entering them. Divide older purchase prices by the split ratio and multiply share counts.

Dividends:

  • Cash dividends don't change your cost basis in most cases. They're taxed as income when received. However, tracking dividends received helps you calculate your true total return.
  • Reinvested dividends (DRIP) create new lots. Each reinvestment is a purchase at the dividend reinvestment price. Add these as separate lots in the calculator to get an accurate average.
  • Return of capital distributions actually reduce your cost basis. These are common with REITs and MLPs.

For the most accurate average cost, always enter split-adjusted prices and include any DRIP purchases as separate lots.

When you sell shares, the IRS allows several methods to determine which shares you're selling and at what cost basis. The two most common are average cost and FIFO (First In, First Out). The method you choose can make a meaningful difference in your tax bill.

Average cost method:

  • Every share gets the same cost basis (total cost divided by total shares).
  • Simple to calculate and track. No need to identify specific lots.
  • Allowed by the IRS for mutual funds and ETFs. For individual stocks, brokers typically default to FIFO, but you can elect specific identification.

FIFO method:

  • The oldest shares are considered sold first. Your first purchase lot is depleted before the second, and so on.
  • In a rising market, FIFO tends to produce larger capital gains because your oldest (cheapest) shares are sold first.
  • In a falling market, FIFO can produce larger capital losses if your earliest purchases were at higher prices.

Other methods worth knowing:

  • LIFO (Last In, First Out) — Sells newest shares first. Can minimize short-term gains in rising markets.
  • Specific identification — You choose exactly which lots to sell. Maximum flexibility for tax optimization, but requires careful record-keeping and broker coordination.
  • Highest cost first — Minimizes current capital gains by selling the most expensive lots first.

Practical advice: Consult a tax professional before choosing a cost basis method, especially if you have large positions with lots at very different prices. Once you elect a method for a particular holding, switching can be complicated. The average cost calculator above gives you a quick baseline, but tax-optimized selling often requires lot-level analysis.

Ready to figure out what your stock is actually worth?