Tabellab

You are not signed in — the lab works, but your progress is not saved. Sign up

Lesson 1 of 20 is free. Unlock all 20 hands-on labs, the final exam and your certificate.

Buy course — $9.90
Loading the spreadsheet…

Why share price alone tells you almost nothing

Open any finance app and the first number you see next to a company is its share price. It is big, it moves, and it is easy to compare. It is also the number beginners misread most often. A $142 share is not "more expensive" than a $27 share in any useful sense, and a company with a $48 share is not automatically smaller than one with a $64 share. To compare companies you need to know how many shares exist and how much profit stands behind each one.

This free first lesson is for anyone who wants to understand what stock market numbers actually mean: new investors trying to read a fund factsheet, students in a finance or business course, analysts who know Excel but not equity basics, and anyone who simply wants to follow financial news without nodding along. You will work with five fictional companies, Brightwater Foods, Corvane Software, Halden Rail, Lumora Health and Pellridge Bank, and calculate four numbers that appear on every stock quote: market capitalisation, earnings per share (EPS), the price-to-earnings ratio (P/E), and the effect of earnings growth on price.

This course is educational only and not investment advice. All companies, prices and profits are fictional illustrations, not forecasts. Nothing here suggests buying, selling or holding any security.

The four numbers, explained simply

A share is a small slice of ownership in a company. If a company has 210 million shares outstanding and you own one of them, you own one 210-millionth of the business, including one 210-millionth of its profits. The share price is what the market currently asks for that one slice.

Market capitalisation ("market cap") is the price of all the slices together: share price × shares outstanding. It is the market's current price tag for the whole company's equity. Brightwater Foods trades at $48.20 with 210 million shares, so its market cap is 48.20 × 210 = $10,122 million, roughly $10.1 billion.

Earnings per share (EPS) spreads the company's yearly net income (profit after all costs, interest and taxes) across the shares: net income / shares outstanding. Brightwater earned $520 million, so each share "owns" 520 / 210 = $2.476 of profit.

The P/E ratio connects the two: price / EPS. It tells you how many dollars the market pays today for one dollar of yearly profit. Brightwater's P/E is 48.20 / 2.476 ≈ 19.5. Because both price and EPS are "per share", you get exactly the same number at company level: market cap / net income = 10,122 / 520 ≈ 19.5. That identity is a useful self-check, and the lab shows it in cell E10.

A related figure is the earnings yield, the P/E turned upside down: EPS / price. For Brightwater it is 2.476 / 48.20 ≈ 5.1 %. It is simply another way to express the same relationship between profit and price; it is not a prediction of what an owner will receive.

How the four numbers connect (Brightwater Foods)Share price$48.20Shares out210 mNet income$520 mMarket cap$10,122 mEPS$2.476P/E ratio19.47price / EPS = market cap / net income
The three inputs on the left are all you need. Market cap and EPS come from them, and the P/E can be calculated two ways that give the same answer.

What a P/E ratio can and cannot tell you

A high P/E usually means the market expects profits to grow, so it is willing to pay many years of today's earnings up front. It can also mean that this year's profit is temporarily depressed, which pushes EPS down and the ratio up. A low P/E can reflect modest growth expectations, a cyclical business near a profit peak, higher perceived risk, or simply a company that is out of favour. The number describes a relationship. It does not, on its own, say whether a share is attractive or not, and two investors can look at the same P/E and reach opposite conclusions.

P/E ratios are also most meaningful when you compare similar companies, for example two food producers, rather than a software firm with a railway. Different industries have different growth patterns, capital needs and risks, so their typical ratios differ. In our fictional data, Corvane Software has the highest P/E and the two capital-heavy businesses, Halden Rail and Pellridge Bank, have the lowest. That pattern is plausible, but in this lab it is just illustrative data.

Worked example: five companies, step by step

Here is the lab data with every column filled in. The first four columns are given; you calculate the last three. Notice how the ranking by share price (Corvane first, Lumora last) is completely different from the ranking by market cap, where Lumora is almost as large as Corvane.

