Subscribe to receive blog updates

Search form



Oct 22, 2015

How to calculate customer churn rate using Stripe data

Churn is one of the most important SaaS metrics. Churn indicates if you have a good product/market fit, how fast you can reach the growth ceiling and lots of other valuable information. This is probably the first metric you should start to follow. What if you haven’t collected data before?

Luckily, you can calculate this metric whenever you want, even if you haven’t calculated it before. It’s pretty easy to dig up the numbers from your Stripe account. Stripe's API has all the data ready for you so that you can calculate not only the current churn rate but also churn rate for previous periods.

Before we start, let's establish the overall churn rate formula we are going to use (since there are a lot of ways to calculate churn).
Churn rate is the opposite of the retention rate. So to get the churn rate, you just need to subtract the retention rate from 100.

Churn Rate = 100 — Retention Rate
To calculate retention rate, for September for example, you need to find customers who paid you in August, then find those of them who also paid in September. It is important to include only customers who had the ability to churn. This means that you shouldn’t include customers who start paying in September, because such customers can’t churn yet.

By dividing two numbers you’ll get the retention rate a.k.a. the share of customers who stayed with you.

Retention Rate = Customers who also paid in September /
Customers who paid in August

How to calculate churn using Stripe data?

Stripe API allows to get invoice data. Each month (each 30 days) for monthly plans, Stripe issues the invoice for each customer. You can calculate how many invoices have been issued for a given month and for which customers. If no invoices have been issued for the customer, we can assume that she/he has churned.


  1. Monthly subscriptions. The above approach works only for monthly plans. If you have annual plans you can then calculate annual churn rate.
  2. Proration and trials. If the customer downgrades to a cheaper plan, or decrease the number of licenses, Stripe applies a proration. If the proration amount is less than 0, then Stripe ‘refunds’ money by increasing the customer’s account balance which will be used to pay the future invoices. So that if the next invoice is less than the account balance, then Stripe will issue and pay the $0 invoice. The other case occurs when you have trials enabled in Stripe. During the trial Stripe issues the $0 invoice as well. These cases can mess up churn calculation. However, if you don’t provide trials via Stripe and don’t have a lot customers with prorations, then you can ignore this.

There are a lot of tools that allow you to calculate churn with a click of a button. However, the questions arise of how they calculate churn. How do they deal with special cases such as trials? When the customer is treated as churned? You start to doubt if you can trust the churn rate they are showing. These doubts make sense because each decimal in churn rate can impact your MRR and growth significantly.

Slemma gives you a direct access to your Stripe data and you can calculate metrics the way you want, handling all special cases.

Connect to Stripe

Slemma allows to retrieve invoices, subscriptions and events data. To connect Stripe data to Slemma, you have to have the admin rights in Stripe. Authorize in Stripe and when prompted, select 'Invoices'.

This will create a connection to Stripe. Then navigate to the /data page and click the created data source.

Calculate metrics

In the example below we assume that customer may have more than one active subscription and an active trial.
Slemma supports MDX calculations. In this case .CurrentMember and .PrevMember - are the current and previous months of the time dimension. These functions will get the values as soon as we place a time dimension onto X -axis.

Retention rate

Following the formula above, first we need to calculate Retention rate. To do so, select customers who paid in August AND also in September, i.e. we should count users who had invoices > $0 in August AND September. Remember that Stripe creates a $0 invoice if the customer is in the trial period.

 filter( [Customer.Hierarchy].Members,
    aggregate([Date].[Month].CurrentMember.PrevMember, [Amount]) >0
                  and aggregate([Date].[Month].CurrentMember,[Amount])>0

Then select those who paid in August.

 filter( [Customer.Hierarchy].Members,
    aggregate([Date].[Month].CurrentMember.PrevMember, [Amount]) >0

Divide the first expression by the second and multiple by 100 to get a value in percent.

 filter( [Customer.Hierarchy].Members,
    aggregate([Date].[Month].CurrentMember.PrevMember, [Amount]) >0
                  and aggregate([Date].[Month].CurrentMember,[Amount])>0


 filter( [Customer.Hierarchy].Members,
    aggregate([Date].[Month].CurrentMember.PrevMember, [Amount])>0


Churn rate

Next, calculate a churn rate metric

100- [retention rate]

where [retention rate] is the name of the metric created above.

Create a chart

Choose a line chart and drop the Churn rate metric onto the Metric field and the Date dimension onto the X axis. For date dimension select the months level to visualize churn by months.

Next steps

What’s next? Customer churn is the starting point for a bunch of other SaaS metrics you can use to make data-driven decisions.

You can now visualize churn by countries or plans. To do so, just drop one of the corresponding dimensions onto the lines field.

Knowing how many customers retained, churned and started paying, you can calculate and visualize net customers to see visually the impact of churn and calculate your growth ceiling.

You can also calculate your gross and net revenues by multiplying the number of net customer by the ARPU.

Net customers= new customers + retained customers — churned customers.

Compare the Monthly Customer Churn and Monthly MRR Churn to see what customers are leaving - bigger or smaller. If Monthly MRR churn is greater than Monthly customer churn then you are losing the bigger customers and visa versa.

Did you find this useful?

If so, don’t miss our future articles! Just drop in your email to the box above and you’ll get them delivered straight to your inbox.

No comments :

Post a Comment

Share a post