Get back to the basics with our Foolish back-to-school special! Start your journey here.

When you're dealing with a company that has no earnings, the price-to-sales ratio (P/S) can be a handy alternative to a price-to-earnings (P/E) ratio. If there are no earnings, you can't calculate a P/E, but as long as a company has sales, or revenue, you can calculate a P/S. (If company has no revenue, why the heck are you looking at it?)

The P/S divides the market capitalization of a company by its past 12 months' revenue. Remember that the market cap is the market's current value for the company, determined by multiplying the current share price by the number of shares outstanding.

Take a look at up-and-comer XM Satellite Radio (NASDAQ:XMSR). As of Aug. 31, XM had 306.8 million shares outstanding, priced at $12.47 a share, giving it a market capitalization of $3.8 billion. The company had $1.04 billion in sales over the previous four quarters, so its P/S would be 3.7 -- $3.83 billion divided by $1.04 billion.

It can be useful to compare the P/S with sales growth. A high P/S isn't necessarily bad if sales are growing rapidly. XM's compound annual revenue growth has been a whopping 88% over the past three years.

The P/S is especially handy with start-ups, small-cap companies, and unprofitable firms; you can use it to determine how a company is faring relative to its competitors. XM competitor Sirius Satellite Radio (NASDAQ:SIRI), for example, has a P/S of almost 5.5, much higher than XM's 3.7. Its compound annual sales growth rate, though, has been substantially higher than XM's over the past three years. Further, investors can infer from Sirius'  higher P/S ratio that the market expects Sirius' top-line growth to outpace that of XM in the years to come.

In addition, there are always years during recessions when companies in a certain industry, such as the auto industry, are unprofitable. This doesn't mean they're all worthless and lack an easy means of comparison. You can simply apply measures such as the P/S instead of the P/E -- sizing up how much you're paying for a dollar of sales instead of a dollar of earnings.

Despite its usefulness, though, the P/S should never be the only number you crunch. The P/S can sometimes give you a nice context for a company's value relative to its industry peers, but while sales growth is great, revenue must be transformed into meaningful and rising earnings to make shareholders happy.

The amount a company earns from its sales will eventually drive the value of the business and the stock over the long term, along with its cash position and free cash flow. Learn about other ways for Foolish investors to measure value by reading more about valuation.