The lab data with the finished columns (all companies fictional)
CompanyPriceShares out (m)Net income ($m)Market cap ($m)EPSP/E
Brightwater Foods$48.2021052010,122$2.4819.47
Corvane Software$142.509541013,538$4.3233.02
Halden Rail$63.801601,02010,208$6.3810.01
Lumora Health$27.4048069013,152$1.4419.06
Pellridge Bank$36.903001,15011,070$3.839.63

The formulas in row 2 are E2: =B2*C2, F2: =D2/C2 and G2: =B2/F2. Because all three use relative references, you write them once in row 2 and copy them down to row 6. Units matter here: shares and net income are both in millions, so market cap comes out in millions of dollars and EPS comes out in plain dollars per share, because the millions cancel.

Share price vs company size (market cap)Share price ($)Market cap ($bn)BrightwaterBrightwater48.2010.1CorvaneCorvane142.5013.5HaldenHalden63.8010.2LumoraLumora27.4013.2PellridgePellridge36.9011.1Market cap = price x shares outstanding
Same five companies, two very different rankings. Lumora Health has the lowest share price but the second-largest market cap, because it has 480 million shares.

Now read the P/E column. Corvane Software trades at about 33 times its profit, while Pellridge Bank trades at under 10 times. Put differently, for each dollar of yearly profit, the market price of Corvane asks about $33 and the market price of Pellridge about $9.60. The lab asks which company is "the most expensive per dollar of profit", and that is the precise, neutral way to describe a high P/E.

P/E ratio = price / EPS (fictional lab data)Corvane Software33.0Brightwater Foods19.5Lumora Health19.1Halden Rail10.0Pellridge Bank9.60102030x profit
P/E ratios from the lab, sorted. The bars measure price per dollar of yearly profit, not quality or future performance.

What happens to the price when earnings grow

The last part of the lab asks a "what if" question. Suppose Brightwater's EPS grows by 8 % next year (an assumed number in E8, not a forecast) and the market keeps valuing the company at the same P/E of 19.47. Then next year's price would be P/E × next year's EPS: =G2*F2*(1+E8), which gives about $52.06. Because P/E × EPS is just today's price, the shortcut =B2*(1+E8) gives the same result: at a constant multiple, the price moves one-for-one with earnings.

The interesting part is the assumption. In real markets the multiple rarely stays still. If profits grow 8 % but the market becomes less optimistic and the P/E drops from 19.5 to 17, the price falls even though the business earned more. If the P/E rises, the price can climb faster than profits. So a price change can always be split into two parts, the change in earnings and the change in the multiple. Keeping that split in mind is one of the most useful habits in reading market news. You can test it yourself in the lab by changing E8 or by typing a different P/E into a spare cell.

Price = P/E × EPS. The multiple matters as much as the earnings.
Scenario (Brightwater, for example)EPS next yearP/EPriceExcel
Today$2.4819.47$48.20=B2
EPS +8 %, same P/E$2.6719.47$52.06=G2*F2*(1+E8)
EPS +8 %, P/E falls to 17$2.6717.00$45.46=17*F2*(1+E8)
EPS +8 %, P/E rises to 21$2.6721.00$56.16=21*F2*(1+E8)

How to do it in Excel, step by step

  1. Enter the headers in row 1: Company, Price, Shares out (m), Net income ($m), Market cap ($m), EPS, P/E. Select A1:G1 and press Ctrl+B (Cmd+B on Mac) to make them bold, then use Home › Alignment › Wrap Text so long headers fit.
  2. Type the five companies with price, shares (in millions) and net income (in millions) in A2:D6. Keep both counts in the same unit, otherwise the ratios will be off by a factor of a thousand or a million.
  3. In E2 type =B2*C2 and press Enter. That is Brightwater's market cap in $m.
  4. In F2 type =D2/C2 for EPS, and in G2 type =B2/F2 for the P/E.
  5. Select E2:G2 and double-click the fill handle (the small square at the bottom right of the selection) to copy the formulas down to row 6. Alternatively select E2:G6 and press Ctrl+D to fill down.
  6. Format the numbers: select F2:F6 and choose Home › Number › Currency with two decimals. For G2:G6 use Number with one or two decimals. For E2:E6 use a thousands separator (Ctrl+Shift+1 applies the number format with separators).
  7. Add the growth input: type 8% in E8. In E9 enter =G2*F2*(1+E8). Use the percentage format for E8 (Ctrl+Shift+5).
  8. Add the self-check in E10: =E2/D2. It must match G2. If it does not, a unit or a reference is wrong.
  9. Optional: rank the P/E ratios with =RANK.EQ(G2,$G$2:$G$6,0) in H2 and copy down, or find the name of the company with the highest P/E with =INDEX(A2:A6,MATCH(MAX(G2:G6),G2:G6,0)).
  10. Optional: select A1:A6, hold Ctrl and select G1:G6, then use Insert › Charts › Bar to draw a P/E chart like the one above.
