How to calculate net revenue retention (NRR)
Max Musing
Max MusingFounder and CEO of Basedash
· August 16, 2026

Max Musing
Max MusingFounder and CEO of Basedash
· August 16, 2026

Net revenue retention (NRR) measures how much recurring revenue you keep and grow from the customers you already had at the start of a period, ignoring any new customers you signed during it. The formula is NRR = (Starting MRR + Expansion - Contraction - Churn) / Starting MRR, expressed as a percentage. An NRR above 100% means your existing base grew on its own, before you closed a single new deal. Below 100% means the base is shrinking, so new sales first have to cover that loss before total revenue can even hold flat.
This guide shows how to compute NRR directly from your billing or subscription data. It covers the formula, a worked numeric example, how to calculate NRR and gross revenue retention (GRR) in SQL off a monthly MRR table, whether to measure it monthly or annually, benchmarks, and the mistakes that make the number wrong.
NRR answers one question: if you had stopped acquiring customers at the start of the period, what would have happened to the recurring revenue from the customers you already had? It rolls four movements into a single percentage:
Revenue from brand-new customers is always excluded. New logos are counted in new-business metrics, not retention. NRR is a health check on the base you already own, and investors weight it heavily because it isolates whether the product delivers compounding value or leaks it.
A closely related metric, gross revenue retention (GRR), uses the same cohort but ignores expansion. It caps each customer at their starting revenue, so it can never exceed 100%. GRR tells you how much you keep before any upsell, and NRR tells you what happens once expansion is added.
| Net revenue retention (NRR) | Gross revenue retention (GRR) | |
|---|---|---|
| Includes expansion | Yes | No |
| Can exceed 100% | Yes | No (capped at 100%) |
| Best read as | Compounding of the existing base | Leakage floor before upsell |
| Typical use | Growth efficiency, investor reporting | Churn severity, product stickiness |
NRR is also called net dollar retention (NDR) or net MRR retention. The terms are interchangeable, so pick one and use it consistently.
Take a cohort of customers generating $100,000 in MRR on January 1. Over the period:
Apply the formula:
NRR = (100,000 + 18,000 - 5,000 - 12,000) / 100,000
= 101,000 / 100,000
= 101%
GRR for the same cohort strips out the $18,000 of expansion:
GRR = (100,000 - 5,000 - 12,000) / 100,000
= 83,000 / 100,000
= 83%
Look at the gap between 101% NRR and 83% GRR. This business is holding total revenue flat, but only because a handful of expanding accounts are offsetting real churn, which is why you read the two numbers together. A strong NRR built on a weak GRR floor is fragile, because it depends on the expanding accounts staying.
The cleanest way to compute retention is off a table with one row per customer per month holding their MRR, something like mrr_by_customer(customer_id, month, mrr). Most billing systems or a modeled table in your warehouse can produce this. With it, you never have to classify expansion and churn by hand. If you take the starting cohort and sum their MRR at the end of the period, that end number already nets expansion, contraction, and churn, because churned customers have zero end MRR.
For annual NRR measured from January 2025 to January 2026:
with start_mrr as (
select customer_id, mrr as start_mrr
from mrr_by_customer
where month = date '2025-01-01'
and mrr > 0
),
end_mrr as (
select customer_id, mrr as end_mrr
from mrr_by_customer
where month = date '2026-01-01'
)
select
round(100.0 * sum(coalesce(e.end_mrr, 0)) / sum(s.start_mrr), 1) as nrr_pct
from start_mrr s
left join end_mrr e on e.customer_id = s.customer_id;
The left join from the starting cohort enforces the rule that new customers are excluded: anyone who was not paying on the start date never enters the calculation.
To turn that single number into something you can act on, break the same cohort into its expansion, contraction, and churn buckets. This is the revenue waterfall behind the NRR figure:
with start_mrr as (
select customer_id, mrr as start_mrr
from mrr_by_customer
where month = date '2025-01-01' and mrr > 0
),
end_mrr as (
select customer_id, mrr as end_mrr
from mrr_by_customer
where month = date '2026-01-01'
),
change as (
select s.start_mrr, coalesce(e.end_mrr, 0) as end_mrr
from start_mrr s
left join end_mrr e on e.customer_id = s.customer_id
)
select
sum(start_mrr) as starting_mrr,
sum(case when end_mrr > start_mrr then end_mrr - start_mrr else 0 end) as expansion,
sum(case when end_mrr < start_mrr and end_mrr > 0 then start_mrr - end_mrr else 0 end) as contraction,
sum(case when end_mrr = 0 then start_mrr else 0 end) as churned,
round(100.0 * sum(end_mrr) / sum(start_mrr), 1) as nrr_pct,
round(100.0 * sum(least(end_mrr, start_mrr)) / sum(start_mrr), 1) as grr_pct
from change;
The least(end_mrr, start_mrr) term handles GRR: it caps every customer at their starting revenue so expansion cannot count, as gross retention requires. One query now returns the starting base, the three movement buckets, NRR, and GRR together.
Both are valid, and they answer different questions.
A common compromise is a trailing twelve-month NRR calculated every month, which gives you a smooth annual figure that still updates monthly. If you report a monthly number internally and an annual number externally, label each clearly so readers don’t compare a 101% annual figure against a 99.2% monthly one and panic.
Benchmarks only mean something within your segment, because retention correlates strongly with average contract value (ACV): a $20 per month product and a $250,000 per year product retain very differently. According to SaaS Capital’s 2025 retention research, the median NRR across private B2B SaaS companies was about 101%, with median GRR around 91%, and both climb as ACV rises. SaaS Capital also frames GRR as table stakes: to have a shot at parity with peers, gross retention generally needs to clear roughly 90%.
For a directional target, Bessemer Venture Partners’ widely cited framing in its State of the Cloud 2023 report puts 100% NRR at “good,” 110% at “better,” and 120% or higher at “best,” though that scale was calibrated for growth-stage enterprise SaaS. At SMB price points, holding 100% is strong. In enterprise, top performers push well past 120%. Treat any single median as a starting point and benchmark against companies at your ACV.
Most incorrect NRR numbers come from a handful of avoidable errors. Check for these before you trust the figure:
left join from the start cohort above prevents this.A single NRR number is a checkpoint. Decisions come from the trend and its components, so a useful retention view shows:
The view is only useful if it stays live instead of being rebuilt in a spreadsheet every month. Because the calculation runs entirely in SQL against your subscription data, you can point a tool like Basedash directly at your billing database or warehouse, save the waterfall query, and let it refresh on its own. That also lets a non-technical teammate open the NRR chart, filter to a segment, and ask a follow-up question without waiting on the analyst who wrote the query. If you are building a broader view, this metric fits into a SaaS revenue dashboard alongside MRR and churn, and it belongs in most board reporting packs. For the segment view, pairing NRR with cohort analysis shows which signup cohorts expand and which decay.
It depends on your segment. Median private B2B SaaS NRR sits around 101%, but that blends very different businesses. As a directional scale, 100% is good, 110% is better, and 120% or higher is best, though those targets were framed for enterprise SaaS. At SMB price points, holding 100% is strong, while top enterprise performers exceed 120%. Benchmark against companies at your average contract value, not the blended median.
Both track the same starting cohort of customers, but gross revenue retention ignores expansion and caps each customer at their starting revenue, so it can never exceed 100%. Net revenue retention includes expansion, so it can go above 100%. GRR shows your leakage floor before any upsell, and NRR shows what happens after expansion. Read them together, because strong NRR can mask weak GRR.
No. NRR measures only the customers who existed at the start of the period. Revenue from customers acquired during the period is counted in new-business metrics, not retention. Including new logos inflates the number and defeats the purpose, which is to isolate how the existing base behaves on its own.
Yes. Net revenue retention (NRR), net dollar retention (NDR), and net MRR retention refer to the same calculation. Different companies and reports use different names, but the formula is identical: starting recurring revenue plus expansion minus contraction and churn, divided by starting recurring revenue.
Use annual NRR for board and investor reporting, since it smooths out contract timing and matches most published benchmarks. Use monthly NRR internally to catch sudden changes early, accepting that it is noisier. A trailing twelve-month calculation updated each month gives you a smooth annual figure that still moves monthly.
Written by

Founder and CEO of Basedash
Max Musing is the founder and CEO of Basedash, an AI-native business intelligence platform designed to help teams explore analytics and build dashboards without writing SQL. His work focuses on applying large language models to structured data systems, improving query reliability, and building governed analytics workflows for production environments.
Basedash lets you build charts, dashboards, and reports in seconds using all your data.