Contents
What is the rule of 40? How do you calculate the rule of 40? How to calculate the rule of 40 (example) What are the rule of 40 benchmarks in 2026? Why does the rule of 40 matter for finance leaders? How AI spend is changing the rule of 40 What should finance leaders track beyond the rule of 40? How CloudZero helps finance teams track the inputs to the rule of 40 FAQs about the rule of 40

Quick Answer

The rule of 40 states that a healthy software company's revenue growth rate plus profit margin should equal or exceed 40%. A company growing at 25% with a 20% EBITDA margin scores 45% and passes. A company growing at 15% with a 10% margin scores 25% and does not. The formula is simple: Revenue Growth Rate + Profit Margin ≥ 40%. In 2026, AI infrastructure spend is compressing margins across the SaaS industry, making the rule of 40 harder to hit and more important to track than ever.

The rule of 40 was designed for a world where the biggest expense on a SaaS P&L was sales and marketing. That world is ending. 

AI infrastructure is now the fastest-growing line item on the cloud invoice for most software companies, and it does not show up cleanly in the margin calculation. A company investing heavily in AI capabilities may see its EBITDA margin drop by 10-15 points while building the revenue engine that will drive growth for the next five years. The rule of 40 score goes down. The business decision may still be correct.

For finance leaders, the question is no longer just “do we pass the rule of 40?” It is “does our AI spend produce enough growth to justify the margin compression?” That is an AI ROI question, and it requires visibility into spend at a level that most SaaS finance teams do not have today.

What is the rule of 40?

The rule of 40 is a benchmark used to evaluate the financial health of software companies. It states that a company’s combined revenue growth rate and profit margin should equal or exceed 40%.

The concept was popularized by venture capitalist Brad Feld in 2015, who learned it from a late-stage investor evaluating a healthcare software company.

The logic is straightforward. With the rule of 40 explained simply: a SaaS company can prioritize growth or profitability, but the sum should stay above 40%. If you are growing at 40%, you can afford 0% margins. If growth is flat, you need 40% margins. If you are growing at 20%, you need 20% margins. Any combination that adds to 40% or above signals a healthy business.

What is the rule of 40 in SaaS specifically? It applies to SaaS companies because their recurring revenue model and high gross margins (70-90%) make the framework meaningful. For companies with 30% gross margins, the rule of 40 does not work the same way because there is less room to trade between growth and profitability. The rule of 40 SaaS application is the standard. Applying it elsewhere takes more nuance.

The rule of 40 meaning for a finance leader: it is a single number that tells you if the growth-profitability trade-off is working. A pass/fail test with exactly one question on it. If your growth plus margin exceeds 40%, you pass. If not, you have a conversation with your board that nobody enjoys.

The rule of 40 definition is the same across finance, venture capital, and public markets. You will hear it called the saas rule of 40, the finance rule of 40, or just “the rule.” Same calculation everywhere. And the answer to “what is rule of 40 in finance” is straightforward: the fastest way to assess if a software company is balancing growth and profitability at a sustainable ratio. For the “why” behind the score, you need cost attribution at the product and customer level, which is where unit economics become essential.

The definition is simple. The calculation is also simple. The hard part is getting the inputs right.

How do you calculate the rule of 40?

The rule of 40 formula combines two inputs:

Revenue Growth Rate + Profit Margin ≥ 40%

Where: Revenue Growth Rate = (Current ARR – Prior ARR) / Prior ARR × 100

Profit Margin = EBITDA / Revenue × 100

Rule of 40 = revenue growth rate + profit margin ≥ 40%
Rule of 40 score 40.0%
30.0% growth rate + 10.0% profit margin
Meets the Rule of 40

Most companies use annual recurring revenue (ARR) or monthly recurring revenue (MRR) annualized. Either works as long as you are consistent.

Profit Margin = EBITDA / Revenue × 100

EBITDA (earnings before interest, taxes, depreciation, and amortization) is the standard profitability metric for the rule of 40 calculation. Some companies substitute free cash flow (FCF) margin, which produces different results because it captures capital expenditure. For AI-heavy companies, FCF margin often looks worse than EBITDA margin because GPU infrastructure carries heavy capex.

The rule of 40 score is the sum: Growth Rate + Profit Margin.

Above 40 is healthy. Below 40 signals that the growth-profitability balance needs attention. 