Use the identity price / EPS = market cap / net income as a built-in test. When you build any valuation sheet, add a cell that calculates the same thing a second way. If the two cells disagree, you have found a mistake before it spreads.

Stock market, ETF and index fund investing course in Excel: share price, market cap, EPS and P/E
The course works through every number on a live spreadsheet that checks your formulas.

Common mistakes and how to spot them

  • Comparing share prices instead of market caps. If you catch yourself saying a company is "bigger" because its share costs more, calculate price × shares. Lumora at $27.40 is larger than Brightwater at $48.20.
  • Mixing units. Shares in millions and net income in thousands (or the other way round) give an EPS that is off by a factor of 1,000. Spot it with a sense check: an EPS of $2,476 on a $48 share would mean a P/E of 0.02, which is not believable.
  • Dividing the wrong way. =C2/D2 instead of =D2/C2 gives shares per dollar of profit. =F2/B2 gives the earnings yield, not the P/E. Ask "what is per what?" before you write the formula.
  • Dividing by price instead of shares. =D2/B2 divides profit by price and has no standard meaning. EPS always divides by the share count.
  • Ignoring negative or tiny earnings. If net income is negative the P/E is meaningless, and if it is close to zero the ratio explodes. Wrap the formula: =IF(F2<=0,"n/a",B2/F2).
  • Using an old share count. Companies issue and buy back shares. Use the share count from the same period as the profit, otherwise EPS drifts.
  • Confusing growth with the price increase. =B2*E8 is only the increase ($3.86). The new price is =B2*(1+E8).

Quick reference: formulas and shortcuts used

The table collects every formula from this lesson with its generic form and the exact cell version used in the lab.

TaskExcel formula or shortcutLab example
Market capitalisation=price*shares=B2*C2
Earnings per share=net_income/shares=D2/C2
P/E ratio=price/EPS=B2/F2
P/E check at company level=market_cap/net_income=E2/D2
Earnings yield=EPS/price=F2/B2
Price at constant P/E after growth=PE*EPS*(1+g)=G2*F2*(1+E8)
Safe P/E for losses=IF(EPS<=0,"n/a",price/EPS)=IF(F2<=0,"n/a",B2/F2)
Rank the P/E ratiosRANK.EQ=RANK.EQ(G2,$G$2:$G$6,0)
Name of highest P/EINDEX + MATCH + MAX=INDEX(A2:A6,MATCH(MAX(G2:G6),G2:G6,0))
Fill formula downCtrl+D or double-click fill handleE2:G6
Percent / number formatCtrl+Shift+5 / Ctrl+Shift+1E8 / E2:E6

Real-world uses

  • Reading a fund factsheet. Index funds and ETFs often report the average P/E of their holdings. Knowing that it is price per dollar of profit lets you compare two funds' valuation level in plain terms.
  • Following earnings news. When a company reports "EPS of $2.67 vs $2.48 a year ago", you can calculate the growth (about 8 %) and ask whether the price moved by more or less than that, which tells you whether the multiple changed.
  • Comparing peers in a business or finance class. Put five companies from one industry in a sheet like this one and you have a basic comparable-companies table, the starting point of many valuation case studies.
  • Checking a news headline. "Company X is now worth more than Company Y" is a market-cap statement. With price and share count you can verify it in two cells.
  • Building your own watch sheet. Many people keep a spreadsheet of companies they study. Adding market cap, EPS and P/E columns turns a list of prices into a list of comparable numbers.

What you will build in the rest of this course

