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? Eight-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. Yet 15-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 items. 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:

 

52-Week High

Recent Share Price

Citigroup (NYSE:C)

$52.97

$16.69

Morgan Stanley (NYSE:MS)

$85.90

$36.01

Wachovia (NYSE:WB)

$53.10

$15.40

And then:

 

Year-Ago Price

Recent Share Price

Baidu.com (NASDAQ:BIDU)

$167.98

$313.24

Intuitive Surgical (NASDAQ:ISRG)

$138.77

$269.59

Apple (NASDAQ:AAPL)

$122.04

$170.09

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

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

See, Citigroup, Morgan Stanley, and Wachovia seem "cheap" compared with their high-water marks of the past year. And Baidu, Intuitive Surgical, and Apple seem "expensive."

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 a good reason. Each has been brought down by the credit troubles that have hurt both Wall Street (starring Bear Stearns in the lead role) and Main Street (with a wave of foreclosures nationwide). They've written off billions of dollars from their balance sheets, and it's unclear how new regulatory standards might affect their business models going forward.

Meanwhile, Baidu.com is taking advantage of the rapid growth of the Chinese middle class. Intuitive Surgical sells robots that perform surgery; it's creating a market niche that it then ably fills. Apple is dominating the MP3 market while making inroads with its iPhone and traditional home computers. All three are "expensive," yes, but they're expected to grow by more than 20% a year for the next five years, none has long-term debt, and they're generating plenty of free cash.

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 triple-digit gain since then. 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.

Julie Clarenbach owns shares of Apple. At the time of publication, she owned none of the other securities mentioned. Google, Baidu.com, and Intuitive Surgical are Motley Fool Rule Breakers selections. Apple is a Stock Advisor recommendation. The Motley Fool's disclosure policy remembers the summer when gas was $0.99 and its car got 50 miles to the gallon. Sigh.