Skip to content
UseCalcNow
Finance

Price Per Share Calculator — Average Cost Basis

Compute the average price per share across multiple purchase lots, include fees, and see your unrealized gain or loss per share instantly.

About This Calculator

The price on your screen rarely matches the price you actually paid. If you bought shares in two or three separate orders, at different prices, with commissions on each trade, your true cost per share is a weighted average that most apps bury in a tax form. This calculator does the math in seconds: enter up to three purchase lots, add your fees, and it returns your average cost basis per share plus the unrealized gain or loss at the current market price.

The Formula Behind This Calculator

Total cost = (lot 1 shares x lot 1 price) + (lot 2 shares x lot 2 price) + (lot 3 shares x lot 3 price) + fees. Total shares = lot 1 shares + lot 2 shares + lot 3 shares. Average price per share = total cost / total shares. Each lot is weighted by the number of shares it contains, so a 200-share purchase moves your average twice as much as a 100-share purchase at the same price. Fees are spread across every share you own, which is why a $12 commission on a small order distorts the average far more than the same fee on 500 shares. The current price field is optional: leave it at zero and the tool reports your basis only; enter a live quote and it also shows the per-share and total unrealized gain or loss.

Understanding the math helps you verify results and make better decisions for your project.

How to Use

  1. 1Enter the number of shares and the price you paid for your first purchase lot.
  2. 2Add a second and third lot if you bought more shares later at different prices; leave unused lots at zero.
  3. 3Type the total commissions and fees you paid across all the orders.
  4. 4Enter the current share price to see your unrealized gain or loss per share.
  5. 5Compare the weighted average in the result box against the live quote to judge how good your entry really was.

When to Use

  • →You dollar cost averaged into an ETF or index fund over several months and want one clean cost figure.
  • →You averaged down after a drawdown and need to know where your breakeven price now sits.
  • →You reinvested dividends for years and want to fold those small lots into a single average before tax season.
  • →You are preparing to sell part of a position and want to compare the sale price against what you actually paid, fees included.

Tips

  • ✓Record every lot on settlement day, including fractional shares from dividend reinvestment, while the trade confirmations are still in your inbox.
  • ✓Split-adjust your old lots before averaging: after a 2-for-1 split, double the share count and halve the price on every pre-split purchase.
  • ✓Keep reinvested dividends inside the average: DRIP shares are real purchases, and leaving them out understates your basis while overstating your gain.
  • ✓Compare the price against a fair value estimate before averaging down a second time; a cheap stock that keeps falling is usually repricing new information.
  • ✓Check the wash sale rule before selling a loser and rebuying within 30 days, because the disallowed loss gets added back to the basis of the replacement shares.

What Price Per Share Really Means

The quote on your screen is the market's clearing price, the last level where a buyer and a seller agreed to trade. Your price per share is personal: the weighted average of everything you actually paid, commissions included. Those two numbers only match if you built the entire position in one commission-free order at the exact market price, which almost nobody does.

The gap between them is your entire result on the position. Buy 100 shares at $25.50 and another 50 at $30.00, and a $28.00 quote tells you almost nothing on its own. Weighted against your $27.00 average, that same quote means a $1.00 per share unrealized gain, about 3.70% on cost, or $150 across the full position.

Experienced investors keep the two numbers mentally separate for good reason. The market price tells you what you can sell for today; the average tells you what you must beat to walk away profitable. Every decision that matters, like holding, trimming, or doubling down, depends on comparing one against the other rather than on either number alone.

The Weighted Average Formula Step by Step

The formula weights each purchase by its share count. Total cost is the sum of every lot's shares multiplied by its price, plus all fees; total shares is the sum of the lot sizes; average price per share is total cost divided by total shares. A 200-share lot pulls the average twice as hard as a 100-share lot at the same price, which is the entire point of weighting.

Run the default numbers as a worked example: 100 shares at $25.50 is $2,550, and 50 shares at $30.00 is $1,500, for $4,050 across 150 shares. Divide and the average lands on exactly $27.00. With the current price at $28.00, the position shows a $1.00 per share gain, which works out to 3.70% on cost and $150 in dollar terms.

To translate the per-share figure into a portfolio-level number, a percentage return calculator generalizes the same percentage math to any holding. The inputs differ, but the engine is identical: a gain measured against what you put in. Once the average is right, the rest of the performance math follows from it.

How Fees and Commissions Change Your Basis

Commissions belong in cost basis because they are part of the price of acquiring the shares. Add a $12 total in fees to the worked example and total cost rises to $4,062, pushing the average from $27.00 to $27.08. That same $12 spread over 500 shares would add only $0.024 per share, which is why small orders suffer the most from flat fees.

Percentage-based costs work differently but land in the same place: spread them across the shares they bought. A 0.5% trading fee on a $2,550 order adds $12.75 to that lot's cost, and the tool folds it into the average the moment you type the dollar amount into the fees field. What matters is the total dollars paid to own the position.

For funds and managed accounts, ongoing expense ratios quietly drain returns year after year. An investment fees calculator shows how a 1% annual fee compounds against a 0.1% index alternative over decades. Trade-level commissions shape your entry basis; account-level fees shape what that basis earns afterward.

Averaging Down and the Breakeven Trap

Averaging down means buying more after a price fall to pull your average closer to the market. Own 100 shares at $50.00 and buy 100 more at $40.00, and the average lands at $45.00. The stock now needs to recover only to $45 for you to break even, a 12.5% climb from $40, instead of the 25% rally back to $50 that the original lot required.

