If you've bought a certain stock over a series of transactions, then it can be useful to calculate the average price you paid. This information can help you track your gains and losses over time. If your brokerage statement doesn't give you the clarify you need, it may be the right to time to choose a new broker -- visit our broker center to compare options.

If you bought an equal number of shares with each trade, then the calculation of the average price is easy. Simply add up all of the prices and divide by the number of trades you made. For example, if you buy 50 shares of a stock at $100 and then another 50 shares at $120, your average price is:

However, if you didn't buy the same number of shares in each trade, then you'll need to take a weighted average. A weighted average takes into account the number of shares purchased with each trade. In other words, if you buy 100 more shares of the stock mentioned above, then the price you pay will affect the average more than it would if you bought another 50.

Calculating the weighted average trade price
Here are the steps to calculate a weighted average trade price:

  1. List the various prices at which you bought the stock, along with the number of shares you acquired in each transaction.
  2. Multiply each transaction price by the corresponding number of shares.
  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:

Using the steps outlined above can be easier than using a formula, so let's take a look at an example to illustrate how this works.

An example
Let's say that you've been accumulating shares of Amazon.com for several years, and you've purchased a total of 60 shares in four separate trades:

Purchase

Share Price

Number of Shares

1

$150

25

2

$250

15

3

$300

10

4

$400

10

Multiplying the share prices by the number of shares produces the following numbers:

Purchase

Share Price

Number of Shares

Share Price x Number of Shares

1

$150

25

$3,750

2

$250

15

$3,750

3

$300

10

$3,000

4

$400

10

$4,000

Adding the four numbers in the last column gives us a total of $14,500. Finally, dividing by the total number of shares purchased (60), we arrive at the weighted average price per share.

This article is part of The Motley Fool's Knowledge Center, which was created based on the collected wisdom of a fantastic community of investors. We'd love to hear your questions, thoughts, and opinions on the Knowledge Center in general or this page in particular. Your input will help us help the world invest, better! Email us at [email protected]. Thanks -- and Fool on!