Have you ever had to listen to your parents talk about "the way things were" when they were young? Besides the walking to school uphill both ways -- barefoot in the snow, no less -- they probably reminisce about when a McDonald's hamburger cost $0.15, or gas cost $0.25 a gallon.

"These prices today," they snort, "they're just insane. Four dollars for gas? Eighty-nine cents for a hamburger? Scandalous!"

Never mind that a gallon of gas in 1918 cost $3.50 in today's prices, or that a 1955 hamburger cost $1.21. Fifteen-cent hamburgers and gas for a quarter are the standards by which all other prices are measured.

And you do the same thing.

Don't listen to your gut
According to a study by MIT behavioral economist Dan Ariely, the first price we encounter for a given item shapes how we view every price we encounter after that.

He asked a group of MIT MBAs to write the last two digits of their Social Security number -- in dollar terms -- next to each of several listed products and then indicate whether they would pay that much for each item. Then he asked them to write down the maximum amount they would pay for each product.

The students with the highest-ending Social Security numbers bid the most, whereas students with the lowest-ending numbers bid the least. In other words, the price we encounter first for a given product becomes an anchor -- and it, rather than any underlying value, provides us with our gut sense of whether something is cheap or overpriced.

Noted financial journalist Jason Zweig found the same thing when he looked into neuroeconomics to explain why smart people make bad decisions about money:

As soon as your intuition seizes on a number -- any number -- it becomes stuck, as if it had been coated in glue. That's why real estate agents will usually show you the most expensive house on the market first, so the others will seem cheap by comparison -- and why mutual fund companies nearly always launch new funds at $10.00 per share, enticing new investors with a "cheap" price at the beginning.

Back to the stock market
When you consider investing in a stock, you probably think about the quality of the company, its management, and its prospects for growth. And, of course, you look at the price for which it's trading, and the context for that price.

For instance:

 

Year-Ago Price

Recent Share Price

% Below 52-Week High

Beazer Homes USA (NYSE:BZH)

$8.46

$1.78

86%

Centex (NYSE:CTX)

$19.67

$7.09

77%

KB Home (NYSE:KBH)

$21.00

$9.78

66%

Pulte Homes (NYSE:PHM)

$10.46

$8.60

50%

*Data from Yahoo! Finance. All prices adjusted for splits and dividends.

And then:

 

Year-Ago Price

Recent Share Price

Wal-Mart (NYSE:WMT)

$44.71

$51.00

Church & Dwight (NYSE:CHD)

$52.89

$58.93

Emergent BioSolutions (NYSE:EBS)

$4.90

$20.06

Now, which stocks seem "cheap" from those two tables?

Before you answer ...
Your brain may have already anchored to the first four -- subconsciously.

See, Beazer, Centex, KB, and Pulte seem "cheap" compared with their high-water marks of the past year. And Wal-Mart, Church & Dwight, and Emergent BioSolutions seem "expensive" -- especially in this market.

But wait! Price anchoring is a mental mistake that can be very costly to your long-term returns. Share prices are complicated things -- they account for not only the underlying quality of the company, but also public opinion, assumed earnings growth, and investor enthusiasm.

The four building companies, for instance, are "cheap" for a good reason: The subprime debacle and the subsequent rash of foreclosures and contracted credit mean that housing starts hit record lows in October, and inventories of existing for-sale homes remain unusually large. In fact, a recent survey of homebuilders revealed record-low confidence in the housing market.

Meanwhile, the three companies that look "expensive" may still be excellent buy-and-hold plays. Wal-Mart, while lowering fourth-quarter guidance, is still considered a recession-resistant retailer. Church & Dwight, maker of household products, has a history of topping analyst estimates, and it's on track to meet expectations of 15% growth this year. Emergent BioSolutions is enjoying significant government contracts, new product lines, and the only FDA-approved anthrax vaccine.

In fact, all three of these stocks have been awarded four stars by our Motley Fool CAPS community -- and four- and five-star stocks, as a group, have been shown to outperform the market. The housing stocks? All one-star stocks.

Separating company from stock price
As Warren Buffett famously said, "Price is what you pay. Value is what you get."

Anchoring to a price means you'll ignore the more important trait -- value. You assume that because Google nearly tripled after its IPO, it had run its course ... and then you miss the nearly triple-digit gain since then. Or you buy a falling knife all the way to the low single digits. For both growth and value stocks, detach yourself from anchoring on an irresistible price and go about the work of separating price from value.

That gut sense of a stock's worth can -- and does -- lead investors far astray.

The alternative, then, is to buy and sell based on the current and future worth of the company. Put away your gut feelings and get out your calculator. Running a discounted cash flow (DCF) calculation, which takes into account the growth of free cash flow, expected growth, options dilution, and the rate of return you require for the risk you're taking, will give you a sense of the fair value of the company -- and thus whether today's share price is something you really can't resist.

If DCFs are more math-intensive than you'd like, or if you just want a cheat-sheet list of companies that our Motley Fool Inside Value investment service believes are trading for less than intrinsic value, sample the service free with a 30-day trial. You'll have access to our DCF calculator and all current recommended stocks without any obligation to subscribe. Click here to learn more.

This article was originally published June 30, 2008. It has been updated.

Julie Clarenbach owns none of the companies mentioned in this article. Google is a Motley Fool Rule Breakers selection. Wal-Mart is an Inside Value choice. The Motley Fool's disclosure policy remembers the summer when gas was $0.99 and its car got 50 miles to the gallon. Sigh.