Remember the dot-com era, when all those 20-somethings became paper millionaires (for a week, at least) buying tech stocks? None of the old investing tenets applied -- at the time, the Street even questioned value guru Warren Buffett's wisdom. Day was night, it seemed.

Then came the crash and day turned back to day. Investing in no longer seemed like such a good idea. The experiences of the dot-com era reinforced a simple but indispensable maxim: Invest like an adult. Don't speculate or go on a whim. Know the value of your investment.

There is a smart, safe way to build wealth: Buy stocks you can estimate the value of and buy them when the Street is looking elsewhere.

If all the other kids jump off a bridge.
I've never much liked following the crowd, and that's served me well as an investor. A principle tenet of value investing -- one I preach in Motley Fool Inside Value -- is to eschew conventional wisdom. If the Street is selling you on an "easy, safe stock" -- one that is assumed to be prudent and relatively automatic -- raise an eyebrow. When there is a near-unanimous opinion about a company's greatness, it's almost by definition not a bargain.

Likewise, be wary of "glamour stocks" and the blind devotion their followers -- I mean, shareholders -- practice. Never forget how easily "the next big thing" can turn into a "one-hit wonder."

Instead, do your homework. If others hate a business tainted by bankruptcy, an SEC investigation, or scandal, it might be worth considering. If a solid stock is really hated -- as was the case with my first Inside Value recommendation, MCI (NASDAQ:MCIP) -- there may be no better time to buy. (That's not to say all unloved companies are worthy of your purchase. Enron was beat down for a reason.)

MCI was tainted by bankruptcy, an SEC investigation, and scandal -- not to mention an unattractive industry -- but I saw an unloved telecom ready to rise from the ashes. Before selling the pick, MCI gave subscribers a 50% shot in the arm (including dividends) vs. 11% for the S&P 500 over the same period.

Do your homework
As a kid, you'll find any excuse to avoid doing homework. Now I can't get enough of it. Take a company such as ExxonMobil (NYSE:XOM), a major player in a cyclical industry. Anyone with a pulse and a car knows that the price of oil is high right now. You also know that oil prices tend to rise in the summer when Americans are doing most of their long-distance driving.

The stock currently trades around $58 per share, with a price-to-earnings ratio (P/E) of 13. Over the past three years, the company's average P/E is 15.4; that figure rises to 16.7 over the past five years and 20.9 over the past seven years. Why might ExxonMobil be undervalued right now? Investors could be concerned about instability in the Middle East, unsustainably high gas prices, competition from the likes of BP (NYSE:BP) and Sunoco (NYSE:SUN), or even the prospects of alternative fuels. They are trading the stock up and down daily -- often based on headlines. But mature, unemotional investors would see Exxon's fundamentals and estimate a future value based on the probabilities of rosy to not-so-rosy scenarios.

In the simplest terms, that means using a discounted cash flow model and plugging in conservative or aggressive growth numbers to supplement the data we already know. Exxon had $21 billion in free cash flow last year and has a current price of $58. Using fairly simple calculations, I arrive at reasonable valuations from $48 to $74, depending on the risk assumptions. If we decide that $70 is the stock's fair value, that's a fair margin of safety with the opportunity to achieve a 23% gain. However, the potential exists for a 29% gain or a 16% loss, if Exxon's future cash flows are affected positively or negatively. That said, I do think there is some value in energy companies right now, largely because the Street has been looking away from oil recently.

But Exxon might not be cheap at all. I added the company to my Watch List in February, but am not convinced that its value days are ahead. In the middle of 2002, the stock price dipped all the way down to the low $30s because of declining earnings and concerns about violence in oil-rich nations. Investors who saw the underlying value of Exxon then would have doubled their money in just three years' time.

Don't be a quitter
A 100% gain in three years is phenomenal, but I hope to hold an investment for 10 to 20 years. Warren Buffett's Berkshire Hathaway (NYSE:BRKa) (NYSE:BRKb) remains invested in the Washington Post (NYSE:WPO) after more than 30 years, and Berkshire's position has surged 150-fold during that span.

After the bubble burst five years ago, I began hearing cries that the strategy of holding stocks for decades was dead. But many of these people had been speculating based on irrational unresearched advice from friends, coworkers, bartenders, or barbers. When you buy outstanding companies with sound fundamentals -- firms that are likely to be around in a decade or longer -- at bargain prices, you significantly increase your likelihood of profiting.

About a month after I recommended Anheuser-Busch (NYSE:BUD) to Inside Value subscribers, the company announced that Berkshire Hathaway had become a major shareholder. This is a quality company, one that serves a profitable, predictable, and loyal market -- despite worries about BUD's competition or inability to grow. It should look much the same in 10 or 20 years, only bigger and more profitable.

Investing + Emotion = Disaster
There are a number of oft-repeated value investing tales, among them Benjamin Graham's parable about Mr. Market, an investor whose ideas on value fluctuate wildly from day to day. This is an irrational approach to investing and history has demonstrated that it doesn't work.

A rational approach does work. Scrutinize a company's financial statements and annual reports to reveal less-than-obvious strengths or flaws. Document your findings and read and reread that list before buying. If you know the reasons for buying like the back of your hand, you'll be able to stand the swings that manic Mr. Market imposes on your company.

A commitment to acting rationally and working hard to make the most intelligent investment decisions with the information available can help you avoid mistakes and outpace the market. Invest like an adult. Write that market mantra on a scrap of paper and store it in your back pocket. Your wallet will thank you.

If you'd like more authentic grown-up investing advice, Philip is offering a free 30-day trial to Inside Value. Subscribers receive two stock picks a month, access to all 22 of our picks to date, and a Foolish community of message boards where hundreds of more companies are vetted. There is no obligation to subscribe and, as always, the Fool's money-back guarantee stands behind the offer. Click here to learn more.

Philip Durell owns shares of Berkshire Hathaway, but no other company mentioned in this article. The Motley Fool has a disclosure policy.