Cloud-database provider MongoDB (MDB 7.54%) reported solid fourth-quarter results on Wednesday. Revenue soared 36% year over year, driven by 50% growth in Atlas, the company's managed cloud-database product. Adjusted net income and free cash flow greatly improved as well -- the results of that impressive revenue growth.

But MongoDB, like nearly every other enterprise-software company, is feeling some pain from an uncertain economic environment. Consumption trends for Atlas have been below the company's expectations as customers pull back on how quickly they're ramping up usage and resources. MongoDB isn't having trouble winning new customers and workloads, but with customers facing lower demand for their own products and services, there's less of a need to scale up.

Keeping costs in check

MongoDB's guidance was not nearly as impressive as its results. The company expects a significant sequential decline in revenue in fiscal 2024's Q1, which kicked off on Feb. 1. While MongoDB delivered $361.3 million of revenue in fiscal 2023's Q4, guidance calls for Q1 revenue between $344 million and $348 million. A small benefit in Q4 related to revenue recognition around customer commitments muddles the comparison a bit, but this guidance represents a clear slowdown.

Revenue will still be up about 21% year over year in Q1, but that growth rate is set to slow throughout the fiscal year. MongoDB expects to generate full-year revenue between $1.48 billion and $1.51 billion, representing growth of just 16%.

In reaction to this slowdown, MongoDB is pulling back hard on expanding its headcount. The company grew its headcount by around 30% in fiscal 2023. In fiscal 2024, MongoDB expects to expand its workforce by a single-digit percentage. The focus for sales teams will be new workload acquisition, with the hope that this will lead to a stronger long-term recovery in revenue growth.

Unlike many other large tech companies, MongoDB isn't resorting to layoffs. That could be a sign that the company was more measured in its headcount expansion during the pandemic, avoiding the trap of overestimating future demand and overhiring as a result. Things can change, but the fact that MongoDB will still increase its headcount this year is an indication, in my view, of an effective management team.

The long-term story is still intact

MongoDB's document-based database product isn't the right fit for every workload, but the long-term opportunity is still enormous. The database market is expected to grow to $121 billion by 2025, and it's still dominated by legacy providers like Oracle. Cloud computing has enabled an explosion of competition, and MongoDB is aiming to be the de facto choice for customers looking for a modern database solution.

While MongoDB's long-term growth potential is huge, the stock is certainly not cheap. With a market capitalization of around $14.5 billion, the stock trades for roughly 10 times revenue guidance. MongoDB is profitable on an adjusted basis, although those adjusted profits are set to tumble this year as growth slows. On a generally accepted accounting principles (GAAP) basis, the company is still a long way from producing a profit. MongoDB booked a GAAP net loss of $345 million in fiscal 2023.

At the right price, MongoDB stock would certainly be appealing. But investors need to weigh the long-term growth prospects with a pricey valuation, particularly in a market that has punished profitless tech stocks over the past year.