Churn Rate= (# of customers lost / # customers at the start of the period ) x 100
Churn Rate is used to track the number of users who stopped using or doing business with your service. It is a key metric to figure out why users are leaving. Based on this, businesses can improve their products and user experience.
To track why your customers are leaving, you can check the churn rate on both monthly and yearly basis.
On Outcode, you can create a Churn Rate Databoard in under 10 minutes.
Sample MySQL database
This is what Awesome Company's MySQL database looks like.
To track your Churn Rate, you need the following data:
- created date: when the user first started using your service
- deleted date: when the user stopped using your service
How to calculate the Churn Rate in SQL
We need to bring created_at
and deleted_at
from the user table.
You can easily copy and paste the query below to find your own.
You can also create your own Databoard and share it with your team.
For Monthly Churn Rate:
select DATE_FORMAT(start, '%Y-%m') as Month,
concat(round(
(select count(*) from user where created_at < start and DATE_FORMAT(deleted_at , '%Y-%m') = DATE_FORMAT(start, '%Y-%m'))
/ (select count(*) from user where created_at < start and (deleted_at is null or deleted_at >= start)) * 100, 2
), '%') as 'Churn Rate'
from (
select DATE_ADD('2021-01-01', interval t0 month) start, DATE_SUB(DATE_ADD('2021-01-01', interval t0+1 month), interval 1 day) end
from (
select 0 t0
union select 1
union select 2
union select 3
union select 4
union select 5
union select 6
union select 7
union select 8
union select 9
union select 10
union select 11
) t0) v;
Notes: you need union select 0 to 11 if you want to see the whole year worth of Monthly Churn Rate. If you want to see the rates for January to March, you can delete union select 3 onwards.
For Yearly Churn Rate:
select DATE_FORMAT(start, '%Y') as Year,
concat(round(
(select count(*) from user where created_at < start and DATE_FORMAT(deleted_at , '%Y') = DATE_FORMAT(start, '%Y'))
/ (select count(*) from user where created_at < start and (deleted_at is null or deleted_at >= start)) * 100, 2
), '%') as 'Churn Rate'
from (
select DATE_ADD('2019-01-01', interval t0 year) start, DATE_SUB(DATE_ADD('2019-01-01', interval t0+1 year), interval 1 day) end
from (
select 0 t0
union select 1
union select 2
union select 3
) t0) v;
Do you have a better way to find the Churn Rate? Please reply below and inspire your fellow Outcoders!
Want to do more with your data?
- Try adding a table to view your Churn Rate by product or service.
- Check out our templates and see how you can use your data here.
Share and automate
Outcode helps you to track measures in real-time with the Databoard.
- Share your Databoard or data table with other team members. Copy and paste the page URL anywhere you like.
- Get your real-time Churn Rate sent via Slack or email with Outcode's quick automation feature.