It's the dog days of summer for e-commerce company Shopify (SHOP 0.95%). The stock is down 77% year to date in light of historically high inflation levels and a reopening global economy, which has brought consumers back into brick-and-mortar stores. But macroeconomic conditions aren't the only thing negatively affecting the e-commerce stock at the moment.

In its most recent quarter, the company posted a big net loss, quite the no-no during times of economic uncertainty. So, what exactly is going on with Shopify's bottom line? And will the e-commerce software business bounce back in the coming years? Let's take a closer look at its current situation to come up with an answer. 

Person sitting outside holding credit card and cellphone.

Image source: Getty Images.

Shopify is facing a series of headwinds

In the second quarter, Shopify's total revenue increased 15.7% year over year to $1.30 billion. That seems fine at first glance, but it doesn't even compare to the 56.7% uptick the company reported in the same quarter last year. Meanwhile, it suffered a net loss of $1.20 billion, a much different outcome from its $879.1 million of net income in the year-ago quarter. In the first half of 2022, the e-commerce company generated a total net loss of $2.68 billion. Ouch.

So, why is Shopify's bottom line in the red these days? The company's operating expenses rose 76% year over year to $845.9 million in the second quarter. And while that contributed to the company's $190.2 million operating loss in the period, its $1.20 billion net loss could primarily be attributed to its equity holdings in Affirm Holdings and Global-E Online.

In the second quarter, Shopify's unrealized loss on its various investments totaled $1.0 billion, making up the bulk of the of red ink on its bottom line. Both Affirm and Global-E Online have witnessed their share prices collapse 78% and 48% year to date, respectively, as part of the ongoing market correction.

That said, the company is indeed investing a whole lot of money into its platform in its push to help merchants expand their growth and reach. And management has stated it will invest roughly $1 billion into the Shopify Fulfillment Network throughout 2023 and 2024. While that and similar initiatives could pay dividends down the road, they're extremely capital-intensive and will continue to exert pressure on profitability for the foreseeable future.

Will Shopify get back on track?

Shopify has confronted a very unfortunate situation. Record-high inflation and a softening e-commerce environment are putting pressure on its top line, while its ramping up spending in new offerings and services. Don't get me wrong -- these investments could pay off long term. As just one example, two-day delivery for consumers buying from Shopify-powered businesses could add plenty of value to the e-commerce platform in the long run, but its worsening profitability is not a great look amid the current macro environment.

Big picture in mind: Shopify is still advantageously positioned for success. In the latest quarter, e-commerce sales only represented 14.5% of total retail sales in the United States. Online sales are forecast to expand 50% over the next four years, eclipsing $7.4 trillion by 2025, according to Statista. With a market share of 31%, Shopify is the biggest e-commerce software platform in the U.S.

Investors have every right to be concerned about the company's recent trajectory, but it's also important to keep the long run in mind. With nearly $7 billion in cash and marketable securities on its balance sheet and a debt-to-equity ratio of only 14%, the company has the financial stability to weather any economic storm and pursue its ambitious vision.

Is Shopify stock a buy?

Even after shedding 77% of its value year to date, the e-commerce stock is still trading at just over eight times sales. That's an expensive valuation in and of itself, but it's also a premium to competitors like BigCommerce and Wix.com, which sport price-to-sales multiples of 4.5 and 3.2, respectively. Thus, the company has more room to fall before it officially qualifies as cheap.

If you already own the stock, I suggest holding onto it. Shopify has a bright future ahead of it despite these recent pitfalls. But if you're looking to start a position, I'd stay on the sidelines for now. There are better opportunities out there in e-commerce right now.