Despite some stocks being quite expensive, there are still some genuine bargains in the market. Bargains aren't always the lowest stock price, as the real indicator of a bargain is a stock's valuation. Valuation is determined by dividing the company's market cap by a financial metric like sales or earnings, and is a true indicator of whether a stock is a bargain or expensive.

With that in mind, here are two stocks that offer investors a real bargain and could be poised for a breakout.

1. UiPath

UiPath (PATH 0.26%) is sometimes considered a top artificial intelligence (AI) investment. Although its base product, robotic process automation (RPA), isn't AI-associated, the various add-ins to improve RPA capabilities are. RPA allows its users to automate tasks that are repetitive and are a drain on an employees' time.

By deploying RPA, UiPath improves efficiency. But RPA can only go so far. When AI is added in to help, such as to fill in information or find tasks that can be automated, RPA becomes a much more powerful tool.

This solution has become quite popular, with more than 1,930 clients spending $100,000 or greater annually. That cohort was up 16% from last year, indicating clients see UiPath as an important partner. Overall, its annual recurring revenue (ARR) rose 25% in Q2 of FY 2024 (ending July 31), and existing customers spent $121 for every $100 they spent last year.

Those are solid numbers that rival many top software investments, but UiPath doesn't garner a premium valuation like its peers. Instead, it trades at an affordable 8 times sales. This indicates that expectations are lower than its peers, which often trade in the 15 to 20 times sales range. But don't let that fool you, as UiPath has a large market to capture and a bright future ahead. In fact, UiPath is Cathie Wood's third-largest holding across her Ark Invest portfolio.

With the stock trading at a discount to its peers, investors can pick up shares of a strongly executing company for relatively cheap.

2. Twilio

Twilio (TWLO 1.47%) isn't the same investment type as UiPath. Instead of being a strong executor with a cheap price, Twilio is a poor executor with a dirt-cheap stock price. But it could be ripe for a turnaround.

Twilio's products are centered around improving communication. At first, this started as facilitating text messages between businesses and clients, but has significantly expanded to include customized email and voice messaging. Furthermore, Twilio also has tools to aid in capturing and processing customer data.

During 2020 and 2021, Twilio's products saw rapid adoption, and the company grew rapidly. But after the economy tightened up and its clients became more budget-conscious, Twilio has struggled.

Twilio chooses to bill its customers based on product usage instead of on a subscription schedule, so users can pull back their spending if they're looking to save a few dollars. In strong times, this is a great strategy because it aligns a company's interests with its users. But this is also a double-edged sword that can harm the company during turbulent periods.

Although Twilio posted revenue growth of 10% in Q2, it guided for essentially flat revenue growth in Q3. Furthermore, it's still working on achieving GAAP profitability, thanks to its high stock-based compensation bill. However, Twilio has steadily improved its profitability after deciding to lay off a large chunk of its company earlier this year.

From that information, Twilio may not seem anywhere close to a buy. But when you look at its valuation, it shows the stock could be primed for a run.

TWLO PS Ratio Chart

TWLO PS Ratio data by YCharts

At a rock-bottom valuation of 2.7 times sales, Twilio's stock has no expectations baked into it. But if the company can return to growth mode when the economy opens back up, the stock is poised for a major upside.

There's nothing wrong with Twilio's products; it's just a bad time for the company. Buying Twilio here makes sense, but you shouldn't over-allocate to it in case the turnaround doesn't occur.