Canadian multinational e-commerce platform operator Shopify (SHOP -0.90%) recently put added focus on cutting costs and improving its bottom line and last quarter, the company turned a surprise profit. While that's great news, the danger is in assuming that the company may have turned the tide, that the worst is over, and that profitability will now be the norm.

Here's a closer look at the Q1 performance of this proprietary platform for online stores and retail point-of-sale systems and why the positive net income figure it reported may be a little misleading.

Shopify's operating loss was actually worse year over year

In its latest quarter, Shopify's operating loss totaled $193 million -- nearly twice the size of the $98 million loss it reported in the same period last year. While the company's quarterly revenue of $1.5 billion did rise by 25% year over year, the company's operating expenses also rose at a rate of 24%, keeping pace with sales growth.

Shopify posted a profit last quarter because of nonoperating items, including a gain on equity and other investments, which totaled $215 million. A year ago, the company incurred a loss of nearly $1.6 billion for this line item. Combined, that's a positive swing of nearly $1.8 billion when you compare this quarter to the prior-year period.

Metric Q1 2022 Q1 2023 Change from prior year
Revenue $1.2 billion $1.51 billion $304 million
Cost of sales -$566 million -$791 million -$225 million
Sales and marketing -$303 million -$287 million $16 million
R&D -$304 million -$458 million -$154 million
General and admin -$109 million -$123 million -$14 million
Gain/loss on Investments -$1.56 billion $215 million $1.77 billion
Other income/expenses -$20 million $12 million $32 million
Income tax expense/benefit $179 million -$8 million -$187 million
Net income -$1.47 billion $68 million $1.54 billion

Data source: Company filings. Chart by author.

The problem with gains and losses on investments is that they can be volatile and inconsistent. For investors, that means that while investment gains had a positive impact on net income in this quarter, next quarter it could have the reverse effect and potentially turn an operating profit into a net loss.

Investors are better off stopping at the operating income (loss) line item, as that comes before all the noise related to nonoperating items, which can sometimes skew a company's bottom line. Operating profit or loss can give a better picture of how a business is doing after all a company's relevant revenue and expenses are accounted for.

Why Shopify needs to cut costs

A quick look at the following chart can help demonstrate why operating income/loss can be a more useful indicator of how a business is doing than net income:

SHOP Operating Income (Quarterly) Chart

SHOP Operating Income (Quarterly) data by YCharts

While net income has been volatile for Shopify, operating income has been on a steadier trajectory, and also a more concerning one -- it has been trending downward. As a result, Shopify has been laying off staff in an effort to improve its bottom line. This month it announced it would be cutting 20% of its staff in a second round of layoffs. It is also selling its logistics division.

If the company can continue growing its sales while also bringing down its expenses, it should be able to get to a much stronger financial position, which will make it a more tenable investment.

Is Shopify's stock a buy?

Shopify's recent earnings numbers weren't as encouraging as they may have seemed at first glance. As the last chart showed, Shopify's earnings numbers haven't always been consistent due to its investment gains and losses. But if its latest round of cuts can get the company to report an operating profit, that should put the business in much better shape. If you're willing to wait for the company's financials to improve, Shopify could be a great growth stock to buy right now.