Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a table in my database that records, 48 times per day, the total users, total active users within 2 weeks, total users logged in within the past 24 hours , and total users that logged in within the last 24 hours that had visited the site prior to the last 24 hours.

I'm trying to use this data to calculate the churn rate of my users, but in some cases I am getting a negative number so I assume I am doing it incorrectly.

My attempt:

(Yesterday's active in past 24 hours [returning] - Todays's active in past 24 hours [returning] + Change in Active Users) / Todays's active in past 24 hours [returning]

I assume I have the correct data somewhere with all of the data I am saving, I'm just not using it the right way.

share|cite|improve this question
Do you have a precise definition of "churn rate"? – Rahul Nov 8 '10 at 23:00
The way I understand it is the percentage of customers who will stop using the product in a given period of time (so in this case, a day). So basically I want to figure out the percent of users that join and then quit. – James Simpson Nov 8 '10 at 23:08
Look at what can drive it negative. Imagine 100 new users yesterday, all of whom come back today. Then there is no change in active users today over yesterday, so you get $(0-100-0)/100=-1$. So as Rahul said, look at your definition of churn rate. – Ross Millikan Nov 8 '10 at 23:56

In order to calculate churn rate, you need first to know the number of churning customers. Here is how:

Total users in the past (hour/day/month) + total visits ever since - total users now = churning visitors.

For churn rate,

Churn rate = churning visitors / ((total users in the past + total users now) / 2)

Hope this is helpful

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.