The S&P 500 (SNPINDEX: ^GSPC) is about 12 percentage points below its all-time high, but history suggests the index will eventually close the gap and soar to greater heights during the next bull market.

Buying opportunities abound ahead of that inevitable stock market rally. Indeed, Wall Street sees substantial upside where Etsy (ETSY 0.34%) and Paycom Software (PAYC 1.24%) are concerned. Etsy has a median 12-month price target of $105 per share, implying 62% upside from its current price. And Paycom has a median 12-month price target of $393.05 per share, implying 51% upside from its current price.

Investors should never put too much faith in price targets, but these growth stocks are worth a closer look, given the broadly bullish sentiment on Wall Street.

1. Etsy

Etsy operates a family of online marketplaces that includes Reverb for musical instruments and Depop for fashion resale, as well as the namesake Etsy marketplace. The company occupies a somewhat unique niche in the e-commerce industry. Geared toward non-commoditized goods, Etsy offers a shopping experience that no other retailer can replicate. And its focus on artisanal, vintage, and handcrafted products is clearly resonating with consumers.

While Etsy lacks the mass appeal of Amazon, its namesake platform has still become the sixth-most-popular online marketplace in the world as measured by monthly visitors. That scale creates a powerful network effect. Each buyer makes the platform more valuable to sellers by increasing the collective purchasing power, and each seller makes the marketplace more valuable to buyers by increasing the available inventory.

Etsy reported better-than-expected results in the second quarter, though challenging macroeconomic conditions continued to weigh on growth. Revenue rose 7% to $629 million despite a slight decline in gross merchandise sales, but generally accepted accounting principles (GAAP) net income fell 12% to $0.45 per diluted share as the company continued to spend heavily on product development. Management also provided weak guidance for the current quarter, but patient investors still have reason to be optimistic.

Etsy hopes to boost buyer frequency by improving search and discovery, and the company is using artificial intelligence (AI) in unique ways to accomplish that objective. Beyond personalizing product recommendations, Etsy is training its AI models to recognize and prioritize product listings that humans will perceive as high-quality.

CEO Josh Silverman says the initial results are encouraging, and he believes Etsy's AI-focused product roadmap "can unlock an enormous amount of growth in the years to come." Analysts at Morgan Stanley recently expressed a similar sentiment, calling Etsy "one of the biggest potential beneficiaries within e-commerce from recent AI advancements."

With that in mind, shares currently trade at 3.2 times sales, the cheapest valuation in more than five years, and a significant discount to the five-year average of 10.1 times sales. That creates a good opportunity to buy Etsy stock, provided investors hold it for at least three to five years. There is no guarantee Etsy will deliver 62% returns anytime soon.

2. Paycom Software

Paycom specializes in human capital management (HCM) software, a vertical that brings together tools for payroll and human resources. Its platform addresses everything from recruiting, training, and scheduling to compliance reporting and benefits administration, enabling businesses to manage the entire employee life cycle from a single system.

That streamlined approach gives Paycom an edge because many organizations still rely on multiple-point solutions to meet their HCM needs, which typically creates extra work for IT teams. But Paycom has also distinguished itself through product innovation. It debuted the first self-service payroll software in 2021. That product, which automates payroll by requiring employees to review and approve their paychecks before processing, landed Paycom on Fast Company's list of the world's most innovative companies in 2022.

Paycom reported solid financial results in the second quarter. Revenue increased 27% to $401 million, and non-GAAP (adjusted) net income jumped 29% to $1.62 per diluted share. And investors have good cause to think that momentum will continue. Paycom recently expanded beyond the U.S. market (where it holds about 5% market share) with its launch of Global HCM, a product that makes its software available in more than 180 countries.

On the topic, CEO Chad Richison had this to say: "With our new expanded market opportunity, we now estimate our market share is well below 5%." That bodes well for shareholders because Paycom has grown much faster than the broader HCM industry in recent years, meaning it has already demonstrated its ability to take market share. Its broad product portfolio and capacity for innovation could keep those market share gains coming in the future.

With that in mind, Paycom stock currently trades at 9.7 times sales, its cheapest valuation in more than five years and an absolute bargain compared to the five-year average of 19.5 times sales. Investors should jump on that opportunity, provided they plan to hold the stock for the long term.