The share price of tech giant Amazon (AMZN -1.65%) is down more than 30% this year, which is far worse than the S&P 500's 13% decline. A key reason behind its underwhelming performance is that last month Amazon posted its first quarterly loss since 2015.

What investors should remember is that a single quarterly performance is only a snapshot of how a business did over the course of one three-month period. And the reality of Amazon's business is that a quarterly loss was bound to happen sooner or later. Here's why investors shouldn't be too surprised about a loss, and why it doesn't necessarily mean the business is broken or that it has become a bad investment.

People discussing a sales report.

Image source: Getty Images.

Amazon's margins don't leave much room for error

The online retailer has reported an annual profit of more than $10 billion for four straight years. And even though last year its net income was an impressive $33.4 billion, that was only 7% of overall revenue. In prior years, Amazon's profit margin has been even lower. Before the pandemic, it was netting about 4% of revenue as profit. In order to offer low prices, Amazon's gross margins aren't high, and that means that net income is generally going to be pretty slim with respect to sales.

Chart showing Amazon's gross profit margin rebounding slightly and profit margin dropping sharply in 2022.

AMZN Gross Profit Margin (Quarterly) data by YCharts

The company's low margins mean that there isn't much room for error, or for Amazon to be able to absorb a sharp increase in expenses. Even a slowdown in the top line can be problematic for the business. Amazon has built up its capabilities due to the pandemic, but lagging sales numbers this past quarter squeezed its margins. Net sales of $116.4 billion for the first three months of the year rose by 7.3% year over year, while operating expenses were up by 13.2%. 

However, Amazon still had enough to generate an operating profit of $3.7 billion for the period. What sank the company into the red was an $8.6 billion charge related to other expenses -- largely due to a $7.6 billion loss on the company's equity investment in automaker Rivian Automotive. As of the end of the quarter, Amazon noted it had an 18% ownership interest in the business. With shares of Rivian down more than 70% in 2022, that has had an adverse effect on Amazon's investment.

Why investors shouldn't panic

Headlines of Amazon's first loss in years likely sent many investors to push the panic button on the business. CEO Andy Jassy noted in the release of the latest quarterly numbers that "the pandemic and subsequent war in Ukraine have brought unusual growth and challenges." The business has shifted focus from ramping up capacity to meet demand and is now looking at improving efficiencies.

Amazon will likely find ways to improve its margins -- and even if that doesn't happen, as long as it doesn't incur a significant investment loss next quarter, that should be enough to put its net income back into the black.

Should you buy Amazon stock?

Currently, shares of Amazon trade at 55 times their earnings. That isn't cheap, given that the S&P 500 is at a multiple of less than 23. But Amazon has normally traded at a premium given its size and leadership in the online e-commerce world. The question for investors today is whether it's still worth it, given that its revenue has only increased by a modest 7%. For the second quarter, sales are only going to reach between $116 billion and $121 billion in revenue, implying growth of between 3% and 7%.

Admittedly, that isn't much to get excited about or to warrant a high premium. But as the company noted, it's facing headwinds right now, including the war in Ukraine, inflation, and rising interest rates. There are even worries of a possible recession this year. For those reasons, it wouldn't be surprising if Amazon's stock continues to fall further in 2022. However, over the long term, it's likely to recover as it improves its efficiency and beefs up its margins a bit. And that's why for long-term investors, the tech company is still a solid growth investment despite its recent quarterly loss.