Just a week after the S&P 500 hit its latest all-time high, software stocks MongoDB (MDB 1.51%), Snowflake (SNOW 3.71%), and Atlassian (TEAM 0.78%) all hit new 52-week lows on May 31. Software stocks generally have been unusually absent from the broader growth stock rally and have been weighing the tech sector down in contrast with surging semiconductor stocks like Nvidia.

Here's what's driving declines in these once-market darling growth stocks and whether they are worth buying now.

A person smiles with various numbers and characters reflected off their glasses.

Image source: Getty Images.

MongoDB has built an impressive database platform

MongoDB has made a name for itself by being a flexible open-source NoSQL database management platform. NoSQL allows developers to store data in a format other than relational tables, which means less structure.

According to MongoDB, its tool features flexible schemas, horizontal scaling, fast queries, and ease of use for developers. MongoDB gained popularity in lockstep with the rise of cloud computing -- which made data storage cheaper. Cheaper storage costs and easier access to the cloud make it more affordable to use a NoSQL program instead of a complex but more precise application.

MongoDB stock fell 23.9% on Friday in response to disappointing quarterly results. Revenue in the latest quarter is up 22% compared to the same quarter last year, but that's a far slower growth rate than investors have grown accustomed to.

MongoDB has an exciting product suite and a great story. The biggest problem is that it isn't profitable. And when a company's valuation is judged mostly on sales and not earnings, it leaves it vulnerable to a big drawdown when sales growth slows.

Another issue with MongoDB is stock-based compensation. Compensating employees with stock is a way for an unprofitable company to recruit top talent and, in theory, accelerate growth and chart a path toward profitability. But it also dilutes existing shareholders. In the last five years, MongoDB's outstanding share count is up 32.6% -- illustrating the negative impact of stock-based compensation.

MDB Revenue (TTM) Chart

MDB Revenue (TTM) data by YCharts

As you can see in the chart, MongoDB's revenue has skyrocketed over threefold in the last five years. But about $0.25 out of every $1.00 in sales goes toward stock-based compensation. Operating margins have come up but are still negative.

Investors may tolerate negative earnings and high stock-based compensation when revenue grows at a breakneck pace. But when that narrative changes, the spotlight falls on the flaws. MongoDB has potential, but the cons outweigh the pros at this time.

Snowflake's scorching-hot growth is cooling off

When it comes to sales growth, Snowflake has been in a league of its own. The cloud data platform company earned $265 million in fiscal 2020, which more than doubled to $592 million in fiscal 2021, more than doubled again to $1.22 billion in fiscal 2022, grew 69% to $2.07 billion the following fiscal year, and jumped 36% to $2.81 billion in fiscal 2024 despite an industrywide slowdown.

Growth rates are expected to come down as a company matures, since it's much harder to steer a $3 billion business than a $300 million one. Now, it's a matter of determining where Snowflake's long-term growth rate will stabilize and if it can manage expenses and become profitable.

First-quarter fiscal 2025 revenue grew at 33% compared to last year. However, expenses have increased considerably as Snowflake invests heavily in artificial intelligence (AI) and expensive Nvidia GPUs.

Snowflake's growth has been faster than MongoDB. But its operating expenses exceed its sales, so it generates about $0.39 in operating loss for every $1.00 in sales. To make matters worse, Snowflake's stock-based compensation as a percentage of revenue is 41% -- which is even worse than 27% for MongoDB.

SNOW Revenue (TTM) Chart

SNOW Revenue (TTM) data by YCharts

Snowflake is yet another example of a high-flying, unprofitable enterprise software company that has seen its growth rate slow and expenses rise. That's a bad setup for investors, even though the stock is hovering around its lowest level since going public in September 2020.

Atlassian is on track to achieve consistent profitability

Atlassian is another enterprise software company. Tools like Jira, Confluence, and Trello help teams collaborate on projects, stay organized, do work, and more. Atlassian only plans to double its revenue over the next five years -- but it's arguably a better buy than MongoDB or Snowflake, despite the lower growth rate.

Atlassian has already achieved a positive operating margin and is close to one now. However, its stock-based compensation is 25% of sales -- slightly lower than MongoDB, but still high.

TEAM Revenue (TTM) Chart

TEAM Revenue (TTM) data by YCharts

Analyst consensus estimates have Atlassian booking $2.88 in 2024 earnings per share and $3.28 in 2025. Snowflake and MongoDB are expected to book a slight profit as well. But Snowflake has a forward price-to-earnings ratio above 200, compared to over 100 for MongoDB and 55 for Atlassian. It's still a lofty valuation, but at least it's more reasonable.

Atlassian has an excellent track record of founder-led growth. But its co-founder and co-CEO Scott Farquhar is stepping down, adding a layer of uncertainty to the company's future.

Atlassian has a clear path toward becoming a moderate-to-high-growth company that can be valued on both its sales and earnings. I also think it's an acquisition candidate for a company like Salesforce, which said it was open to acquisitions on its recent earnings call.

An even better buy

Companies that are valued based on their sales are a double-edged sword. When sales growth is strong, these stocks can soar and crush the market. But when the script flips, they can fall fast.

The trick is to find a company with a clear path toward sustained sales growth, or preferably, moderate sales growth and strong profitability. Investors may be better off keeping it simple with a proven winner like Microsoft (MSFT 0.15%).

The company pays stock-based compensation but also generates a ton of free cash flow that it uses to buy back stock. All told, its share count has been going down, not up. Microsoft's operating margin is at its highest level in over a decade, and sales are up 88% in the last five years.

With a P/E ratio of 36, Microsoft has a reasonable valuation, given its industry leadership and strong fundamentals. Risk-tolerant investors may want to buy the dip in down-beaten enterprise software companies. But I think the best pick is hiding in plain sight with Microsoft.