When companies undergo a transformation, investors need to reanalyze the business to see if it's improved or gotten worse. For Shopify (SHOP 1.11%), it has clearly changed for the better after it spun off its highly unprofitable logistics business.

Now that Shopify has returned to its roots and is focusing on its software and payment processing products, its results have improved. But is it enough to make the stock a buy?

Shopify's business looks better without logistics

Shopify equips small and medium-sized businesses with the tools and resources to compete against many e-commerce giants. With tools to create a website, manage inventory, ship products, and process payments, anyone can launch an online store for just $39 per month.

At one time, Shopify also had shipping logistics in its vision for the tools it could provide. But earlier this year, it sold this division to Flexport. This spin-off had a noticeable effect on Shopify's operating expenses in just one quarter.

SHOP Total Operating Expenses (Quarterly) Chart

SHOP Total Operating Expenses (Quarterly) data by YCharts

This helped push Shopify back into the black for operating profit -- a move investors cheered by sending the stock nearly 20% higher since it reported earnings in early November.

Shopify also had another tailwind working in its favor: Growth. In the third quarter, Shopify's revenue rose 25% to $1.7 billion, with merchant solutions (the processing fees associated with selling on Shopify) accounting for $1.2 billion of the total. One thing to note is that this 25% growth rate doesn't consider the lost revenue from the logistics division. When that is accounted for, Shopify's growth was actually 30%.

This shows high execution levels from Shopify, but also displays what a relative drag on the business its logistics division was.

Now that it's gone, Shopify investors have a reason to be excited. In 2024, an average of 44 Wall Street analysts expect around 19% growth, so this success should extend into next year. But has the stock moved up too far in anticipation of Shopify's turnaround?

Shopify's valuation is quite pricey when margins are considered

Because Shopify hasn't been profitable over the past year, using a profitability metric like a price-to-earnings (P/E) ratio isn't useful. Instead, I'll use the price-to-sales (P/S) ratio to analyze Shopify's stock price with regard to its historical levels.

If you ignore the COVID-19 highs Shopify experienced, the current 14 times sales valuation is cheaper than before 2018.

SHOP PS Ratio Chart

SHOP PS Ratio data by YCharts

However, the caveat is that investors expected a lot of growth from Shopify back then, which it delivered. Now, Shopify still has growth ahead of it, but it isn't nearly at the level it once was.

As a result, many investors are hesitant to pay more for the stock than its current valuation, especially considering its gross margins.

Because Shopify isn't a pure software-as-a-service company, it doesn't have nearly the gross margins as some of its tech peers (Shopify's gross margin was 53% in Q3). This caps Shopify's maximum profitability at a lower level than that of similar-sized pure-software businesses, which often trade around 10 to 20 times sales levels.

As a result, Shopify's 14 times sales level is much more expensive than it appears at face value.

So, do I still think the stock is attractive? I'd say it depends on your risk tolerance. Shopify will undoubtedly grow over the next five years, but the real question is: Will it grow fast enough? This will determine if the stock can beat the market, as it will need to grow much faster than the market pace to justify the premium.

I think Shopify can do that, but I'm also realistic about the valuation perspective. So I have chosen to make Shopify a relatively small position in my portfolio, just in case the pricey valuation proves too much to overcome.