This first lesson is free. The remaining 19 lessons are part of the paid course ($9.90 one-time) and each one comes with its own live lab sheet that checks your formulas cell by cell.

Returns from price and dividends (total return). You split four years of Brightwater Foods returns into the price part and the dividend part, and grow a $10,000 example with dividends reinvested, so you can see why a price chart alone understates what a shareholder received.

Compounding & the cost of waiting. You compare the same $250 monthly plan started at 25, 30, 35 and 40, using an assumed rate, and put a dollar figure on what a later start changes in the arithmetic.

ETF & index fund vs active fund: the fee drag. You grow $50,000 for 30 years under two expense ratios and measure exactly how much a fee difference removes when it compounds.

Diversification: weights & sector exposure (SUMIFS). You measure how an eight-holding portfolio is spread across sectors and discover how much technology it really holds once you look inside its ETF.

Dollar-cost averaging: average cost vs average price. You invest a fixed $300 a month in a fictional ETF for six months and see why the average cost per unit ends up below the average price.

Rebalancing back to target weights. After one strong year for stocks you bring four funds back to a 50/20/25/5 target and calculate every trade needed, a calculation that is easy to get wrong without a sheet.

Buy & hold vs trading: commissions, spreads & tax drag. You compare two investors with the same gross return and see what costs and taxes do to the outcome over 20 years in the example.

Summary

Share price is the price of one slice; market cap is the price of the whole company. EPS is the profit belonging to one share, and the P/E ratio is how many dollars of price stand behind each dollar of yearly profit. You can calculate the P/E per share or for the whole company and get the same answer, which makes a handy check. At a constant P/E the price moves with earnings, but in practice both parts can change. Now scroll up to the lab, fill in E2:G6 and E9 for the five fictional companies, and let the sheet check each formula for you.

Frequently asked questions

How do you calculate market cap in Excel?

Multiply the share price by the number of shares outstanding, for example =B2*C2. Keep the share count in a consistent unit such as millions so the result is in millions of dollars.

What is the formula for EPS?

Earnings per share is net income divided by shares outstanding, for example =D2/C2. If both numbers are in millions, the millions cancel and EPS comes out in dollars per share.

How do I calculate the P/E ratio in Excel?

Divide the share price by the EPS, =B2/F2. You can check it at company level with market cap divided by net income, which gives the same number.

Does a low P/E mean a stock is cheap?

Not necessarily. A low P/E can reflect slower expected growth, higher risk, a cyclical profit peak or a company out of favour. It describes the price per dollar of profit, not whether a share is a good choice.

Why is a higher share price not a bigger company?

Company size depends on price times the number of shares. A company with a low share price but many shares can have a larger market cap than one with a high share price and few shares.

What happens to the P/E when earnings are negative?

The ratio becomes negative and has no useful meaning, so analysts usually show it as not applicable. In Excel you can use =IF(F2<=0,"n/a",B2/F2).

Keep going: Stock Market, ETF & Index Fund Investing

This free lab is lesson 1 of 20. Unlock the other 19 hands-on labs, the final exam and your certificate for a one-time $9.90.

  1. Returns from price and dividends (total return)
  2. Compounding & the cost of waiting
  3. ETF & index fund vs active fund: the fee drag
  4. Diversification: weights & sector exposure (SUMIFS)
  5. Dollar-cost averaging: average cost vs average price
  6. Rebalancing back to target weights
  7. Buy & hold vs trading: commissions, spreads & tax drag
  8. Stock splits & adjusted prices: comparing like with like
  9. Inflation & real returns: what your gains really buy
  10. Volatility: standard deviation, the worst year & the typical range
  11. Drawdowns: peak, fall & the gain you need to recover
  12. Holding periods: how often did 1 and 5 years lose money?
  13. Stocks + bonds: choosing a mix by return and bad-year loss
  14. Same index, different funds: tracking difference & real cost
  15. P/E on one year vs average earnings & the PEG ratio
  16. Single stocks vs the index: winners, losers & the median
  17. Borrowing to invest: leverage, interest & margin calls
  18. Your own return with regular deposits (XIRR)
  19. Final project: Lena's annual portfolio review

Buy course — $9.90 See the full course