Open source
The maths behind our free calculators is published under MIT, so you can check it, run it yourself, or build on it. A due-diligence tool that asks you to trust an unexaminable number has the problem backwards.
saas-metrics
github.com/kindrat86/saas-metrics — zero dependencies, pure functions, 27 tests, no telemetry.
npm install saas-metrics
import { retentionSummary } from 'saas-metrics';
retentionSummary({
startingMrr: 100000,
expansionMrr: 37000,
contractionMrr: 5000,
churnedMrr: 17000
});
// nrr: 115, grr: 78, expansionMaskingSpread: 37
That spread is the whole point. A business reporting 115% net revenue retention sounds excellent. The same business at 78% gross revenue retention is losing nearly a quarter of its revenue base a year and covering the hole with upsell. Most dashboards show the first number and not the second.
What it computes
| Area | Functions |
|---|---|
| Retention | Net and gross revenue retention, revenue churn, customer churn, implied lifetime, correctly compounded annualised churn |
| Concentration | Herfindahl-Hirschman Index, top-N revenue share, whale detection |
| Unit economics | Gross-margin-adjusted LTV, LTV:CAC, CAC payback, churn cost projection |
| Zombie MRR | Dormant-but-paying account detection, with CSV parsing |
| Health score | Composite 0–100 across retention, growth, concentration, efficiency, durability |
Two things it gets right that most don't
Annualised churn compounds
Multiplying monthly churn by twelve is the most common error in SaaS reporting.
5% monthly churn is 46% a year, not 60% — each month churns a base the
previous month already shrank. annualisedChurnRate(5) returns 45.96.
LTV without gross margin is not LTV
Omitting margin gives you lifetime revenue. At 75% margin that is a third
more than the real number — usually the difference between a ratio you would fund and
one you would not. grossMarginPct defaults to 100 so the omission is
explicit rather than silent.
On the scoring bands
The thresholds in the library — what counts as world-class NRR, what counts as high concentration — are scoring bands, not measured data. They are informed by published industry benchmarks from SaaS Capital, Benchmarkit, Recurly and FE International, which we cite with sources on the benchmarks page.
Segment matters enormously here: median retention for enterprise infrastructure and for SMB self-serve are not the same number and never have been. Check the underlying source for your own segment before quoting a band as though it were a survey result.
Related
- The free calculators — the same maths, interactive, no signup
- The MCP server — the same maths, callable by AI agents
- Embeddable widgets — put any calculator on your own site