When a company calculates its earnings over a certain period of time, it divides its profits by the number of outstanding shares. However, companies' outstanding shares can change over time as a result of newly issued shares, repurchased shares, exercised employee stock options, or several other reasons. Your broker can help you sort out the details -- head on over to our Broker Center if you're looking to get started investing.

To most accurately reflect its earnings per share, we need to know how many shares there were during the entire period -- not just at the end. To do this, we need to calculate a weighted average of the company's outstanding shares over the time period.

What is a weighted average?
A weighted average is a way of taking the average of several numbers when a different "weight" is assigned to each one. A common example of a weighted average is calculating a grade point average for courses with different numbers of credit hours.

In most schools, an "A" is worth four grade points, a "B" is worth three, and so on. However, what happens when a student receives an A in a four-credit course and a B in a two-credit course? You can't simply average the A and the B to arrive at a 3.5 GPA -- the A was earned in a four-credit course, so it counts more. In this case, the credits become the "weight" used to determine the GPA.

Credit Hours (Weight)

A

4

4

16

B

3

2

6

Totals

6 (total weight)

22

3.67

To calculate the weighted average, you need to add up the total weighted grades (16 + 6 = 22), and divide by the total weight (4 + 2 = 6). When we do this, you arrive at a GPA of 3.67, which is more than the average of an A and a B, since the A carried more weight.

How it's useful with stocks
Let's say that a company earned \$100,000 this year and wants to calculate its earnings per share. At the beginning of the year, the company has 100,000 shares outstanding but issues an additional 50,000 halfway through the year, for an ending total of 150,000. Instead of computing EPS based on the ending number of shares, which would produce EPS of \$0.67, a weighted average should be taken. After all, some of those earnings happened when there were fewer shares.

Shares Outstanding

Portion of Year

Weighted Shares

First six months

100,000

0.5

50,000

Next six months

150,000

0.5

75,000

Weighted average number of outstanding shares

125,000

With this weighted average, we can now calculate a different and more accurate EPS of \$0.80 per share.

Bear in mind that this is a simplified example, and a company's number of outstanding shares can change several times during a year. However, the calculation method is the same as this chart.

A clearer picture of earnings
To sum it up, a weighted average of a company's outstanding shares gives a more accurate picture of how much a company earned for its investors over a specified time period. It takes into account changes in the company's outstanding shares over time and better reflects how much profit the company produced 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 knowledgecenter@fool.com. Thanks -- and Fool on!