1. Calculators
  2. SaaS, E-commerce & Marketing

Rule of 40 & SaaS Magic Number Calculator

Check whether a software company balances growth and profitability. Add revenue growth to the free cash flow or EBITDA margin for the Rule of 40 score and the gap to 40, then measure how efficiently sales and marketing spend turns into new revenue.

Updated Oct 16, 2026Free · no sign-upFormulas tested

Your inputs

Add the revenue growth rate to the profit margin. A combined score of 40% or more passes.

Profit measure
Revenue growth from
%
Usually trailing 12 months versus the 12 months before, or ARR growth.
%
Free cash flow ÷ revenue for the same 12 months. Negative if the company burns cash.

Results

Rule of 40 score37.0%Falls short of 40% by 3.0 points
Distance from 40%
-3.0%
Revenue growth
32.0%
FCF margin
5.0%
Margin needed at this growth
8.0%
Growth needed at this margin
35.0%

Growth adds 32.0 points and the free cash flow margin 5.0, 3.0 short of 40. Closing the gap takes a 8.0% margin at today's growth, or 35.0% growth at today's margin.

Margin needed to reach 40 at each growth rate

Margin needed for a score of 40Your free cash flow margin
-40%-20%0%20%40%60%-10%2%14%26%38%50%62%74%Your growth

Any company on or above the blue line passes. Where the dashed line crosses it is the growth your margin needs.

Rule of 40 score for growth and margin combinations

Growth \ margin-20%-10%0%10%20%30%
0% growth-20%-10%0%10%20%30%
10% growth-10%0%10%20%30%40%
20% growth0%10%20%30%40%50%
30% growth10%20%30%40%50%60%
40% growth20%30%40%50%60%70%
50% growth30%40%50%60%70%80%
60% growth40%50%60%70%80%90%

Green cells meet the rule of 40; red cells fall short.

Results are estimates from the numbers you enter. They are not financial, tax or legal advice.

How to use the Rule of 40 calculator

Rule of 40 scores growth and profitability together:

  1. Choose the profit measure: free cash flow margin or EBITDA margin. Both are common; free cash flow is the stricter one.
  2. Enter revenue growth as a percentage, or switch to two revenue figures (the latest 12 months and the 12 months before) and let the calculator work out the rate. The income statement has both.
  3. Enter the margin for the same 12 months. Use a negative number if the company loses money or burns cash.

Magic number measures sales efficiency. Enter this quarter’s and last quarter’s revenue (or ARR), the sales and marketing spend from the previous quarter and, if you want the payback estimate, the gross margin.

The formulas

Rule of 40 score = Revenue growth % + Profit margin %
Gap = 40% − ScoreGrowth is year over year. The margin is free cash flow or EBITDA divided by revenue over the same 12 months.
Magic number = (Revenuethis quarter − Revenuelast quarter) × 4 ÷ S&Mlast quarter
ARR version = (ARRend of quarter − ARRstart of quarter) ÷ S&Mlast quarter
Payback in months ≈ 12 ÷ (Magic number × Gross margin)S&M is total sales and marketing expense. The previous quarter's spend is used because deals usually close some weeks after the money is spent.

A worked example

Rule of 40. Company A grew revenue 32% last year with a free cash flow margin of 5%. Its score is 37.0%, 3.0% below 40%. It could pass by lifting the margin to 8.0% at the same growth, or by growing 35.0% at the same margin.

Magic number. Quarterly revenue rose from $2,950,000 to $3,150,000, an increase of $200,000, or $800,000 annualized. The previous quarter’s sales and marketing spend was $1,000,000, so the magic number is 0.80. At a 75% gross margin, the new revenue takes about 20.0 months to pay back the spend.

Many ways to score 40

The rule’s appeal is that it accepts very different companies:

Company profile Growth Margin Score
Mature and profitable 10% 30% 40.0%
The example 32% 5% 37.0%
Fast growth, heavy burn 70% -35% 35.0%

The mature company passes with modest growth because it converts a large share of revenue into cash. The fast grower fails despite growing seven times as fast, because it spends heavily to do so. Investors use the rule to ask whether the losses are buying enough growth, and whether the profits come at the cost of a stalled business.

Two cautions apply. The score treats one point of growth and one point of margin as equal, while many investors weigh growth more heavily. And a company can pass for the wrong reasons: cutting sales spend sharply lifts the margin this year and lowers growth next year.

Reading the magic number

The magic number shows the cost of the growth behind the Rule of 40 score. Holding the example’s revenue gain fixed:

Previous quarter S&M Magic number
$700,000 1.14
$1,000,000 0.80
$2,000,000 0.40

A reading around 0.75 or higher is often cited as efficient, and above 1.0 as a sign that more spending could pay off. Below 0.5, each dollar of sales effort buys little revenue. These cut-offs are rules of thumb that vary; a company with high gross margins and low churn can justify a lower magic number than one with thin margins.

Because revenue is net of churn and contraction, a falling magic number can mean customers are leaving, not that sales got worse. Check it against net revenue retention and the customer acquisition cost.

What this calculator does not include

  • One-time items. Services revenue, large one-off deals and restructuring costs distort both metrics. Use recurring revenue and adjusted margins when you can.
  • Timing. The magic number assumes last quarter’s spend drove this quarter’s growth. Long enterprise sales cycles stretch that lag.
  • Stock-based compensation. EBITDA and free cash flow both leave it out, which flatters the margin of companies that pay heavily in stock.

Frequently asked questions

What is the Rule of 40 for SaaS companies?
It is a rule of thumb that a software company's revenue growth rate plus its profit margin should add up to at least 40%. A company growing 32% with a 5% free cash flow margin scores 37.0%, just short. The rule lets fast-growing, loss-making companies be compared with slower, profitable ones.
Should I use EBITDA margin or free cash flow margin?
Both are common. Free cash flow margin is stricter because it counts capital spending and the cash cost of growth, while EBITDA ignores them. Pick one, say which, and use the same measure when comparing companies or tracking one company over time.
What is a good SaaS magic number?
A magic number around 0.75 or higher is often cited as efficient, below 0.5 as a sign that growth is costing too much, and above 1.0 as a signal that a company could spend more on sales and marketing. Cut-offs vary between investors, and one quarter can be distorted by seasonality or a large deal.
How do you calculate the SaaS magic number?
Take the increase in quarterly revenue, multiply it by four to annualize it, and divide by the previous quarter's sales and marketing spend. In the example, a $200,000 rise in quarterly revenue on $1,000,000 of spend gives 0.80. With ARR, divide the change in ARR by the same spend without multiplying.
Does the Rule of 40 apply to early-stage startups?
Usually not. A company with little revenue can show huge growth percentages, and its margins swing with every hire. The rule is mostly applied once revenue is large enough for both numbers to be stable.

Related calculators

All calculators →

This calculator is for education and planning. It uses the formulas described above and the inputs you provide; real results depend on fees, taxes, timing and other details that a general tool cannot know. PromtFinance does not give personal financial advice. Check important decisions with your provider or a qualified professional.