Below 20 signals that the growth-profitability balance has left the building.

That is the theory. Here is what it looks like with real numbers.

How to calculate the rule of 40 (example)

Here is a rule of 40 calculation using 2025-2026 numbers.

A SaaS company generated $50 million in ARR in 2025 and $62 million in 2026.

Revenue growth rate: ($62M – $50M) / $50M = 24%.

The company’s 2026 EBITDA was $12.4 million.

EBITDA margin: $12.4M / $62M = 20%.

Rule of 40 score: 24% + 20% = 44%. The company passes.

Now add AI spend to the picture. Suppose the company invested $8 million in AI infrastructure in 2026 (model training, inference hosting, GPU compute). That $8M reduced EBITDA to $4.4M, compressing the margin to 7.1%.

Revised rule of 40 score: 24% + 7.1% = 31.1%. The company fails.

But wait. If that $8M in AI spend generated $15M in attributable revenue through AI-powered features that drove new customer acquisition, then the AI investment had a roughly 1.9x return. The rule of 40 score dropped, but the investment decision was sound. This is why the rule of 40 alone is insufficient for 2026 finance decisions. You need AI ROI data alongside it. 

(For more on how cloud spend drives COGS in SaaS businesses, see our dedicated guide.)

That math plays out differently for every company.

What are the rule of 40 benchmarks in 2026?

The median rule of 40 score across publicly traded SaaS companies has been below 40% for most of 2025-2026 as AI investment compresses margins.

Here are current scores for notable rule of 40 companies, sourced from public filings.

CompanyRevenue growthNon-GAAP op. marginRule of 40 scorePassesPeriod
CrowdStrike22%22%~44PassFY2026 (Jan 2026)
ServiceNow21%31%~52PassFY2025 (Dec 2025)
Doximity13%55%~68PassFY2026 (Mar 2026)
Datadog28%25%~53PassFY2025 (Dec 2025)
Monday.com27%14%~41PassFY2025 (Dec 2025)
Klaviyo32%14%~46PassFY2025 (Dec 2025)
HubSpot19%19%~38FailFY2025 (Dec 2025)
Confluent21%7%~28FailFY2025 (Dec 2025)
Asana9%7%~16FailFY2026 (Jan 2026)

Rule of 40 scores for selected public SaaS companies, based on most recent full fiscal year results. Revenue growth = year-over-year. Margin = non-GAAP operating margin. Scores and pass/fail status sourced from company earnings releases and SEC filings

According to BCG’s 2025 Rule of 40 analysis, the top quartile of software companies consistently exceeds the rule of 40, and companies that maintain scores above 40% for three or more consecutive years trade at notably higher valuation multiples.

Bain’s research found similar patterns: Rule of 40 performance correlates strongly with total shareholder return.

The pattern for 2026: companies investing heavily in AI (larger R&D budgets, GPU infrastructure, model training) are seeing margin compression. Their rule of 40 scores are dropping. The question for finance leaders is not “is the score dropping?” but “is the AI spend that is causing the drop producing measurable returns?” If you cannot answer that, the next board meeting will be longer than you planned.

Why does the rule of 40 matter for finance leaders?

The rule of 40 is not an engineering metric or a product metric. It is a finance metric. Specifically, it answers a question that investors, board members, and CFOs ask constantly: is this company growing efficiently?

  • For CFOs and controllers: The rule of 40 is the fastest way to assess if the P&L is balanced. Growth without margin burns cash. Margin without growth signals a stalling business. The rule of 40 flags both problems with a single number.
  • For VPs of finance: The rule of 40 informs budget allocation. If your score is above 40%, you have room to invest in growth (including AI). If below, you need to find margin improvements before increasing spend. For cloud and AI spend specifically, CloudZero’s cost-per-customer analysis shows which customers are profitable and which are compressing your margins.
  • For board reporting: The rule of 40 is a standard slide in every SaaS board deck. Showing the score alongside a decomposition (what is growth contributing vs. what is margin contributing) and how AI investment is affecting each input gives the board a more complete picture than the score alone.

The rule of 40 business application extends beyond SaaS. Private equity firms use it to evaluate software portfolio companies. Public market analysts use it to compare SaaS companies. The rule of 40 stocks that consistently score above the threshold typically command 2-3x higher revenue multiples than those below.

