EnableYourData.com

KPI · Subscriptions and SaaS

Rule of 40: formula and example.

The Rule of 40 is a rule of thumb that adds a software company's revenue growth to its profit margin. The score is the revenue growth rate plus the EBITDA margin (or free cash flow margin), both as percentages. Investors use it to compare fast-growing and profitable companies on one scale; the rule says that sum should be 40 or more.

Rule of 40 formula

Revenue growth % + EBITDA margin %

Worked example

Acme's subscription service grows from €2,500,000 to €3,200,000 in revenue, growth of €700,000 ÷ €2,500,000 × 100% = 28%. EBITDA is €480,000, a margin of €480,000 ÷ €3,200,000 × 100% = 15%. The Rule of 40 score is 28 + 15 = 43.

Fictitious figures for Acme Groothandel, a sample wholesaler.

How to read this KPI

A higher score means a better combination of growth and profitability; a company can reach 40 through fast growth with losses, or slow growth with a high margin. Compare the score over time and always look at both components, as the same score can describe very different businesses. The threshold of 40 is a convention from the investment world, not a law, and the score says less for small or very young companies.

Pitfalls with Rule of 40

  • Calculating growth and margin over different periods, for example growth on ARR and margin over the financial year.
  • Not stating whether you use EBITDA margin or free cash flow margin, which can differ considerably.
  • Applying the score to a very small company, where a few customers already produce extreme growth rates.

SQL & DAX

Calculating Rule of 40 in SQL and DAX

Two examples on a fictitious data warehouse for Acme Groothandel: a PostgreSQL query and a measure for a Power BI model. Adjust table and column names to your own model.

SQL · PostgreSQL
WITH yearly AS (
  SELECT date_trunc('year', entry_date) AS year,
         SUM(amount) FILTER (WHERE account_group = 'revenue') AS revenue,
         SUM(amount) FILTER (WHERE account_group IN ('cogs', 'personnel', 'other_opex')) AS costs_before_da
  FROM gl_entries
  GROUP BY 1
),
metrics AS (
  SELECT year,
         100.0 * (revenue - LAG(revenue) OVER (ORDER BY year))
           / NULLIF(LAG(revenue) OVER (ORDER BY year), 0) AS growth_pct,
         100.0 * (revenue - costs_before_da) / NULLIF(revenue, 0) AS ebitda_margin_pct
  FROM yearly
)
SELECT year, ROUND(growth_pct, 1) AS growth_pct, ROUND(ebitda_margin_pct, 1) AS ebitda_margin_pct,
       ROUND(growth_pct + ebitda_margin_pct, 1) AS rule_of_40_score
FROM metrics
ORDER BY year;
DAX · Power BI
Revenue Growth % =
VAR PreviousYear = CALCULATE([Revenue], SAMEPERIODLASTYEAR('Date'[Date]))
RETURN
    DIVIDE([Revenue] - PreviousYear, PreviousYear)

Rule of 40 Score =
([Revenue Growth %] + DIVIDE([EBITDA], [Revenue])) * 100

In ENABLE

Tracking this KPI in ENABLE

Plain-language questions

Ask for Rule of 40 per month, customer or product in the SQL Explorer with AI. The AI writes the SQL, you see the query and run it yourself; the AI only receives metadata.

Read more →

In your Power BI dashboard

Define the KPI as a measure in your Power BI model and show it in the portal, with "Last refreshed" next to it. Access profiles and optional row-level security decide who sees which figures.

Read more →

Custom dashboards (pilot)

Add the KPI as a tile to a custom dashboard, compared with last year. The Dashboard Builder is a pilot and can be switched on per client.

Read more →

Monthly targets

With the built-in Targets app you set a target for the KPI per month, so you see actuals and target side by side.

Read more →

FAQ

Frequently asked questions

How do you calculate the Rule of 40?

Add the revenue growth rate to the profit margin, usually the EBITDA margin. With 25% growth and an 18% EBITDA margin, the score is 43. Use the same period for both, for example the last twelve months.

Should the Rule of 40 use EBITDA margin or free cash flow margin?

Both are used; EBITDA margin is most common, while free cash flow margin shows better how much cash is actually left. Pick one, state which and stick to it. Only compare scores that use the same margin.

Does the Rule of 40 apply to every software company?

The rule comes from investors in growing software companies of a certain size. For a young company with little revenue, growth rates quickly become extreme and the score says little. Use it to discuss the balance between growth and profit, not as a hard standard.

Use AI on your own data. Securely, and without the headache.

In an online demo we show how ENABLE makes your data securely available and how you build on it: describing an app in the AI Builder, plain-language questions, dashboards and APIs. And how we set it up and manage it for you.