JagSim
← Back to JagSim

What is average cost?

Average cost is the price you paid per share across every buy of one stock: the total cost of the shares you hold divided by the number of shares.

Worked example

You buy 10 shares at $50, which costs $500. A week later you buy 10 more at $40, which costs $400. You now hold 20 shares that cost $900 in total, so your average cost is $900 ÷ 20 = $45 a share.

If the stock trades at $47, you are up $2 a share, or $40 on the position, even though the first 10 shares are still below what you paid for them. If you then sell 5 shares at $47, the gain on that sale is ($47 - $45) × 5 = $10, and the 15 shares you keep still carry an average cost of $45.

Practice it on JagSim

JagSim keeps one average cost for each holding. Every buy re-averages it, and a sale does not change the average cost of the shares you keep. Open a holding on Portfolio to see its shares, average cost and market value. The realized gain on a sale is the sale price less the average cost, times the shares sold. On Pro, the chart lab on a company page draws your fills and your average cost on the chart. How trading works on JagSim.

Why it matters

Your average cost is the line that decides whether a holding shows a gain or a loss. Buying more of a falling stock lowers it, which can make a loss look smaller than the risk you have taken on. Knowing the figure helps you judge each new buy on its own terms, not only on whether it improves the average.

Common mistakes

Averaging down without a plan. Buying more as the price falls lowers your average cost, but it also makes the position bigger. If the price keeps falling, the loss grows faster than before.

Expecting a real statement to match. US brokers usually match a stock sale to the shares bought first unless you name the shares you sold, so a real statement can show a different gain on a part sale than an average-cost figure does.

FAQ

How do I calculate average cost?

Add up what you paid for every share you still hold and divide by the number of shares. Ten shares at $50 and ten at $40 cost $900 for 20 shares, so the average cost is $45.

Does selling shares change my average cost?

Not under the average cost method, which JagSim uses. A sale takes shares out at the average cost, so the shares you keep carry the same average. Only a new buy changes it.

Is average cost the same as cost basis?

They are linked. Cost basis is the total you paid for what you hold; average cost is that total divided by the shares. Twenty shares with a $900 cost basis have a $45 average cost.

Do fees change average cost?

At a real broker, fees paid on a buy are usually added to the cost. JagSim charges no fees or commissions, so your average cost is only the prices you paid.

Related terms
Practice it on JagSim →

Last updated: October 2026

Educational only. Not investment advice. JagSim is a simulator, not a broker.

JagSim Pro
$4.99 a month

Paper trading on JagSim is free forever: $100,000 in practice money, real-time prices, and no card to start. Pro adds portfolio performance analytics, key ratios and valuation on every company page, every chart indicator at once, 2 or 4 charts on one screen, unlimited market replay and unlimited Coach Jag. Or $49 a year. One-week free trial, no card.

Create free account Get Pro