With the S&P 500's price-to-earnings ratio (P/E) near an all-time high, it can be difficult to find potential investments right now. Luckily for investors, not all stocks are trading at a P/E north of 30. These aren't typically the most-talked-about companies in the financial news, but they can provide great opportunities for investors willing to poke around the bargain bin.

Two bargain stocks you can buy right now are Sprouts Farmers Market (SFM 0.43%) and Dropbox (DBX 1.44%). Here's why. 

A garbage can tipped over with tiles with percent signs on them falling out.

Image source: Getty Images.

Sprouts Farmers Market

Food shoppers on the West Coast may know Sprouts Farmers Market. This chain of grocery stores focuses on selling healthy food and fresh produce at a reasonable price. It has stores across the country but is focused primarily on California, the Southwest, Texas, and Florida right now. It operates over 360 stores with plans to open around 13-20 this year and grow its store count by 10% a year from 2022 onwards.

In the grocery world, Sprouts is a relative seedling with a market cap of about $2.6 billion. The company is guiding for $305 million to $325 million in adjusted earnings this year, and the shares currently sport a forward price-earnings multiples of just under 12.

So why is the stock so cheap? The company has struggled with same-store sales growth ever since new CEO Jack Sinclair came on board in 2019. For example, in Q2 of this year, comparable sales were down 10% from 2020 and 0.6% from 2019. The 2020 number is nothing to worry about since Sprouts was getting a temporary boost from the COVID-19 panic in late spring of last year that won't be repeated. However, the decrease from 2019 numbers is a bit concerning and is likely why investors don't have much confidence in Sprout's stock right now.

But if you dig deeper into Sinclair's plan, you'll see that the decrease in sales is almost part of the strategy. When Sinclair and the new management team showed up in 2019, they realized that Sprouts was doing unsustainable product promotions that were bringing in new customers but crushing profit margins. They made the tough decision to stop these promotions, which likely contributed to the poor sales comparisons with 2019.

However, Sprouts is now getting a higher-quality sales mix as evidenced by its operating margin of 6.4% last quarter compared to 4.9% in 2019. If Sprouts can recover its sales numbers while also accelerating new-store openings over the next few years, the business could look a lot better three to five years from now.

Lastly, investors should be happy that management is returning tons of excess cash to shareholders in the form of share repurchases. This has helped Sprouts reduce its share count over the past five years from 150 million to 114 million today. If this continues, it can help boost the company's per-share results. 

Dropbox

Once a Silicon Valley darling, Dropbox has fallen out of favor due to lackluster growth and a depressed share price after its IPO in 2018. However, by cutting costs and making some great acquisitions, Dropbox's business is in a lot better shape than it was a few years ago.

Last quarter, Dropbox's annual recurring revenue (ARR) hit $2.2 billion, up 12.2% year over year, while free cash flow reached $216 million. Management is now guiding for $710 million to $730 million in free cash flow in 2021. One way Dropbox has improved its cash flow is by cutting some of the bloat from its employee base. This past winter, the company fired 11% of its staff and revenue growth has not been affected.

Dropbox has been able to grow over the past few years thanks to two smart acquisitions. One was Hellosign, an e-signature service (similar to Docusign) that Dropbox bought in 2019. Signature requests are up 75% year over year on Hellosign, which shows how Dropbox has been able to upsell the service to existing Dropbox customers. This should help the combined companies increase their average revenue per user.

The other acquisition was for Docsend, a document analytics platform used frequently by marketers and financial firms. Dropbox made the acquisition this past spring, so it is tough to tell how much of an impact it has had, but management said on its latest conference call that Docsend has exceeded its internal goals since the acquisition.

With a market cap of $11.6 billion, Dropbox trades at a 2021 price-to-free cash flow multiple of 16 if it can hit the midpoint of its full-year guidance. This is cheap relative to many stocks on the market. And if Dropbox can continue growing ARR at a double-digit rate, the company will be well on its way to hitting its goal of $1 billion in free cash flow by 2024. All these factors make Dropbox a quality stock, trading at a bargain valuation.