Is MongoDB Proving That Software Still Matters in the Age of AI?
For much of the last year, the market acted as if software companies were at risk of being displaced by AI. Valuations compressed, and sentiment turned negative. But the reaction to MongoDB's MDB Q2 2026 earnings was a clear example of how quickly sentiment can shift when a company delivers a strong surprise. After a period of pressure, with the stock trading well below its 52-week high of $370 and weighed down by the narrative of slowing growth, MongoDB posted results for the second quarter in a row that were nothing short of a complete beat.
In this article, I will dissect MongoDB's latest earnings, examine how its business model is evolving, and analyze the company's financials, valuation, and risks to determine where the stock stands today.
What does MongoDB do?
In my previous article, I explained that MongoDB's core business model is built around a simple idea of providing NoSQL database technology, using a flexible, JSON-like document model instead of rigid relational tables. In simpler terms, this lets developers deal with messy and constantly changing data structures without the pain of costly schema migrations.
MongoDB's value proposition centers on giving developers a unified data platform that can handle a wide range of use cases on one system. Over the years, the company has expanded its capabilities beyond core storage into search, analytics, and processing features. For example, MongoDB has integrated full-text search and vector search (for AI/ML use cases involving embeddings) natively into Atlas, so customers don't have to bolt on separate search engines or specialized vector databases.
Source: MongoDB
The flagship product is MongoDB Atlas, a fully managed, consumption-based service that runs across Amazon AMZN AWS, Google
GOOG
GOOGL Cloud, and Microsoft
MSFT Azure. Atlas underpins what the company calls its Run Anywhere strategy. That flexibility matters, especially to large enterprises that want the freedom to run workloads on-prem, in the cloud, or in a hybrid setup. In practice, it means a customer can move from on-prem to the cloud, switch between providers, or even migrate back again if needed, without rewriting everything from scratch.
MongoDB also offers its Enterprise Advanced (EA) product, a self-managed version for on-premise or private cloud deployments, which represents the company's legacy business and is subject to different growth dynamics. This dual model, including a free, open-source Community Edition, has enabled wide-scale bottom-up adoption while monetizing a fraction of that base through subscription licenses for advanced features and support.
What sets MongoDB apart today is how these features come together in one place. Rather than attaching to separate systems for search, vector data, or stream processing, developers can use a single platform with a unified data model. That matters. A company building an AI-powered customer service app, for example, can store customer records, embed product data into vectors for semantic search, and stream interactions into real-time analytics, all without stitching together three different databases. This reduces complexity, lowers costs, and speeds up development cycles. For enterprises, it also creates higher switching costs, since once workloads are consolidated on MongoDB, migrating away becomes both expensive and disruptive.
The opportunity in front of MongoDB
This quarter was a strong indication that software is not dead after the rise of AI. Management not only delivered a beat and raise but also explained how MongoDB can win and work alongside AI.
The primary concern leading into the quarter was the health of Atlas's consumption growth, in my opinion. The re-acceleration of this metric might be the single most important takeaway from the report, as it directly addresses the market's biggest fear. Atlas performance accelerated to 29% year-over-year (YoY) growth, up from 26% in the previous quarter.
This acceleration reflects the success of MongoDB's go-to-market strategy. The shift toward larger enterprise customers, which management refers to as the "move upmarket," is paying off by attracting "higher quality workloads" that are more durable and grow for longer. As CEO Dev Ittycheria explained,
The market also created the narrative that AI would replace software of this kind. Yet results from the past two quarters (with the company adding over 5,000 customers year-to-date, the highest ever in the first half of the year) show the opposite. AI is becoming a catalyst rather than a threat. As Ittycheria emphasized:
The company is not just acquiring small customers, though. Over 70% of the Fortune 500, as well as seven of the 10 largest banks, fourteen of the largest 15 health care companies, and nine of the 10 largest manufacturers globally are MongoDB customers.
I believe the developments in Atlas usage are a positive sign that the macro headwinds that caused some consumption slowdowns last year have faded. Customers are also committing to MongoDB, with about half of the non-Atlas outperformance coming from multi-year deals. This shows customers are committing to MongoDB for the long term.
Moreover, MongoDB is seeing a surge of new client activity related to AI. AI startups often start with whatever database is familiar (frequently PostgreSQL), but as their needs become more complex at scale, they turn to MongoDB.
This dynamic is becoming a real winner for MongoDB. As AI companies and AI projects within larger companies move from prototype to production, MongoDB often wins the database workload due to its flexibility and scalability with JSON data.
MongoDB is also moving from theory to practice, winning contracts. In the enterprise segment, a leading electric vehicle company chose Atlas and [Vector] Search to power its autonomous driving platform. After testing Vector Search against Postgres PGVector for their in-vehicle voice assistant, they selected MongoDB for superior performance at scale and stronger ROI. They now rely on Atlas to handle over 1,000,000,000 vectors and expect 10 times growth in data usage by next year. This is a workload Postgres simply could not handle.
While Atlas has been in the spotlight, growth is not coming only from the enterprise segment. MongoDB's self-serve channel has also improved, driven by a data-driven approach to experimentation and a focus on SQL developers.
These initiatives are helping MongoDB broaden adoption and feed its pipeline of future large accounts.
Financials
In Q2 FY2026, MongoDB's revenue reached $591 million, up 24% from a year ago. This growth was driven by the factors discussed (stronger Atlas consumption, new customer additions, and several large deals). Subscription revenue (which represents nearly all of the total) was $572.4 million, up 23% YoY, while services revenue (consulting, training) was $19.0 million, up 33% YoY.
Source: Gurufocus
This re-acceleration reflects broad-based strength, particularly from larger U.S. customers. The company's underlying fundamentals remain robust, with a net ARR expansion rate of approximately 119%, which is consistent with recent quarters. This shows that once customers are on the platform, they are expanding their spending at a healthy rate. The company also added 2,800 net new customers in the quarter, bringing the total to over 59,900. The number of high-value customers with at least $100,000 in annual recurring revenue (ARR) grew 17% YoY to 2,564.
The revenue mix tilting further toward Atlas did cause a slight gross margin compression, since Atlas carries higher cloud infrastructure costs than on-prem software. Still, on a non-GAAP basis, gross margin was 74% (down 1 point YoY), but gross profit dollars grew 20%.
While MongoDB is still unprofitable on a GAAP basis, it has improved its operating leverage. GAAP operating loss narrowed to $65.3 million, and GAAP net income was a loss of $47 million. MongoDB is profitable on a non-GAAP basis when excluding the stock-based compensation (SBC) expenses. SBC was approximately $140 million in Q2, up from $122 million last year, and represented roughly 24% of revenue. This remains the primary reason MongoDB still posts GAAP losses despite strong underlying profitability. In other words, while non-GAAP earnings per share were $1.00, SBC alone represented about $1.78 per share, creating heavy shareholder dilution. Weighted-average diluted shares outstanding rose to 81.1 million in Q2 from 73.5 million a year ago, a 10% increase.
To offset some of this dilution, the company initiated a $1 billion share repurchase program earlier this year. In Q2, it repurchased approximately $200 million worth of stock, or about 930,000 shares. This was the first time MongoDB bought back its own shares. The move helps limit dilution to some extent, but also signals that management views the stock as undervalued relative to its long-term potential.
Looking at the balance sheet, it's in great shape. It has $2.3 billion in cash and short-term investments and no debt. Operating cash flow was $72.1 million, compared to a $1.4 million outflow a year ago. After minimal capex ($0.5 million) and lease payments, free cash flow (FCF) was $69.9 million, versus -$4.0 million in the prior-year quarter. This marks four consecutive quarters of positive free cash flow,
Finally, I think more than the strong quarter itself, guidance was fundamental. The stock's 30% jump reflected not only the strong Q2 results but also what lies ahead. MongoDB raised its fiscal 2026 guidance for the second quarter in a row. While revenue guidance was lifted by about 4%, non-GAAP operating income and net income guidance increased by nearly 50%.
Source: Author
Valuation
MongoDB's stock is no longer cheap after its sharp post-earnings rally, which saw shares climb more than 40% in just three days. At $314.60 per share, the company's market cap is roughly $26 billion. But even after this move, the stock still deserves a closer look.
Source: Gurufocus
As mentioned before, MongoDB is not profitable on a GAAP basis, so earnings multiples are not useful. Instead, I focus on the other multiples. The company currently trades at a forward price-to-sales (P/S) ratio of approximately 10.2x. On an absolute basis, this is expensive. However, it is below MongoDB's historical average of 14.7x since its IPO. While MongoDB is no longer growing at the pace that once justified the upper end of that range, the recent re-acceleration in Atlas usage and the focus toward profitability could support a multiple closer to the historical mean. If the market applies a multiple closer to that 14x, MongoDB's stock would trade around $425, representing roughly 35% upside.
Source: Author
Comparisons with peers put the valuation in perspective. Snowflake (SNOW), another software company that also posted recent strong results, saw its stock jump nearly 20%. Snowflake trades at a forward P/S ratio of 15.6x. Datadog (DDOG) trades at 13.1x. Both are at higher multiples than MongoDB, justified by their faster top-line expansion and stronger free cash flow margins. Even so, this gap highlights that MongoDB's multiple is not excessive compared to other category leaders.
Another way to assess the opportunity is through a discounted cash flow (DCF) analysis using both a multiple-based and a perpetuity growth approach. After updating my model, I estimate a fair value of around $314 per share. This indicates that, after the post-earnings rally, MongoDB is fairly valued. Still, I see potential upside if the stock benefits from multiple expansion.
Source: Author
With this in mind, institutional activity also points to growing interest. In the last quarter, Jefferies Group (Trades, Portfolio) and Lee Ainslie (Trades, Portfolio) sold out of their positions. However, four others increased their stakes, including Steven Cohen (Trades, Portfolio) and Paul Tudor Jones (Trades, Portfolio). Another four gurus, including Renaissance Technologies (Trades, Portfolio) and ValueAct Capital (Trades, Portfolio), initiated new positions. This tilt toward buying suggests that the smart money sees MongoDB's recent execution as the beginning of a new phase rather than a peak.
Risks
MongoDB faces several risks that investors need to keep in mind.
The first is consumption risk. Atlas, which now accounts for three-quarters of revenue, is usage-based. This means customer optimization, seasonal slowdowns, or macro-driven pullbacks could directly hit revenue. Startups are an important slice of Atlas users, and these customers can be volatile if funding tightens. Even large enterprises may scale back usage if budgets come under pressure. That said, and as mentioned above, current trends show the opposite. With a net ARR expansion rate of about 119%, customers are still expanding their usage.
Stock-based compensation and dilution are another concern. SBC consumed roughly a quarter of revenue last quarter, which is the main reason the company remains unprofitable on a GAAP basis. Dilution has also been significant, with the share count up about 10% YoY. Management has responded with a $1 billion buyback program and repurchased $200 million of stock in Q2. Still, at some point, investors will demand stronger performance and faster growth to justify such a high level of SBC.
Finally, technology and execution risks can't be ignored. MongoDB's reputation depends on reliability, scalability, and security. A significant breach, outage, or product failure could damage trust among enterprise customers.
Taken together, these risks do not undermine my investment case, but they highlight why execution must remain flawless.
My Final Take
MongoDB's Q2 2026 earnings were close to flawless. The re-acceleration of Atlas growth and record customer adds, driven by higher-quality enterprise workloads, directly counter the bearish view that cloud consumption was slowing. At the same time, management not only beat estimates but also raised guidance for the second quarter in a row, showing confidence in both growth and profitability.
Although my DCF analysis suggests the stock is fairly valued after its sharp rally, when combining momentum and improving fundamentals, it could leave room for further upside, in my opinion.
The bigger picture is that MongoDB is proving the market wrong on two fronts. Software is not being replaced by AI, and in fact, AI is a tailwind to MongoDB.