Customer Retention Rate: How to Calculate It Correctly
Most teams get customer retention rate wrong. Learn the exact formula, avoid common calculation mistakes, and track it correctly in your data warehouse.
Quick Answer
Calculate customer retention rate by subtracting new customers from ending customers, dividing by starting customers, and multiplying by 100. Alexander Jarvis's guidance on SaaS customer retention presents this formula as a way to isolate the opening cohort so acquisition cannot mask customer losses.[1] With a consistently defined cohort, a 90% retention rate corresponds to 10% customer churn for the same period.
Introduction
Customer retention management fails when the dashboard counts everyone who exists at period end instead of measuring whether the customers who started the period remained. For SaaS teams, the correct calculation is CRR = ((E - N) / S) × 100, where S is starting customers, E is ending customers, and N is genuinely new customers acquired during the period. That distinction changes forecasting, board reporting, and the diagnosis of whether product work is actually reducing attrition. A warehouse query can be syntactically correct while still producing an invalid metric if its cohort boundary is wrong.
Key Takeaways
Exclude customers acquired during the measurement period from the ending count.
Define the qualifying customer event before building the warehouse model.
Keep logo retention, churn, GRR, and NRR as separate metrics.

Customer Retention Management Starts With a Fixed Cohort
Measuring customer retention for SaaS begins by fixing the population at the start of a defined period. The population should represent customer entities, not invoices, users, workspaces, or event rows. Decide whether a customer qualifies through an active subscription, a paid invoice, or another durable commercial state, then use that same definition at both boundaries.
Use the customer retention rate formula without shortcuts
To calculate retention, subtract N, the customers acquired during the period, from E, the customers present at the end. Divide that result by S, the customers present at the start, and multiply by 100. This structure answers one question only: what share of the opening cohort remained customers. A retention rate formula example starts with 200 customers, ends with 230, and adds 50 new customers, producing 90% retention because 180 opening-cohort customers remain.
S: Count qualifying customers at the period start.
E: Count qualifying customers at the period end.
N: Count customers first acquired during the period.
CRR: Calculate ((E - N) / S) × 100.
Set cohort rules before querying the warehouse
A reliable calculation needs explicit rules for identity, dates, and qualifying status. Use a canonical account ID, define the reporting timezone, and decide whether paused, trial, delinquent, or reactivated accounts qualify. A customer that leaves and later returns requires a deliberate policy: count the account as retained only if it never crossed the defined inactive boundary, or classify it as a reactivation in a separate lifecycle field. That discipline makes mistakes in churn calculations visible before they become executive reporting errors.
Do not derive N from all accounts with activity during the period. Derive it from each account’s first qualifying customer date, then compare that date with the reporting window. Activity events can identify engagement, but they cannot substitute for a commercial cohort boundary.

How to Build Customer Retention Rate in dbt
Build retention as a reusable customer-period model rather than a dashboard calculation. The model should emit one row per customer per reporting period with the account identifier, period start, period end, first qualifying customer date, opening status, closing status, and acquisition flag. This provides an auditable base for retention, logo churn, and cohort analysis without redefining customer status in every BI tool.
Create a customer-period spine and aggregate only once
Start with a calendar spine at the grain you report, usually monthly or quarterly, and join it to a deduplicated customer dimension. Next, derive whether each customer qualifies at period start and period end from subscription or billing history. Aggregate only after those flags exist, because row-level lifecycle states are easier to test than a final ratio.
A practical dbt model can calculate start_customers, end_customers, and new_customers per period, then expose the final metric as (end_customers - new_customers) / start_customers. Add tests for unique customer-period rows, non-null customer IDs, and a zero-denominator guard. Warehouse-native definitions matter because a metric is only trustworthy when its logic is inspectable from source records through the semantic layer.
Use one customer entity across product, CRM, and billing data. Tracking engagement across product touchpoints can explain why customers stay or leave, but engagement data should enrich the retention model rather than redefine its numerator. If workspace IDs and billing account IDs differ, resolve that mapping before aggregation or one parent account can appear as several retained customers.
Validate the result with a worked example
Suppose the period opens with 200 qualifying customers. By the end, the system records 230 qualifying customers, including 50 whose first qualifying date falls inside the period. The retained opening cohort is therefore 180 customers, and the customer retention rate is 90%.
The validation question is not whether the ending count grew. It is whether the 180 retained customers can be traced back to the exact 200 accounts in the opening snapshot. Reconcile the retained cohort to account-level records and review every account that enters or exits through status changes, mergers, parent-account reassignment, or identity corrections.

