Two of the world's biggest and most well-known companies completed stock splits this year. I'm talking about Amazon (AMZN -1.14%) and Alphabet (GOOG 0.37%) (GOOGL 0.35%). The operations lowered the price of each individual share -- making the stock more accessible to a broader range of investors.

But investors haven't piled in to these two market leaders. In fact, the stocks are heading for declines this year. Both companies have been earnings and share performance winners over the years. But is this winning streak over? And does that mean it's too late to buy Amazon and Alphabet? Let's find out.

Amazon

Amazon is heading for a 43% loss this year. Higher inflation is weighing heavily on the company's e-commerce business. In two ways. First, it increases Amazon's costs across the board -- from storing and transporting goods to keeping its warehouses operating. It also is hurting shoppers' buying power. So, they have less to spend on Amazon.

But before scratching Amazon off your buy list, it's important to look at the long-term picture. The company is a leader in two markets set to grow in the double digits this decade: e-commerce and cloud computing. E-commerce is suffering today -- but these difficult times are temporary.

As for cloud computing, Amazon Web Services (AWS) has seen customers cut back on spending. But AWS still is growing revenue and operating income in the double digits.

At the same time, Amazon is using these tough times to make itself more competitive. The company is working on its cost structure, increasing investment in AWS, and strengthening offerings of its Prime subscription service. All of this will serve it well over the long term.

Now, let's look at valuation. Amazon is trading for 1.9 times sales. That's its cheapest since 2015 by that measure. This looks like a fabulous deal if we focus on Amazon's long track record of growth and its future prospects.

Alphabet

Alphabet is set to drop 30% this year. Like Amazon, the parent company of Google also faces the challenges of today's economy. Advertising is a major part of Alphabet's business. It makes up nearly 80% of revenue.

And here, there's some good news and some bad news. Bad news first. Companies cut back on ads when times are tough. So that means in the near term, Alphabet's revenue probably will suffer. In the most recent quarter, Alphabet's total revenue growth slowed to 6%. That's down from 41% last year.

But the good news is companies increase spending in better times -- and we know that today's economic troubles won't last forever. Once things improve, Alphabet's advertising revenue should drive growth again. After all, Google's search engine holds more than 92% of the global market. That's a clear incentive for advertisers to favor the platform.

Meanwhile, Alphabet's cloud services business is gaining ground. Google Cloud revenue climbed almost 38% in the quarter. As mentioned earlier, cloud computing services is a fast-growing market. So, this offers Alphabet plenty of opportunity down the road.

Now let's take a look at valuation. Today, Alphabet trades at 20 times trailing 12-month earnings. That's close to its lowest ever. Considering Alphabet's market share and ongoing growth potential, today's share price is a steal.

And all of this means it definitely isn't too late to buy Amazon and Alphabet. It's impossible to pinpoint exactly when recovery will happen. But that's OK. What we do know is both of these companies have what it takes to deliver earnings growth down the road. And that should lead to share price performance too.