In December, many investors start thinking about which stocks they'll buy in 2024, which is a great idea. Part of this assessment is examining how a company did during 2023 and seeing if it can turn around its misfortunes or keep the momentum going if it's doing well.

Two stocks that are still well off their all-time highs (by at least 75%) are UiPath (PATH 0.26%) and PayPal (PYPL 2.90%). While UiPath had a great 2023, PayPal did not. Still, I think both of these companies could have a successful 2024. Read on to find out why.

Both companies are still looking up at their highs set in 2021

Before thinking about 2024, let's review how each stock did in 2023. UiPath had a much better year than PayPal, as its stock has risen about 50% this year. 

After hitting the public markets in the hot IPO era of 2021, UiPath's stock essentially marched straight down before reaching a bottom in January 2023. So, the reason why it's down more than 75% from its all-time high was an inflated valuation of over 60 times sales. Now that the hype has dissipated from the company, it's free to let the business results do the talking.

UiPath's robotic process automation (RPA) software gives its users the tools to automate repetitive tasks and even has artificial intelligence (AI) integrations to improve its functionality. Part of its decline from IPO highs had to deal with slowing sales growth, although its latest 25% annual recurring revenue growth in the second quarter of fiscal year 2024 (ended July 31) is still respectable. As UiPath is operating from a position of low expectations, its stock had a strong year as customers continued to adopt its software.

Unfortunately, PayPal stock lost about 20% of its value in 2023, which is especially disappointing considering that the S&P 500 has gained around 20%.

2023 also saw one mistake after another, causing investors to continuously bail since its all-time high in July 2021. Now that it's reached a low of more than 80% from those highs, many are wondering if it can recover. I think it can, as its Braintree credit card processing product has been a hit among U.S. users thanks to its low fees.

It also has a new CEO at the helm, Alex Chriss. He's laser-focused on improving PayPal's efficiencies and raising margins, moves that shareholders should applaud. To be fair, PayPal's business also hasn't done that bad, as its total payment volume rose 15% in the third quarter while revenue rose 8%.

But why will 2024 be a great year for each company?

Both stocks are cheaply valued for their performance

UiPath's growth will come from RPA and AI adoption. Its products represent a tangible way for management teams to see technological developments within their business to increase employee efficiency and gain an upper hand over competitors. With Wall Street analysts expecting 19% revenue growth for fiscal year 2025, it's set to continue its rebound at a market-beating pace.

It's also valued at a discount to many of its software peers.

PATH PS Ratio Chart

PATH PS Ratio data by YCharts.

At 9.2 times sales, UiPath isn't overvalued, meaning its stock performance should be tied to business gains.

For PayPal, its entire investment thesis hinges on its absurd undervaluation.

PYPL PE Ratio Chart

PYPL PE Ratio data by YCharts.

A valuation of 17 times earnings is an incredibly cheap price to pay for many stocks, let alone one growing at market pace. Furthermore, with the efficiency gains expected over the next 12 months, PayPal trades at 12 times forward earnings, which is a bargain-bin price.

If Alex Chriss and his new team can get PayPal to accelerate its growth even slightly or improve margins, the stock is set to explode higher, as it doesn't have that much room to get cheaper. The market doesn't believe in PayPal, but the company barely has to do well to produce market-crushing results at this price.