Separate Customer Retention From Revenue and Churn
Customer retention rate is logo retention, not revenue retention. It counts customer entities, so a retained customer contributes equally whether its recurring spend expanded, contracted, or stayed flat. Keep it beside, not inside, net revenue retention, which measures recurring revenue remaining from the opening cohort after churn, contraction, and expansion.
CRR, churn, GRR, and NRR answer different questions
For a fixed and consistently defined customer cohort, customer churn is the complement of customer retention. A 90% retention rate means 10% of the opening customer cohort churned over that same period. That relationship breaks when teams use different customer definitions, reporting periods, or denominators for the two metrics.
Revenue metrics use recurring revenue rather than customer counts. See the SaaS retention measurement guidance for the distinction between customer and revenue retention.
This is why NRR versus GRR should not be collapsed into a logo-retention dashboard tile. GRR excludes expansion and shows revenue preserved before upsell, while NRR includes expansion. The SaaS industry also uses varying NRR definitions, which makes documented inclusion rules essential when comparing reported figures. Company filings illustrate why teams should document those inclusion rules.[2]
Use retention to prioritize operating decisions
Retention versus acquisition is an operating tradeoff, not a philosophical debate: opening-cohort losses determine how much new demand is required just to maintain the customer base. Compare retention by acquisition cohort, plan, implementation path, segment, and activation milestone, then investigate the groups with the largest loss patterns. The relevant benchmark depends on product type, industry, and price point; Retention benchmarks vary materially by product type, customer segment, contract value, and measurement period.
Customer retention strategies should follow observed failure modes, not generic playbooks. If newer cohorts retain less well, inspect onboarding and activation. If a specific plan loses accounts after contraction, inspect value delivery, support paths, and renewal workflow. For a broader measurement set, use SaaS retention metrics to connect cohort loss with lifecycle and product signals. Compare those signals with retention versus acquisition priorities when deciding whether to invest in reducing losses or generating new demand.
Conclusion
Correct customer retention rate isolates the customers who existed at the start of the reporting period and asks whether they remained. Subtract new customers from the ending count, use a stable customer definition, and preserve account-level auditability in the warehouse. Keep CRR separate from churn, GRR, and NRR because each reveals a different operational condition. TrackRaptor Blogs is a useful resource for teams building metric definitions that can survive scrutiny from data engineering, finance, and growth leadership.
Need a more rigorous metric layer? Explore TrackRaptor's analytics guidance.
Frequently Asked Questions (FAQs)
How do you track user churn in your data warehouse?
Track user churn in your data warehouse by creating a customer-period model that records qualifying status at each period boundary, then flagging opening-cohort customers who no longer qualify at the end of that same period.
What is the difference between net and gross retention?
Net retention includes expansion revenue from existing customers after accounting for churn and contraction, while gross retention excludes expansion and therefore measures only the revenue preserved from the opening cohort.
How do you perform cohort analysis for SaaS products?
Perform cohort analysis for SaaS products by grouping customers according to a shared acquisition or activation period, then measuring how many members of each fixed group remain qualified in subsequent reporting periods.
Is NPS a vanity metric for customer retention?
NPS can become a vanity metric for customer retention when it is reported without linking responses to customer-level renewal, churn, expansion, or product-usage outcomes that show whether sentiment predicts behavior.
How do you measure retention across cross-device users?
Measure retention across cross-device users by resolving authenticated identities to a canonical customer or account ID before calculating period-level qualification, rather than treating browser cookies or device identifiers as customers.
What metrics matter most for product-led growth?
Metrics that matter most for product-led growth include activation, engaged account rate, time to value, customer retention, expansion, and conversion from product usage to paid qualification, all measured with consistent entity definitions.
Sources
- Guidance on SaaS customer retention — alexanderjarvis.com ↩
- Net Revenue Retention: 10 Companies, 5 Definitions — SaaS Mag ↩

