Ever wonder how a company can have a price-to-earnings (P/E) ratio of 1,000? The answer is fairly straightforward.

Remember that the P/E ratio is a simple fraction -- the company's stock price divided by its earnings per share (EPS). As long as there are no earnings (such as with start-ups, or companies temporarily or permanently in trouble), the bottom of the fraction is zero and a P/E can't be calculated. But, as soon as a tiny bit of profit occurs, the fraction suddenly comes alive. With a bigger number on top (the stock price) and a very small bottom number (the EPS), the P/E is large.

Imagine a rapidly growing igloo construction start-up, called IceBoxes (ticker: BRRRR). For its first five years, it reports losses and has no P/E ratio. In year six, it finally generates a profit of $0.01 per share. With its stock price at $20, its P/E is a whopping 2,000 (20 divided by $0.01).

The following year, if its EPS is $0.05 (up 400%!) and its stock price remains $20, its P/E will be 400. If its stock price hits $35 when its EPS is $0.40, the P/E will be 88.

Keep in mind that the P/E is just one way to measure a company's value -- and it isn't even necessarily the best way. Some Fools think keeping an eye on cash flow is the true measure a company's value and potential. (Read one Fool's opinion in What's a High P/E?)

You can learn more about different kinds of companies and how to evaluate them in our how-to guides and online seminars. And for stock recommendations delivered to your mailbox each month, check out our new newsletters.