I've been watching oil-related stocks with interest lately -- partly because I own a few, and partly because I own a vehicle with a V8 engine. Guess what? As oil prices have risen, production companies and refiners have passed those increases on to us.

What I pay out at the pump, however, I get back from my stocks; oil-related companies are practically minting money right now. Nevertheless, those companies' price-to-earnings ratios are low. Exxon Mobil (NYSE:XOM) has a trailing 12-month P/E of 14; ConocoPhillips (NYSE:COP) has a P/E of 9; Anadarko Petroleum's (NYSE:APC) P/E is 13; and Apache (NYSE:APA) has a P/E around 12.

Some oil-drilling companies, however, have considerably higher P/Es. Transocean's (NYSE:RIG) is a lofty 81, and Diamond Offshore's (NYSE:DO) is in nosebleed territory above 100, based on trailing earnings. One of the problems of gauging a company's value based solely on the P/E ratio is that very low earnings per share (the E in P/E) enlarge the ratio. The P/E can remain high even as the business collapses and earnings plummet.

Drillers, in fact, often have high (or negative) P/Es not because of great earnings, but because their cutthroat business can send those earnings plunging during hard times. Both companies predict that their EPS will increase in the next two years, bringing their P/E ratios into line with the rest of the industry.

Are these stocks still expensive, then? The price-to-sales ratio, or P/S, can help you find out with relative ease. Just divide the market cap by the trailing twelve-month sales.

Alas, few things in life are truly easy. Bear in mind that the P/S ratio is not entirely consistent; you are dividing the market value of equity by the revenues of the firm. In order to ensure that you aren't comparing apples with oranges, you should consider the respective debt-to-equity levels when comparing two or more firms.

So how do the P/S ratios look for our drillers? I should note that Diamond Offshore has the higher long-term debt-to-equity ratio of the two, so the two firms are not identical in capital structure. With that caveat in mind, let's proceed.

Transocean's P/S ratio is 7.2, while Diamond Offshore's is 7.9. To gauge the merit of these ratios, you can look at the historical value over the last 10 years. This takes some time to calculate, but if you subscribe to the Motley FoolInside Value newsletter, you may remember that value guru Philip Durell presented an easier method a few months ago. He told subscribers that MSN's Money website has historical values of the P/E and P/S ratios. Exercise caution, though; several of the site's values for Transocean were incorrect.

In any event, here are the numbers, given the correct figures for Transocean. Since 1996, Transocean's P/S ratio has ranged from about 2.8 to 8.2. For Diamond, the range is 2.7 to 8.1. The current ratio for both drillers is historically high -- in other words, these stocks probably aren't bargains.

A high P/S ratio doesn't automatically mean you should sell these stocks. The future does seem bright for Transocean and Diamond Offshore. However, the drilling business is highly volatile. If earnings fail to materialize, investors will likely feel a lot of pain.

For related Foolishness:

Tap into fellow Fools' collective wisdom on our Transocean and Diamond Offshore message boards.

If you like exploring for value stocks, try a 30-day free trial to the Motley Fool Inside Value newsletter.

Fool contributor Dan Bloom owns shares in Anadarko Petroleum and Transocean. The Fool has a disclosure policy.