Skip to content

Free calculator

Stock Average Cost Calculator

Enter the shares and price of each purchase. The calculator returns your average cost per share and total cost, the unrealized gain or loss at the current price, and how many shares to buy at a new price to bring the average to a target.

Inputs are saved only in this browser after you edit. A link is shared only when you ask.

Purchase 1
Purchase 2

Optional. Adds market value and unrealized gain or loss.

Average down or up (optional)

Average cost per share

$46.67

150 shares for $7,000

Total shares
150
Total cost
$7,000.00
Market value
$6,750.00
Unrealized gain or loss
-$250.00
Unrealized return
-3.57%

Before fees and taxes. Not a recommendation to buy or sell, or financial advice.

How it is calculated

Average cost
Average cost per share = total paid ÷ total shares. 100 shares at $50 and 50 at $40 cost $7,000 for 150 shares, an average of $46.67.
Unrealized gain or loss
Unrealized gain = shares × (current price − average cost). It is the gain or loss if you sold everything at the current price, before fees and tax.
Shares to reach a target average
Shares to buy = shares held × (average − target) ÷ (target − buy price). It works only when the buy price is on the other side of the target from your average.
Break-even
The average cost is your break-even price per share before fees: selling above it is a gain, below it a loss.

What the result leaves out

Fees and commissions are not included. Add them to the price of a purchase to include them in the average.

Tax rules can use a different cost basis, such as first in, first out or specific lots, and wash-sale rules can change it. Lowering the average does not lower the risk of the position; it adds to it.

Track the positions behind the average

In the 1cc.ai app, the stocks and ETFs you hold are valued with supported real-time prices next to net worth and target allocation. For shares from assigned puts, wheel cycles show the net cost per share after option premiums.

Portfolio Tracker
Download free

Download 1cc.ai for iOS or Android and enter positions yourself or sync them from Longbridge. Core features are free forever; Pro is an optional subscription for AI and advanced option analysis.

Related

Frequently asked questions

How do I calculate my average stock price?

Multiply the shares of each purchase by its price, add the totals and divide by the total number of shares. The calculator does this for up to 10 purchases.

How many shares do I need to buy to average down?

Shares to buy = shares held × (current average − target average) ÷ (target average − buy price). The target must lie between the buy price and your current average.

Should I include fees in the average cost?

For a true break-even, yes. Add each purchase's fee to its total cost, or raise its price by the fee divided by the shares.

Does this calculator store my numbers?

No. The calculation runs in your browser and the numbers are not sent to 1cc.ai.

Is this financial advice?

No. The calculator shows the arithmetic of the numbers you enter. It is not a forecast, a recommendation or financial advice.