It has been a trying time for Amazon.com (AMZN 1.49%) investors. The stock is down 35% on the year, and is down some 43% from its all-time highs. With rising interest rates to start the year, high-growth technology stocks sold off hard. And last week, poor retail earnings reports from Walmart and Target seemed to confirm investors' worst fears over inflation's effect on retail sales. Since these are the two businesses Amazon dominates, it sold off hard.

But with the company repurchasing stock and a stock split on the horizon, is now the time to buy when others are fearful?

Current woes in the retail segment

The hints of last week's retail destruction were actually forecast by Amazon back in its April first-quarter earnings report. Total sales growth decelerated to just 7%, down from 44% a year ago, despite accelerating cloud growth. Operating income actually declined from $8.7 billion a year ago to just $3.7 billion. When stripping out operating profit from Amazon Web Services (AWS), Amazon's North American and international retail operations actually tallied a combined $3.8 billion operating loss. Keep in mind that this includes things like advertising and Prime subscriptions, which may be high-margin, so the losses in its pure retail business were likely even worse.

As was confirmed by Walmart and Target, Amazon struggled as revenue growth decelerated amid the economic reopening. Meanwhile, freight and logistics costs rose sharply due to rising fuel prices. And since Amazon had so aggressively expanded its capacity during the pandemic, it found itself with more capacity and employees than it needed as e-commerce revenue slowed.

As if this weren't bad enough, management guided to even lower overall growth next quarter, of 3% to 7%, and for operating income to get worse -- somewhere in the range of a loss of $1.0 billion to a gain of $3.0 billion.

A person in a business suit looking carefully at a tablet.

Image source: Getty Images.

But AWS is a bright spot

If investors looked under the hood a bit, they might have been a bit more enthusiastic around Amazon Web Services, the company's leading cloud computing platform. Enterprises generally save money and become more agile when they switch to the public cloud over building their own data centers, so this shift should continue even if there is an economic slowdown.

Last quarter, AWS revenue accelerated 37% from the 32% growth in the year-ago quarter, while AWS operating income grew 53% as margins expanded. The margin expansion was largely due to Amazon extending the useful life of its server hardware, but that should be a permanent change.

Over the past 12 months, AWS by itself has generated nearly $21 billion in operating income, up 43%. For 2022, AWS operating profit could be more than $25 billion, putting net profit somewhat higher than $20 billion. Amazon's market cap right now is $1.1 trillion, or about 55 times that figure.

Even with interest rates higher today, given AWS's leading position and the long-term growth prospects of the cloud, that wouldn't be a crazy price to pay for AWS alone.

And newer innovations could help customers deal with inflation

With its inventive culture, Amazon also has a lot of projects going on besides its e-commerce platform and cloud computing. New initiatives such as Just Walk Out technology, and the Project Kuiper initiative for satellite-delivered broadband, could help. Just Walk Out, which allows for a cashier-less retail experience, has the potential to materially lower costs at Amazon Fresh grocery stores and other third-party retailers that adopt the platform.

Lower costs could enable Amazon Fresh stores and other retailers to lower prices, helping with inflation and labor shortages for consumers. Ditto for Project Kuiper, which has the potential to deliver broadband to underserved communities at lower costs than traditional solutions.

Since these projects don't generate material revenue yet, they are largely overlooked by investors.

A historically low valuation

Meanwhile, Amazon stock is currently trading at a low valuation, at least relative to its history, on both enterprise value-to-EBITDA (earnings before interest, taxes, depreciation, and amortization) and price-to-sales metrics. While Amazon has traded at a lower price-to-sales ratio in the last 10 years, that was before it broke out AWS in its financial results, starting in 2015:

AMZN EV to EBITDA Chart

AMZN EV to EBITDA data by YCharts.

Another indication that Amazon may be undervalued is that management is actually repurchasing stock, which the company does only rarely. The last time it did so was in 2011-2012, during another swoon in the stock price. That wound up being a good buying opportunity for long-term investors.

It all adds up to a good-looking buy today

Amazon will split its stock on June 3, which isn't very far from now. While stock splits usually lead to increased interest from retail investors, this is anything but a normal period. Should the U.S. economy dive into a deep recession, it's possible Amazon shares could go lower.

However, barring that extreme scenario, an awful lot of bad news appears priced in today. While the near term is highly uncertain, the cloud business alone could be a good buy; meanwhile, I'd suspect the retail business will improve -- possibly as soon as Prime Day in the third quarter and the holiday shopping season.

Furthermore, new innovations like Just Walk Out and Project Kuiper give investors new potential businesses to look forward to which aren't accounted for at all in the current price. Add in share repurchases, and I suspect investors with a five- or 10-year time horizon will feel pretty good about buying Amazon shares at today's prices. If you have the capital and a long time horizon, there's no need to wait for the split.