Learn / Investing

Investing

How to Calculate Average Stock Price After Selling Shares

5 min read · Reviewed: November 2026

You bought shares at two different prices, then sold some. What is your average price now? The answer surprises most investors: selling changes nothing — the shares you still own keep exactly the average they had before the sale.

Interactive Tool
Stock Average Calculator
Open calculator →

The short answer: selling does not change your average

Your average stock price is computed from your purchases only: total cash spent buying shares divided by the number of shares bought. A sale does not add a purchase, so it cannot enter that calculation. Selling removes shares from your position, but the shares that remain were bought at the same prices as before — so their average is unchanged.

Think of it this way: the average describes what you paid for the shares you hold. Selling some of them does not rewrite what you paid for the rest. What the sale does change is your remaining cost basis in dollars (fewer shares × the same average) and your realised gain or loss on the shares you sold.

You can see this in your brokerage app: sell part of a position and the average cost per share shown for the remaining shares does not move. It only moves when you buy more shares — a new purchase blends into the average at its own price, which is exactly what our Stock Average Calculator models.

Worked example: Buy 100 at $50, 50 at $40, sell 50

Walk through the numbers once and the rule sticks:

Average Price Before and After Selling 50 Shares

  • Lot 1: 100 shares at $50.00 = $5,000.00.
  • Lot 2: 50 shares at $40.00 = $2,000.00.
  • Total cost $7,000.00 for 150 shares; average stock price = $7,000.00 ÷ 150 = $46.67 per share.
  • Sell 50 shares: the 100 shares you still own still average $46.67 per share — the sale does not move it.
  • Remaining cost basis: 100 shares × $46.67 = $4,666.67.
  • The 50 shares you sold carried $2,333.33 of cost basis with them (50 × $46.67). $4,666.67 + $2,333.33 = $7,000.00 — the full original cost, split between the shares kept and the shares sold.

The common mistake: averaging the sale price in

The error most investors make is treating the sale price as if it were another purchase. Suppose you sell those 50 shares at $55.00. Averaging the $2,750.00 of sale proceeds in as though you had bought more shares gives ($7,000.00 + $2,750.00) ÷ 200 = $48.75 — a meaningless number. The sale price is money coming in, not money spent buying shares, so it has no place in an average cost.

Done correctly, the sale is a gain calculation, not an averaging calculation: you received $2,750.00 for shares that cost you $2,333.33 (50 × $46.67), for a gain of $416.67. Your remaining 100 shares still average $46.67, and $55.00 is now simply the price to beat if you buy more. To work out your average before any sale, use our Stock Average Calculator or read how to calculate average stock cost.

Sale fees and taxes: what actually changes

Broker fees on the sale reduce your net proceeds — and therefore your gain — but they do not change the average price of the shares you still own. A $5.00 sale fee on the example above would cut the gain from $416.67 to $411.67; the remaining average stays $46.67.

Tax is a separate question from average cost. In the US, the default tax method for individual stocks is FIFO (first-in, first-out), not average cost — the shares treated as sold are your earliest lot, which can give a different realised gain from the $416.67 average-basis figure. Average-cost pooling is generally permitted only for mutual funds and dividend reinvestment plans. Your brokerage tax statement (Form 1099-B) shows the lots actually used, and the rules are explained in our average stock cost guide.

Frequently Asked Questions

Does selling change my average stock price?

No. Your average stock price is computed from purchases only, so selling shares cannot move it. If you bought 100 shares at $50 and 50 at $40, your average is $46.67 — and it stays $46.67 on the shares you still own after selling any number of them.

What is my average price on the shares I still own after selling some?

Exactly the average you had before the sale. In the worked example in this guide, 100 shares at $50 plus 50 at $40 average $46.67; after selling 50 shares, the remaining 100 shares still average $46.67, with a remaining cost basis of $4,666.67.

How do I calculate my average stock price after selling?

Recompute from your purchases only: total cash spent buying shares divided by total shares bought. Then subtract the shares sold: remaining cost basis = remaining shares × that average. Do not put the sale price anywhere in the calculation.

Should I include the sale price in my average cost?

No. The sale price is proceeds coming in, not money spent buying shares. Averaging it in as a purchase would wrongly lift the example average from $46.67 to $48.75. Use the sale price only to work out your gain: proceeds minus the cost basis of the shares sold.

Do fees on a sale change my average price?

No. Sale fees reduce your net proceeds and your realised gain, but the average cost of the shares you still own is untouched. A $5.00 fee on the example sale cuts the gain from $416.67 to $411.67 while the remaining average stays $46.67.

Does selling change my tax cost basis?

Your internal average cost does not change, but your tax basis follows your jurisdiction’s lot rules. In the US, individual stocks default to FIFO, so the shares treated as sold are your earliest lot — a different figure from the average-basis gain. Average-cost pooling is generally allowed only for mutual funds and dividend reinvestment plans. Check your Form 1099-B and the average stock cost guide.