So far in 2014, the S&P 500 (^GSPC 0.02%) has hit all-time highs on 33 different occasions. That seems like a huge number, and it might rightly have many investors worried that the market is overvalued. However, there are still many stocks that make the broader market look dirt-cheap.

Though it's not perfect, a company's price-to-earnings ratio, or P/E, is the metric most commonly used to gauge how expensive a stock is. Currently, the index as a whole trades for a P/E of 19.6. But the five companies below are far more expensive. Does that mean they should be avoided at all costs? Not necessarily. Read below to find out why.

Note: non-GAAP earnings are used to calculate P/E.

5. Vornado Realty Trust (VNO -1.54%): P/E of 127
This real-estate investment trust, or REIT, owns a number of expensive properties in both Manhattan and the Washington, D.C., area. The company is known for turning down the lease to the World Trade Center in 2001 because of unfavorable terms in the contract -- helping Vornado avoid the fallout associated with the Sept. 11 attacks.

More important for investors is the company's dividend. Because Vornado owns some of the most valuable real estate in the country, including properties in Times Square, it generates gobs of free cash flow. In order to maintain its status as a REIT, Vornado must pay out at least 90% of its profit every year to shareholders.

Currently, the company sports a 2.9% dividend yield. That's not bad, but it's relatively low by REIT standards. That means investors are willing to pay up for what they consider to be a safe dividend. When it comes to Vornado, focus on the dividend yield above the company's P/E.

4. Netflix (NFLX -3.92%): P/E of 140
Unless you live under a rock, you should be familiar with Netflix. The company is responsible for a huge amount of bandwidth used in the United States as Americans binge watch their favorite shows over the weekends.

The company's P/E is high for two main reasons. First, there are high expectations for this stock. Netflix's foray into original content has produced a couple of big winners in House of Cards and Orange is The New Black. Many believe that if the company can continue to churn out winning shows, it could rewrite the entire television industry. Investors are willing to pay up for that potential.

On the other hand, the denominator in the P/E equation (earnings) is also very low right now. That's because Netflix is spending money hand over fist on original content and international expansion. While the former might be a continual expense, common sense dictates that Netflix will eventually run out of places to expand and not have to worry about building out its infrastructure.

3. Prologis (PLD -1.57%): P/E of 158
Like Vornado, Prologis is a REIT, but it has an entirely different focus: industrial real estate across the globe. The company owns and operates or leases over 3,000 different logistics and distribution centers. In essence, Prologis' properties help grease the wheels of global finance -- an important and lucrative job.

As you might have guessed, the dividend is more important to investors that the company's P/E. Currently, Prologis stock yields 3.5%. That's a solid payout, though it's also low among REITs. This suggests that investors view Prologis as one of the most reliable REITs out there, and they are willing to pay up for it.

2. Crown Castle (CCI -0.03%): P/E of 208
Crown Castle is one of the three top players in the wireless tower industry. This industry is responsible for building out a large base of towers that help transmit data and digital information to smartphone and tablet users throughout the country.

Expectations for the company are high. Being in the business of big data is lucrative, and Crown helps transmit all that data. Analysts expect Crown to grow earnings by 30% annually over the next three years.

As great as that sounds, investors should temper their excitement about that growth by considering that many Fools think Crown rival American Tower (AMT -0.48%) is far better positioned to dominate the tower industry for the foreseeable future. A P/E that high is difficult to reconcile with a company that doesn't have the No. 1 position in its industry.

1. Amazon.com (AMZN -1.64%): P/E of 847
Before getting started, I'll admit that I'm a bit biased when it comes to Amazon -- it is my second-largest holding, accounting for 10% of my family's real-life holdings.

The company has such a high price tag because CEO Jeff Bezos is spending huge amounts of money to make Amazon the most customer-centric company in the world. That spending includes expensive new fulfillment centers, content for Amazon Prime streaming, and investments in various forms of technology -- from new e-readers to drones that could one day deliver packages to your doorstep.

Investors in this company need to be willing to play the long game. There's no doubt Bezos will spend money wherever he sees an opportunity, which means outsized profits could be years -- if not decades -- into the future. But the baseline potential is undeniable: Currently only 6.4% of retail sales are made online. Amazon is better positioned than anyone to capture large slices of this pie over time.