# How to Calculate Cost Per Share

Image Credit: Monty Rakusen/Image Source/GettyImages

Cost per share, or price per share, is a metric for investors that lets you evaluate a stock as an investment and determine capital gains or losses for tax purposes. Understanding how the price per share formula and other valuation ratios work will help you make smarter investment choices.

## Price Per Share Formula and Metrics for Investors

Video of the Day

The writers at the U.S. Consumer Financial Protection Bureau explain that a share is a unit of ownership, generally as applicable to stocks or mutual funds. A stock, in turn, is a type of investment that gives you, as a shareholder, partial ownership of the company.

Video of the Day

If you invest when a company is getting off the ground and it becomes successful, you will likely have bought the shares when they were cheaper. If they are worth more today, this is a positive for you. Conversely, if a company was riding high when you bought shares and is now doing poorly, the shares are likely worth less.

But what if you bought stock at various times when the company's performance varied? Likewise, suppose you buy a large number of shares on the secondary market? In that case, it's unlikely that they will all come from a single source, and will instead be purchased at various prices from different sources until your total purchase amount is met.

## Calculating Average Cost Per Share

The team at Janus Henderson Investors explains that you can calculate the average cost per share as part of determining your overall gain or loss. The price per share formula is very straightforward. You simply take all the shares' total purchase price and divide it by the number of shares purchased.

For example, if you purchased ​50 shares​ of Company A for ​\$2,000 (\$40/share)​, ​25 shares for \$900 (\$36/share)​ and ​25 shares for \$1,200 (\$48/share)​, either because they were purchased at different times or all at the same time but from various sources, you would own ​100 shares​ total, bought for a total of ​\$4,100​. Dividing ​\$4,100 by 100​ yields an average cost per share of ​\$41​.

## Evaluating Stock Performance

This calculation is the first step in using the average cost basis method for determining gains or losses, which is an essential metric for investors. Once you determine the average cost per share, you can compare this against how much you sell the stock for.

In the example, assume you later sell ​50 shares​ of your stock for ​\$2,500​. The cost basis is the average cost per share that you paid times the number of shares that you sold: ​\$41 x 50 = \$2,050​. Your gain or loss is the net proceeds (how much you sold the shares for) minus the cost basis: ​\$2,500 - \$2,050 = \$450​. In this example, you've made a ​\$450 profit​.

This is just one example of a metric investors use to evaluate stocks for their potential or past performance. There are a number of other metrics, most often valuation ratios, that can be used to judge investments.

## Examples of Valuation Ratios

Many of the best metrics for stock investing are ratios of the stock price to other numbers or indicators of the company's health and prospects. The team at TopTal Finance provides information regarding the popular P/E or price-to-earnings ratio. The price-to-earnings ratio compares the price of a company's stock per share to its earnings per share (also known as its net income or profit).

This number is typically easy to calculate as the average stock price is widely available, and a company's earnings are generally its most-projected metric. The earnings per share are known as the EPS, and the P/E calculation is straightforward: divide the price per share by the company's EPS.

If a company's shares are ​\$40​ and its EPS is ​\$2​, then its P/E ratio is ​40/2 = 20​. This is also true of a company with a price of ​\$20​ per share and an EPS of ​\$1 (20/1 = 20)​. What this means in practice is you are paying ​\$20​ for each ​\$1​ of earnings.

## More on P/E Ratios

If you compare Company A with a P/E ratio of ​20​ to Company B with a ratio of ​30​ (e.g. ​\$60/share and EPS of \$2​), this means that you are paying ​\$30 for each \$1 of earnings​ when you choose B. This sounds objectively worse than Company A, but a lot of other factors need to be taken into account. B may have only had an EPS of ​\$2​ to date, but if it really picks up and gets an EPS of ​\$4​, the P/E ratio would become ​15​, so for the shares you bought earlier, you'll have paid only ​\$15​ for each ​\$1​ of current earnings.