---
title: "How to Calculate Net Revenue Retention (NRR) from Stripe"
description: "Calculate net revenue retention (NRR) and gross revenue retention (GRR) from Stripe subscriptions, including expansion, contraction, and churned MRR."
canonical: https://datalighthouse.dev/guides/calculate-net-revenue-retention-from-stripe
last-updated: 2026-11-19
---

# How to Calculate Net Revenue Retention (NRR) from Stripe
Calculate net revenue retention (NRR) and gross revenue retention (GRR) from Stripe subscriptions, including expansion, contraction, and churned MRR.
### 1. Write down NRR and GRR before you touch Stripe

Net revenue retention divides the ending MRR of the customers who were in the starting book by their starting MRR. That ending figure is starting MRR minus churned MRR minus contraction MRR plus expansion MRR. Gross revenue retention uses the same numerator without expansion, so it cannot rise above 100 percent. Leave new MRR and reactivation MRR out of both rates. A rate is undefined when starting MRR is zero.

### 2. Normalize each subscription item to one month

Stripe does not return an MRR field. Monthly amount is unit_amount times quantity, divided by the currency minor-unit factor, then adjusted for recurring.interval and interval_count. A year divides by 12 times interval_count. A week multiplies by 52/12. A day multiplies by 365/12. Metered and tiered prices are skipped. Forever coupons apply. A duration of once does not change MRR. Repeating coupons apply while end is null or still in the future. Keep each currency in its own book.

### 3. Split starting, expansion, contraction, and churned MRR

A customer in the book at period start and gone at period end contributes their starting MRR as churned MRR. A customer in both snapshots whose MRR fell contributes the decrease as contraction. The increase for a starting customer is expansion, including a second subscription for that same customer. Someone absent at the start is new MRR, or reactivation MRR when an earlier subscription already had ended_at at or before the window. Those two lines are reported beside NRR and are not inside it.

### 4. List subscriptions and events with auto-pagination

Call subscriptions.list once per status with limit 100 and follow autoPagingToArray. Request active, trialing, past_due, paused, unpaid, and canceled. The default list omits canceled subscriptions. Expand data.discounts.source.coupon. Item coupons need a second subscriptionItems.list because expand stops at four levels. Then call events.list for the subscription event types with limit 100 and auto-pagination. Stripe lists events going back up to 30 days. An updated event can include previous_attributes.items. cancel_at_period_end stays in the book until ended_at.

### 5. Query monthly snapshots when the window is older than the Events API

A live subscription list has the latest items, not the price on the first of an older month. Store a snapshot of normalized MRR per customer per currency at each boundary, then left join the ending snapshot onto the starting customers. Missing ending rows are churned MRR, not rows to drop. Summing paid invoices produces cash, including a whole annual prepayment, and is not NRR. Cohort NRR repeats the left join for the customers who first had positive MRR in a given month.

### 6. Say whether the rate is one period or one cohort

Period NRR is every qualifying customer at the start of the window, measured again at the end. Cohort NRR is the customers who first produced positive MRR in one month, measured again in a later month. Stripe Billing analytics assigns cohorts that way and says cohort revenue retention can exceed 100 percent because upgrades are included. The two rates use different customer sets, so they are not interchangeable. The Events API cannot rebuild a twelve-month cohort.

## FAQ
### How do you calculate net revenue retention (NRR) from Stripe?

Stripe does not return an NRR field. List subscriptions, including canceled ones, and subscription events. Normalize each qualifying subscription to one month. NRR is the ending MRR of the customers who had MRR at the start, divided by that starting MRR. Ending MRR here means starting MRR minus churned MRR minus contraction MRR plus expansion MRR. New customers and reactivations stay outside the rate.

### What is gross revenue retention (GRR) from Stripe?

GRR uses the same starting customers and the same churned and contraction MRR as NRR, and it leaves expansion out. The formula is (starting MRR − churned MRR − contraction MRR) / starting MRR. Because expansion is excluded, GRR cannot rise above 100% when ending MRR is zero or positive. NRR equals GRR plus expansion MRR divided by starting MRR. Gross MRR churn is 1 minus GRR when both use this starting book.

### What is the difference between expansion MRR and new MRR?

Expansion is an increase from a customer who was already in the starting book: a higher price, more quantity, or a second subscription for that customer. New MRR is a customer who was absent at the start. Reactivation MRR is a customer who was absent at the start and had an earlier subscription that had already ended. Putting new or reactivation MRR into the numerator measures something closer to MRR growth than retention.

### Do refunds, prorations, trials, and annual prices change Stripe NRR?

A refund changes cash on a charge. It does not change the subscription price, so this calculation does not read Refund objects. A proration is an invoice adjustment for part of a period. The run-rate is the subscription item after the change, not the proration line. A subscription still inside trial_end is outside the default book, so a trial that converts during the month is new MRR, not expansion. A yearly price is divided by 12 before it enters MRR. Canceling a $120 yearly plan removes $10 of MRR. cancel_at_period_end stays in the book until ended_at.

### Why is cohort NRR different from NRR for a single month?

Period NRR takes everyone with qualifying MRR at the start of that window. Cohort NRR takes the customers who first had positive MRR in one acquisition month and follows only those customers. Stripe Billing analytics assigns cohorts by the month a subscriber first generated positive MRR, and it says that cohort's revenue retention can exceed 100% because upgrades are included. A strong old cohort and a weak latest month can both be true. The Events API goes back up to 30 days, so a 12-month cohort needs stored snapshots or a Dashboard export.

### What does good net revenue retention look like?

NRR above 100% means the starting customers, as a group, were worth more at the end of the window than at the start. Expansion covered churn and contraction. NRR of 100% means those losses and expansion offset. NRR below 100% means the starting book shrank. GRR at 100% means the starting book had no churn and no contraction. None of those descriptions is a target for every company. A product with no seats to add often cannot print NRR above 100% even when logos stay. A rate above 100% can still hide lost logos if a few upgrades are large. Compare a rate only with the same formula, window, currency, and status rules.

### Can I calculate NRR from Stripe without hosting this code?

Export the subscriptions CSV at the start of the period and again at the end. The Stripe MRR CSV calculator at https://datalighthouse.dev/tools/stripe-mrr-csv-calculator normalizes one file in the browser and does not upload it. It returns MRR per currency, not NRR. Compare the two files by customer id with the formulas on this page. Data Lighthouse is a self-hosted Next.js template. The overview does not compute NRR or GRR. The license is $59 once. The buyer page is https://datalighthouse.dev/saas-metrics-dashboard-template and the sample dashboard is https://datalighthouse.dev/demo. The demo uses sample data and does not call Stripe.


## Sources
- [Stripe API: list subscriptions](https://docs.stripe.com/api/subscriptions/list)
- [Stripe API: Subscription object](https://docs.stripe.com/api/subscriptions/object)
- [Stripe API: list subscription items](https://docs.stripe.com/api/subscription_items/list)
- [Stripe API: Price object](https://docs.stripe.com/api/prices/object)
- [Stripe API: Coupon object](https://docs.stripe.com/api/coupons/object)
- [Stripe API: list events](https://docs.stripe.com/api/events/list)
- [Stripe API: pagination](https://docs.stripe.com/api/pagination)
- [Stripe: Billing analytics](https://docs.stripe.com/billing/subscriptions/analytics)
- [Stripe: cancel subscriptions](https://docs.stripe.com/billing/subscriptions/cancel)
- [Stripe: prorations](https://docs.stripe.com/billing/subscriptions/prorations)
- [Stripe: zero-decimal currencies](https://docs.stripe.com/currencies#zero-decimal)
