After years of rapid expansion, the jury is now out on Shopify (SHOP 1.26%) stock. The e-commerce software giant is making a push into new areas to advance digital commerce for small businesses and entrepreneurs, but that's costing a lot of money -- not to mention diluting existing shareholders with stock-based compensation. Amidst the mess, Wall Street has punished this former market darling. Shares are down more than 80% from all-time highs reached in late 2021. 

But how profitable is Shopify exactly? And is there an effective way to track its progress in delivering returns to investors? Yes, there is. Let's dig in.

Free cash flow is back on shaky ground

The last I wrote about Shopify following the second-quarter report, I discussed what accounted for the company's massive $2.68 billion net loss (using GAAP, or generally accepted accounting principles) through the first half of 2022. In a nutshell, the problem is the company's investments in Affirm Holdings and Global-E Online, which have both taken a hit and reversed their massive gains from 2021. 

But that only tells part of the story, since declines in the stock market are listed as a non-cash expense. GAAP net income or net loss doesn't really tell the true profitability of Shopify's actual operations. That's where free cash flow comes in. Free cash flow is income from operations less capital expenditures (cash spent on property and equipment).

Over the last 12 months, Shopify has generated $58.8 million in free cash flow. This includes negative $206.2 million in free cash flow during the first half of 2022. It isn't a $2.68 billion net loss, but negative $206 million isn't great either.

This is a more recent trend for Shopify, as it started to reach some respectable free-cash-flow margins in 2020 and 2021 as e-commerce activity boomed early in the pandemic. But all of a sudden, that trend has dramatically reversed course. For a company that has hauled in $5 billion in revenue over the last 12 months, why is it now operating in the red on a free-cash-flow basis? 

The gears of innovation are grinding forward

With many effects of the pandemic winding down this year (namely people doing most of their shopping online versus in person), Shopify was at a crossroads. It could have sat back and enjoyed the small empire it had built and started focusing on profitability. Or it could follow the playbook Amazon established over the 2000s and 2010s: Spend free cash flow, at times nearly all of it, to promote more expansion. Shopify has chosen option two. 

Sales and marketing expenses are up 62% through the first half of this year, and research and development is up 81%. With revenue growth slowing to just a 19% pace, this big advance in operating expenses is weighing down profitability. Shopify justifies this spending, because it sees lots of opportunity to deepen its relationship with merchants with new services. It's also gearing up for a big push into logistics and order fulfillment with the buildout of Shopify Fulfillment Network (which will ramp up next year) and the acquisition of Deliverr.

Included in these expenses is lots of stock-based compensation paid to employees, which dilutes ownership of existing shareholders. Stock-based compensation has totaled $257 million so far in 2022, or about 0.7% of the company's current market capitalization.

With free cash flow headed toward negative territory for full-year 2022, how can shareholders track growth progress while also factoring in stock-based compensation? Use revenue per share. Even when accounting for all that stock issued to employees over the years, Shopify's returns using this metric have been impressive. And up until this year, free cash flow per share growth was impressive too.

SHOP Revenue Per Share (TTM) Chart

Data by YCharts.

Of course, none of this will matter if the company doesn't eventually start turning a profit again. For the next couple of years, heavy spending to promote new services and the construction of its order fulfillment business will likely keep a lid on free cash flow. With investors punishing loss-generating businesses right now, Shopify stock may have difficulty gaining positive traction. But if the company can reignite its revenue growth, there's still lots of value to be unlocked here over the long term. Patience will be needed, though.