Weighted average is a powerful tool for an investor. It can be used to evaluate the performance of a portfolio. It can help us better understand how the broader market moves. Even more important, it can help determine whether a company's earnings power will live up to your expectations.

To understand how it can do all these things, we need to know how to calculate a weighted average. So let's start with the nuts and bolts of the calculation and how you can use this metric in your everyday investing. Image source: Getty Images.

What is a weighted average?
In the investing world, the weighted average is a way to show the overall performance of something based on several different quantities that have varying levels of importance. The actual definition is harder to understand than simply showing an example of how to calculate weighted average.

Say you simultaneously invest different amounts of money in two companies: \$10,000 in Company X and \$5,000 in Company Y. After a year, Company X's shares have increased in value by 5% and Company Y's shares by 15%. The weighted average of your portfolio's performance would be the following:

Total initial investment = \$15,000
5% growth on \$10,000 = \$10,500
15% growth on \$5,000 = \$5,750
Combined value after year 1= \$16,250
(\$16,250- \$15,000) / \$15,000 = 8.33%

So the weighted average growth of the portfolio containing companies X and Y was 8.33%.

Weighted averages are used often in investing. It's basically how we measure the performance of our respective portfolios. In fact, the S&P 500 index is the weighted average performance of the 500 largest companies on the major U.S. stock exchanges by market capitalization. So it makes sense that massive companies such as ExxonMobil and Apple will have a greater influence on the movement of the entire index than the little companies at the bottom of the list. If a small handful of the large companies in the index have a lousy day but a bunch of the smaller companies do well, chances are the index will reflect the woes of those big fish rather than the wows of the little ones.

The most important reason an investor should know how to calculate weighted average is that it can be used to calculate the weighted average cost of capital, or WACC, and the expected return on a stock.

As a long-term investor, you expect the business you are buying to generate a return. For a company to do this, its return on invested capital should exceed its cost of capital. Basically, the money it can generate from an investment is greater than the interest costs on that money.

Typically, your investment will be in the form of buying equity in the company, but most companies use both equity and debt to raise capital. So to know if a company will meet or exceed your expectations, you can calculate the weighted average cost of capital based on your expected return on equity. Let's use ConocoPhillips (NYSE:COP) as an example. Here are the statistics you need to know about the company to do this calculation.

Company Return on Invested Capital Total Debt Cost of Debt (interest expense/total debt) Dividend Yield Total Equity
ConocoPhillips 5.78% \$23.51 billion 3.1% 4.6% \$78.68 billion

Source: S&P Capital IQ.

ConocoPhillips pays a dividend, which will be the key factor in attracting most shareholders. So we will evaluate the cost of equity using the dividend capitalization model:

Cost of equity = dividend yield + expected dividend growth rate

Assuming we want a 5% dividend growth rate, the cost of equity for the company is 9.6%. Since equity is only part of the company's capital structure, let's calculate the WACC, which is this formula:

WACC = (Cost of equity x equity's portion of capital) + (cost of debt x debt's portion of capital)

Using the numbers listed above, the company's weighted average cost of capital factors out to 8.01%. When compared to its return on invested capital, the costs of its capital exceed its return on capital, meaning that if ConocoPhillips raises capital it is losing value and might not be able to maintain that expected dividend growth rate.

Granted, for an oil company such as ConocoPhillps, returns can swing wildly with the price of oil. What this shows more than anything is that the company cannot generate adequate returns based on current market conditions. That doesn't mean it cannot achieve those goals if oil and gas prices increase, though.

What a Fool believes
You probably won't do many weighted average calculations when investing, but knowing how to do these sorts of calculations can be a helpful in a bunch of different ways.