All of which made the rule of 40 a reliable compass for a decade. Then AI arrived and redrew the map.

How AI spend is changing the rule of 40

Every rule of 40 company in the public SaaS market is grappling with the same tension: AI infrastructure spend compresses EBITDA margins. Training a foundation model costs $10,000-$100,000 per run. Running inference at scale adds $5,000-$50,000/month depending on model and traffic. These costs did not exist on most SaaS P&Ls two years ago. They do now, and they are growing faster than any other line item.

The result: a company that scored 45% on the rule of 40 in 2024 might score 30% in 2026 despite growing faster. The growth accelerated. The margins compressed more. The rule of 40 math punishes AI investment in the short term, even when that investment is sound.

This creates a dangerous dynamic for finance teams. The rule of 40 says “cut costs.” The AI strategy says “invest more.” Both are right in their own frame. The way out is to measure AI ROI at the granular level: which AI features produce revenue? Which produce cost savings? Which produce neither?

As PolicyCircle noted in their analysis “The Rule of 40 is dead as AI redefines SaaS valuation,” the metric needs supplemental data to remain useful in the AI era. The rule of 40 is not dead. 

But it is incomplete without AI spend attribution.

As Brad Feld wrote when he first introduced the concept: “I find it a helpful heuristic, but it’s only one of many metrics that should be used to evaluate a software company.” In the AI era, that caveat has become the headline. The rule of 40 is a signal, not a verdict. It needs context that most P&L statements do not provide on their own.

The context it needs is AI spend attribution: which features, which customers, which business outcomes does the AI infrastructure serve? That is the layer between “our margin dropped” and “our margin dropped because we invested in AI features that grew enterprise revenue by 40%.” Companies tracking AI spend at that level of granularity can defend a sub-40 score to their board. Companies that cannot are guessing. For a broader view of cloud cost optimization strategies, see our dedicated guide.

What should finance leaders track beyond the rule of 40?

The rule of 40 tells you the score. It does not tell you the inputs at a level granular enough to make decisions. For finance leaders managing AI-era SaaS businesses, add these metrics:

  • AI spend as a percentage of revenue. Track this quarterly. If AI spend grows faster than revenue for three consecutive quarters, the ROI conversation needs to happen immediately.
  • Cost per customer (including AI inference costs). A customer whose AI-powered features consume $200/month in inference but generates $50/month in revenue is margin-negative on those features. You need that data by customer segment, not in aggregate. See CloudZero’s cost-per-customer analysis.
  • Margin per product line (with full cloud and AI allocation). The rule of 40 measures the whole company. Product-level margin analysis shows which products are driving the score up and which are dragging it down. CloudZero’s unit economics provide this decomposition.
  • Rule of 40 by cohort. New customers vs. existing customers often have very different economics. If your AI features are driving new customer acquisition but the cohort is margin-negative, the rule of 40 masks the problem until it is too late. This is also why cloud cost management tools that allocate spend to customer segments matter more in the AI era than they did when infrastructure spend was predictable.

These metrics are the inputs you can influence. The rule of 40 is just the scoreboard. And nobody ever won a game by staring at the scoreboard.

How CloudZero helps finance teams track the inputs to the rule of 40

The rule of 40 is an output. Revenue growth and profit margin are the inputs. And the fastest-moving input in 2026 is cloud and AI spend.

CloudZero gives finance teams the cost attribution needed to decompose the rule of 40 into actionable decisions. When EBITDA margin drops by 5 points quarter over quarter, CloudZero shows that 3 points came from increased AI inference spend on the enterprise product tier (which grew ARR by 40%) and 2 points came from a staging environment nobody shut down. 

The first is a strategic investment. The second is waste. The rule of 40 does not distinguish between them. Granular cost attribution does. That is the difference between a score you report and a score you understand.

Anomaly detection catches the waste in real time: a GPU training run that ran twice, an auto-scaling event that never scaled back, a model endpoint serving zero requests. These are margin points you can recover without cutting a single productive dollar of AI spend.

The rule of 40 gives you one number. CloudZero gives you every number underneath it: which products, features, and customers are driving margin up or down, and what your AI spend is producing in measurable business value Take a product tour, get a free cloud cost assessment, or to experience the power of CloudZero.

FAQs about the rule of 40