Coderhouse goes global

🌍

Read more

What Is Net Revenue Retention (NRR)? How Analysts Calculate NRR and GRR

AI Engineering

Build and ship real applications with LLMs, agents and automation.

8 weeks · Live online · View course →

Data Analytics

Go from zero to job-ready analyst with SQL, Python and BI tools.

10 weeks · Live online · View course →

Dan Patiño

AI Strategy & Innovation at Coderhouse

Data

What Is Net Revenue Retention (NRR)? How Analysts Calculate NRR and GRR

What Is Net Revenue Retention (NRR)? How Analysts Calculate NRR and GRR

Net revenue retention (NRR) measures how much recurring revenue a company keeps from its existing customers over a period, after counting expansions, downgrades and cancellations. It answers a simple question: if you stopped acquiring new customers today, would revenue from the customers you already have grow or shrink? An NRR above 100% means existing customers are spending more over time; below 100% means the base is shrinking.

NRR is one of the metrics subscription and SaaS businesses watch most closely, and it is a frequent request for data analysts working with finance, customer success and leadership teams. Knowing how to define it, calculate it in SQL and explain what drives it is a practical, high-value analytics skill.

The NRR formula

The standard formula, as explained in resources like Stripe's guide to NRR and Zuora's glossary, is:

NRR = (Starting MRR + Expansion MRR − Contraction MRR − Churned MRR) / Starting MRR × 100

  • Starting MRR: monthly recurring revenue from the customer cohort at the beginning of the period.

  • Expansion MRR: extra revenue from those same customers through upgrades, more seats or add-ons.

  • Contraction MRR: revenue lost from downgrades or fewer seats.

  • Churned MRR: revenue lost from customers who cancelled.

New customers acquired during the period are excluded. That is the key point: NRR isolates the health of the existing base.

A simple example

Imagine a company starts the year with customers paying a combined $100,000 in MRR. Over the next twelve months, those same customers:

  • Expand by $25,000 through upgrades and extra seats.

  • Downgrade by $5,000.

  • Cancel accounts worth $10,000.

NRR = (100,000 + 25,000 − 5,000 − 10,000) / 100,000 = 110%. Even though some customers left, the base as a whole is generating 10% more revenue than a year earlier.

NRR vs GRR

Gross revenue retention (GRR) uses the same starting point but ignores expansion:

GRR = (Starting MRR − Contraction MRR − Churned MRR) / Starting MRR × 100

In the example above, GRR would be 85%. GRR can never exceed 100%, so it shows how well the company holds on to revenue, while NRR shows whether expansion makes up for losses. Analysts usually report both, because a high NRR can hide a churn problem if a few large accounts are expanding fast.

How analysts calculate NRR in SQL

The hard part is not the formula; it is defining the cohort and classifying revenue changes correctly. A typical approach with a table of monthly revenue per customer looks like this:

  1. Select customers with recurring revenue in the starting month and sum their MRR.

  2. Join the same customers' MRR in the ending month (zero if they cancelled).

  3. Classify each customer's change as expansion, contraction or churn.

  4. Aggregate and divide by starting MRR.

In SQL, that often means a CTE for the starting cohort, a left join to the ending period and a CASE expression that labels each change. Grouping by signup month, plan or segment turns a single number into a cohort analysis that shows where retention is strong or weak.

Decisions that change the number

  • Period: monthly NRR is noisy; trailing twelve-month NRR is more common for reporting.

  • Revenue definition: decide whether usage-based charges, one-time fees and discounts count as recurring revenue.

  • Customer unit: account, workspace or parent company. Mergers and multi-entity customers can distort results.

  • Reactivations: a customer who churns and returns can be treated as expansion or as new revenue; pick one rule and document it.

  • Currency: for international customers, use constant exchange rates so FX swings do not look like expansion or contraction.

Write these decisions down. Finance, sales and customer success often calculate NRR slightly differently, and a clear metric definition prevents conflicting numbers in the same meeting.

What drives NRR up or down

Once the metric is reliable, the analyst's job is to explain it. Useful cuts include:

  • By segment: enterprise customers often expand more than small ones.

  • By plan or product: which offerings lead to upgrades and which to downgrades.

  • By adoption: product usage in the first months is often a leading indicator of expansion or churn.

  • By acquisition channel: some channels bring customers who stay and grow.

Pair NRR with churn analysis to find accounts at risk and with customer lifetime value to estimate what each segment is worth over time.

Common mistakes

  • Including revenue from new customers in the numerator.

  • Mixing annual and monthly contracts without normalizing to MRR.

  • Reporting only a company-wide average that hides very different segments.

  • Comparing NRR across companies that use different definitions.

FAQ

What is a good NRR?

It depends on business model and customer size. Above 100% means the existing base grows on its own. Instead of chasing a universal benchmark, track your trend and compare segments.

Can NRR be used outside SaaS?

Yes. Any business with recurring revenue, such as subscriptions, memberships or retainers, can apply the same logic.

Is NRR the same as customer retention rate?

No. Customer retention counts how many customers stay; NRR measures how much revenue they generate. You can lose customers and still have NRR above 100%.

Keep learning with Coderhouse

Retention metrics like NRR combine SQL, business context and clear communication. The Data Analytics Course runs for 11 weeks with one live class per week plus hands-on practice and projects, about 6 to 8 hours weekly, covering SQL, Python, experimentation and AI. Explore the paths that fit your goals:

Dan Patiño

I'm Dan Patiño, head of AI Strategy & Innovation at Coderhouse. My day-to-day work involves merging the tactical management of e-commerce (CRO, Email Marketing and SEO) with the development of disruptive solutions. I specialize in building internal AI-powered apps to automate tasks and boost innovation within the team. I firmly believe that technology is strategy's best ally. To dive deeper into my professional journey, I'll be waiting for you on my LinkedIn profile.