That arithmetic comfort hides a real risk: a falling stock is often repricing new information. Adding capital to a deteriorating thesis at cheaper prices can mean buying a smaller future. Before a second averaging purchase, check the price against fundamentals rather than against your own average, which the market neither knows nor cares about.

A practical screen is a fair value estimate: an intrinsic value calculator built on the Graham formula compares price against earnings power and growth. Averaging down from $50 to $45 inside a stock worth $70 is patience; doing the same inside a stock worth $30 is throwing good money after bad. The average is not an argument.

Price Per Share Versus Market-Wide Metrics

Share price alone tells you almost nothing about company size. A $900 stock can belong to a smaller company than a $12 stock; what matters is price multiplied by shares outstanding. A market capitalization calculator makes that product explicit and handles the multi-class share structures that complicate the headline figure.

Per-share figures exist so investors can compare companies of different sizes. Earnings per share divides profit across the share count, and the output of an EPS calculator is meaningless without a price next to it. Price per share and earnings per share together produce the P/E ratio, the most quoted valuation shorthand in the market.

Your personal average adds a third layer to the story. Market metrics describe the company; your basis describes your position. A stock can trade at a fair P/E and still be a losing investment for anyone whose average sits above the current quote, which is why both numbers belong in any position review.

Ratios Built on Your Share Price

Most valuation ratios start from the share price you already hold. Divide price by expected earnings growth and you get the PEG ratio; a PEG ratio calculator shows why a 25 P/E stock growing earnings at 30% a year can be cheaper than a 12 P/E stock growing at 6%.

Income investors run the same price through a different lens. Annual dividends divided by price gives the yield, and a dividend yield calculator turns your $27.00 average into an income figure per $100 invested. Total return splits into parts as well: a capital gains yield calculator isolates the appreciation slice from the dividend slice.

Run these ratios on your average cost and they describe your personal yield and your personal P/E. A stock yielding 2.5% at the market price yields about 2.6% against a basis $4 below that price. The market's ratios price the next trade; yours price the trade you already made, and both are worth tracking side by side.

Splits, DRIPs, and Cost Basis Reporting

Corporate actions rewrite your lot history. After a 2-for-1 split, 150 shares at a $27.00 average becomes 300 shares at $13.50, and every pre-split purchase must be restated before it can be mixed with post-split lots. Reverse splits work the same way in the opposite direction: one tenth the shares at ten times the price per share.

Dividend reinvestment quietly builds dozens of tiny fractional lots. A $500 reinvestment at $25 adds 20 shares; combined with the 150-share, $4,050 position, the average eases from $27.00 to $26.76. Each DRIP purchase is a taxable event of its own, which is why brokers report reinvested dividends as both cash income and basis additions in the same statement.

When you finally sell, realized performance is best measured end to end. A holding period return calculator folds dividends, splits, and fees into one total figure for the life of the position. Keep the per-lot records anyway: specific identification lets you choose which lot to sell, and that choice gets made before the trade, never after.

Mistakes That Skew the Average

The most common error is leaving fees out entirely, which flatters the basis by a few cents per share on big orders and by a few dollars on small ones. The second most common is averaging pre-split and post-split lots together, which produces a number unrelated to reality. Both mistakes bias the average in whichever direction makes you feel better, not toward the truth.

Reinvested dividends cause the sneakiest distortions. Investors who spent years in a DRIP plan often forget that every reinvestment was a purchase, and brokers report those shares with full basis while the owner remembers only the original check. Reconstructing basis from 15-year-old confirmations is painful; keeping the lots current in a tool like this takes minutes a quarter.

One last distinction: the average answers what you paid, while separate tools answer what it earned. Pair the basis with an ROI calculator when cash moved in and out at irregular dates, because a position sold in stages has a return profile no single average can capture. Numbers that answer different questions should stay in different boxes.

FAQ

How do I calculate the average price per share?

Multiply the shares in each lot by the price paid for that lot, add the results together with any fees, then divide by the total number of shares. For example, 100 shares at $25.50 plus 50 shares at $30.00 costs $4,050 across 150 shares, or exactly $27.00 per share.

Do dividends change my cost basis?

Cash dividends paid out to you do not change the basis of shares you already own, but shares bought through dividend reinvestment are new purchases that raise total basis and add shares to the average. A $500 reinvestment at $25 adds 20 shares; a 150-share position with a $4,050 basis becomes 170 shares with a $4,550 basis, moving the average from $27.00 to $26.76.

What happens to my average after a stock split?

A 2-for-1 split doubles your share count and halves the price of every lot, so 150 shares at a $27.00 average becomes 300 shares at $13.50. The economics do not change, but every pre-split lot must be restated before you mix it with post-split purchases or the average becomes meaningless.

Is average cost better than FIFO for taxes?

FIFO, specific identification, and average cost change which lot you realize when you sell part of a position, not the total return over a full position. Average cost is allowed for mutual fund shares; for individual stocks most brokers default to FIFO, and specific identification usually gives the most control over which gain you book in a given year.

How do fractional shares affect the average?

Fractional shares are weighted exactly like whole shares: by quantity. A 0.844-share purchase at $29.60 contributes about $25 to total cost and less than one share to the count, which is why years of fractional DRIP reinvestments still average out cleanly in this tool.

Why is my broker's average different from what I calculated?

The usual culprits are a reinvested dividend, a transfer fee, or a pre-split lot missing from your figures. Brokers also carry adjusted basis after wash sales, corporate actions, and return of capital distributions, and each of those nudges the average away from the plain weighted calculation.

Related Calculators