With stocks that you've invested in multiple times, it's useful to know how to calculate average trade price. This information can help you track your gains and losses over time.

There are different calculations to use depending on whether you bought an equal number of shares each time. If so, you can simply calculate the average trade price. But if not, you need to calculate a weighted average trade price, because a simple average of the prices won't be accurate. Keep reading to learn how to do both.

A calculator and pen sit on financial paperwork.
Source: Getty Images

How to calculate average trade price

If you bought the same number of shares with each trade, then you only need to calculate the average trade price. It's easy enough to do this. Here's how:

  1. Add up all the prices of the stock each time you bought it.
  2. Divide by the number of trades you made.

For example, imagine that you buy 50 shares of a stock at $100, and then another 50 shares at $120. Adding $100 and $120 gives you a total of $220. Since you made two trades, you divide by two, for an average trade price of $110.

Average price formula

Here's the formula used to calculate the average trade price in the example above.

An average trade price formula.

How to calculate the weighted average trade price

If you didn't buy the same number of shares in each trade, then you need to calculate the weighted average trade price. This takes into account the number of shares you purchased with each trade.

Let's say you buy 50 shares of a stock in one trade, and then 100 shares the next time. The price you pay the second time around will affect your average trade price more, because you bought twice as many shares.

Did you know...

Let's say you buy 50 shares of a stock in one trade, and then 100 shares the next time. The price you pay the second time around will affect your average trade price more, because you bought twice as many shares.

Here's how to calculate the weighted average trade price:

  1. List the prices you paid for the stock, along with the number of shares you acquired in each transaction.
  2. Multiply each transaction price by the corresponding number of shares you bought.
  3. Add the results from step 2 together.
  4. Divide by the total number of shares purchased.

Putting these all together in a mathematical formula, we have:

A weighted average trade price formula.

To show exactly how this works, let's look at an example. Let's say you've been buying shares of Apple (AAPL 0.52%) for several years. You've purchased a total of 100 shares in four separate trades.

Trade Share price Number of shares
1 $65 35
2 $90 30
3 $130 20
4 $150 15

Here are the results when you multiply the share prices by the number of shares purchased:

Trade Share price Number of shares Total trade amount
1 $65 35 $2,275
2 $90 30 $2,700
3 $130 20 $2,600
4 $150 15 $2,250

Adding the total amount of each trade gives us $9,825. After dividing that by the 100 shares purchased, we have a weighted average trade price of $98.25 per share.

What if you had simply added the share prices you purchased at and divided by the number of trades? The sum of $65, $90, $130, and $150 is $435. Divided by four trades, the average would be $108.75. That's why it's important to calculate the weighted average, because otherwise, you won't get an accurate result.

Returns

Returns are the difference between the initial price of an asset and the dollar value that has been generated after ownership has ended.

Now you know how to calculate your average trade price and weighted average trade price based on the price you paid for a stock and the number of shares you purchased. You can find this information in your account or on your broker statement. If your statement doesn't provide the clarity you need, it may be time to find a new one - - visit our broker center to compare options.

Lyle Daly has no position in any of the stocks mentioned. The Motley Fool has positions in and recommends Apple. The Motley Fool has a disclosure policy.