Stock Average Calculator
Average cost per share with fees, and how many shares to buy to average down.
Your Stock Average Calculator Result
Generated from the inputs below — a record you can revisit, or share with anyone helping you plan.
Your detailsInput Parameters
Your Buys (Oldest First)
Today
Must sit between today's price and your current average.
Your Buys (Oldest First)
Today
Fees included. $34.60 before fees.
Includes the selling fee.
That's 54.06% more money in this one position.
Analysis
Keep your result

Free financial calculators. Where an official rule applies, the calculator shows the source it was checked against. No sign-up, and every calculation runs entirely in your browser. Nothing you type is sent to us unless you download a PDF or ask us to email you your result.
You might also need
Picked based on what this calculator does
Stock Return
ROI on stock trades.
Open calculatorPopularCapital Gains Tax
Estimate tax on profits.
Open calculatorDollar-Cost Averaging Calculator
Growth from periodic investing, compared against a lump-sum investment.
Open calculatorStock Split Calculator
Adjust shares and cost basis for a forward or reverse split.
Open calculatorCD Early Withdrawal Penalty
Penalty cost and whether breaking your CD for a better rate pays off.
Open calculatorInvestment Planner
Project portfolio growth.
Open calculatorHow the Stock Average Calculator Works
Your average cost per share is the total you paid, fees included, divided by the shares you own. Buy 50 shares at $40, 30 at $32 and 20 at $25 with a $1 fee each, and you've paid $3,463 for 100 shares: $34.63 a share. Enter your buys below to see yours.
Break-Even Price and What a Partial Sale Is Worth
Your break-even is the price at which selling everything returns what you paid: total cost plus the selling fee, divided by shares. In the example, ($3,463 + $1) ÷ 100 = $34.64.
For a partial sale, most brokerage apps show profit against your average cost. Sell 40 shares at $38 with a $1 fee and you receive $1,519. Against the $34.63 average, that's a $133.80 gain, and the 60 shares you keep still average $34.63. Selling does not change the average of what remains; only buying does.
Average Cost vs. the Cost Basis on Your Tax Form
For individual stocks and ETFs, the IRS doesn't use your average cost by default. If you don't identify which shares you sold, the shares bought first are treated as sold first (FIFO). Average basis is allowed only for mutual fund shares and shares bought through a dividend reinvestment plan (IRS Publication 550; Treasury Regulation 1.1012-1).
| Same sale: 40 shares at $38, $1 fee | Basis | Result |
|---|---|---|
| Average cost (what apps show) | 40 × $34.63 = $1,385.20 | $133.80 gain |
| FIFO (default for stocks) | 40 × $40.02 = $1,600.80 | $81.80 loss |
You can tell your broker which lots to sell at the time of the sale (specific identification). The calculator shows the FIFO figure next to the average-cost figure so you can see the difference before you sell.
Averaging Down After Selling at a Loss
If you sell shares at a loss and buy the same stock within 30 days before or after that sale, it's a wash sale and the loss can't be deducted on that return. This includes purchases in your IRA or Roth IRA and purchases by your spouse (IRS Publication 550). The disallowed loss is generally added to the basis of the new shares rather than lost for good, but the timing changes. If you're planning to average down and also harvest a loss on the same stock, check the dates first.
What This Calculator Doesn't Cover
It doesn't track stock splits, dividends, return-of-capital distributions, wash-sale basis adjustments or shares received as gifts or inheritances. It doesn't pull live prices. The FIFO figure assumes you entered buys oldest first and that all lots are in one account. It doesn't compute capital gains tax; use the Capital Gains Tax calculator for that. Not tax advice.
Sources checked Nov 19, 2026: IRS Publication 550 (basis, FIFO, wash sales); 26 CFR 1.1012-1. Not tax advice.
Stock Average Calculator FAQ
How do you calculate the average price of a stock?
Multiply the shares in each purchase by the price paid, add any commission, and sum all purchases. Divide that total by the number of shares you own. For 50 shares at $40, 30 at $32 and 20 at $25 with $1 fees, the total is $3,463 for 100 shares, so the average cost is $34.63.
How many shares do I need to buy to lower my average cost?
Use shares owned × (current average − target average) ÷ (target − current price), then round up. With 100 shares averaging $34.63, a $24 price and a $30 target, you need 77.2, so 78 shares costing $1,872. The target must sit between today's price and your current average.
Does selling shares change my average cost?
No. Selling removes shares at the current average, so the shares you keep have the same average cost per share. Only new purchases change it. Your tax basis is a separate question: for individual stocks the IRS uses FIFO unless you choose specific shares, so the gain on your tax form can differ from the profit shown in your app.
Can I use average cost basis for stocks on my taxes?
Generally no. IRS rules allow the average basis method for mutual fund shares and for shares acquired through a dividend reinvestment plan. For other stocks, if you don't identify the shares sold, the earliest shares are treated as sold first (FIFO). You can pick specific lots by instructing your broker at the time of the sale.
Do brokerage fees count in my cost basis?
Yes. IRS Publication 550 says the basis of stock is generally the purchase price plus costs of purchase such as commissions and transfer fees. Including fees raises your average cost and your break-even price slightly, and lowers the taxable gain when you sell. Most commission-free trades have no fee to add.
Is averaging down a good strategy?
It lowers your break-even price, but it also puts more money into a position that has already fallen. Whether that makes sense depends on why the price dropped and how large the position becomes compared with the rest of your portfolio. The calculator shows the cash needed and the new position size so you can judge the trade-off.