Retention rate is a crucial metric for measuring customer continuity in subscription-based businesses.
This indicator represents the rate at which existing customers continue over a certain period, and is an essential element in evaluating the health and sustainability of a business.
It is a particularly important metric for management teams, customer success teams, and investors in SaaS companies and other businesses adopting subscription-based models. Since retaining existing customers, not just acquiring new ones, directly leads to business growth, retention rate is typically monitored regularly on a monthly or quarterly basis.
In subscription-based businesses, including SaaS, revenue is generated repeatedly at fixed intervals (e.g., monthly, yearly) as long as customers continue the service.
Moreover, the total business revenue is the sum of recurring monthly or annual revenue for each customer.
While revenue increases with new customers, in actual business, customers may cancel the service, resulting in a decrease in revenue. Therefore, the number of cancellations significantly impacts business growth.
Thus, in SaaS and subscription-based businesses, customer or user retention is of utmost importance. It is necessary to understand whether customers are solving their problems through the service or product, and whether they feel they are getting value for their money.
The customer success team supports this by monitoring the “retention rate”, which is the percentage of customers being retained.
The retention rate is an indicator of the percentage of customers who continue the service from the previous payment (e.g., previous month, previous year).
For example, in a subscription-based service, if there were 4 customers in February and 1 customer cancelled in March:
In this case, 3 out of 4 customers continued the service, so the retention rate for March would be 75%.
By monitoring the trend of retention rate, you can understand how well you are retaining customers monthly or annually. When the retention rate deteriorates, you can assume that there is some problem with the customer experience and work on improvements.
Furthermore, by visualizing retention rates by segment (e.g., plan, customer segment), you can identify problematic segments and work on improvements when found.
# Step 1: Calculate the number of payments for each customer
mutate_group(
# Group by customer ID
group_cols = c(`customer_id` = "customer_id"),
group_funs = c("none"),
# Sort by payment date
sort_cols = c("payment_date"),
sort_funs = c("none"),
# Rank by payment date (calculate number of payments)
`payment_count` = dplyr::dense_rank(payment_date)
) %>%
# Step 2: Change payment date to monthly unit
# When calculating monthly churn rate or retention rate, truncate the date to "month"
# When calculating annual churn rate or retention rate, truncate the date to "year"
mutate(`payment_date` = floor_date(`payment_date`, unit = "month")) %>%
# Step 3: Aggregate monthly (per month) customer count and continuing customer count
# Since we've already truncated the date to "month", we're aggregating monthly customer and continuing customer counts
# If the date was truncated to "year", we would be aggregating annual customer and continuing customer counts
group_by(`payment_date`) %>%
summarize(
`customer_count` = n_distinct(`customer_id`), # Unique customer count for that month
`continuing_customer_count` = count_unique_if(customer_id, payment_count >= 2)) # Number of customers with 2 or more payments (continuing customers)
) %>% ungroup() %>%
# Step 4: Calculate retention rate
mutate(`retention_rate` = continuing_customer_count / lag(customer_count)) %>%
ungroup() %>%
# Step 5: Calculate cancellation rate
mutate(`cancellation_rate` = 1 - retention_rate, .after = ifelse("retention_rate" %in% names(.), "retention_rate", last_col()))