It's no secret that the stock market hasn't exactly been having its best year in 2022. The major stock market indices are down for the year, and many popular growth stocks have lost 30%, 50%, or even more.

However, for long-term investors, the market is also full of interesting opportunities. Here are five beaten-down stocks that look especially compelling right now.

1. Amazon

Amazon (AMZN -2.56%) is the "best" performing stock on this list, down just 23% from its 52-week high. And to be fair, there are some good reasons. We're starting to see consumers get a little more cautious when it comes to discretionary spending given the current economic uncertainty, and if inflation persists or a recession arrives, things could get worse before they get better.

Having said that, the long-term tailwinds are overwhelmingly positive for Amazon. E-commerce makes up just 15% of all U.S. retail sales today, and this should continue to trend upward over time. Amazon Web Services (AWS) is the leader in a cloud services industry that is expected to grow rapidly in the coming years. And don't overlook the company's potential in other industries like healthcare.

2. Empire State Realty Trust

Empire State Realty Trust (ESRT 1.10%) is a real estate investment trust, or REIT, that owns a portfolio of mostly office properties in New York City and the surrounding areas, including the iconic Empire State Building. The stock has been beaten down for the past few years, and the pandemic only made things worse, as more companies are shifting to hybrid and remote work models.

However, the recent data shows that occupancy remains strong in Empire State's portfolio, and actually has increased so far this year. The company also operates the observatory atop its flagship property, which has been a must-do tourist attraction in NYC for generations.

3. MercadoLibre

MercadoLibre (MELI -1.01%) is 50% below its 2021 high, and for similar reasons as Amazon's decline. Plus, inflation is worse in MercadoLibre's core markets than it is here, and this could certainly cause some near-term headwinds.

However, MercadoLibre's business continues to grow rapidly. In the second quarter, gross merchandise volume through MercadoLibre's marketplace grew 26% year over year despite economic headwinds, and total payment volume on the Mercado Pago payments platform is now more than $120 billion annualized. MercadoLibre's logistics and lending operations continue to gain momentum as well. Despite any headwinds, this is still a high-potential growth story.

4. PayPal

PayPal (PYPL 0.34%) has lost nearly two-thirds of its value over the past year, and it's easy to understand why. The company has essentially conceded that its medium-term user growth targets aren't going to happen, and recent guidance has been disappointing to investors.

Even with all of that in mind, it's important to remember that PayPal is still a payments behemoth, with over $1.2 trillion in annualized volume. Plus, although the business is growing slowly, it's still growing. Payment volume increased 13% year over year in the second quarter, and the company is generating free cash flow at a rate in excess of $5 billion per year.

5. Upstart

The worst-performing stock on this list, fintech company Upstart (UPST -1.97%) is down by more than 92% from its all-time high. To be fair, the stock went public in late 2020 and had risen to more than 20 times its IPO price by the time it peaked. Plus, there has been a slowdown in growth, and there are some big unanswered questions about how the company's proprietary risk assessment model will perform in a turbulent economy.

However, the results so far have been extremely impressive. Upstart's loans have outperformed those written using the traditional FICO score, and with the company just ramping up its auto loan business, the brightest days could still be ahead.

Buy for the long term

To be perfectly clear, I think all five of these companies have lots of long-term potential, and investors who buy and hold them for several years will be rewarded for their patience. However, I have absolutely no clue what they'll do over the next few weeks or months. I own all five in my personal stock portfolio and plan to measure my returns in decades, and would suggest approaching them in the same way.