Have you ever had to listen to your parents talking 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 that 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, while 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 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:

 Company

Year-Ago Price

Recent Share Price

% Below 52-Week High

Citigroup (NYSE:C)

$28.65

$6.75

78%

Morgan Stanley (NYSE:MS)

$52.69

$14.58

74%

Wachovia (NYSE:WB)

$5.45

$37.69

86%

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

And then:

Company

Year-Ago Price

Recent Share Price

Quality Systems (NYSE:QSII)

$31.85

$43.10

Axsys Technologies (NYSE:AXYS)

$38.68

$42.92

Amgen (NYSE:AMGN)

$48.02

$57.13

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

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

See, Citigroup, Morgan Stanley, and Wachovia seem "cheap" compared with their high-water marks of the past year. And Quality Systems, Axsys Technologies, and Amgen 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 three financial companies, for instance, are "cheap" for good reason. Each has been brought down by the credit troubles that have hurt both Wall Street and Main Street. They've written off billions of dollars from their balance sheets, and it's unclear how new regulatory standards and global finance policies might affect their business models going forward.

Meanwhile, the three companies that look "expensive" may still be excellent buy-and-hold plays. Quality Systems develops and markets health care information systems -- and high switching costs helps ensure protect them from competition. Axsys has ongoing defense contracts for its precision optics. Amgen is a leading biotech, with both a substantial pool of effective drugs and more in the pipeline.

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'll assume that because Google (NASDAQ:GOOG) nearly tripled after its IPO, it had run its course ... and then you missed the subsequent nearly triple-digit gain. Or you'll 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), 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 owned none of companies mentioned in this article. Google is a Motley Fool Rule Breakers selection. Quality Systems and Axsys are Stock Advisor recommendations. The Motley Fool's disclosure policy remembers the summer when gas was $0.99 and its car got 50 miles to the gallon. Sigh.