kapa.ai How is DAU, WAU, MAU calculated on Mixpanel so I can emulate the same using data from my backend?
Please stand by Rinitha R. as I search the knowledge base. I normally take about 15 seconds or so. đź‘‹
Feel free to ask a follow-up question once I've answered by mentioning me with @kapa.ai
In Mixpanel, DAU (Daily Active Users), WAU (Weekly Active Users), and MAU (Monthly Active Users) are calculated based on the number of unique users who performed a specified event within a given time period. Here's how each metric is calculated so you can emulate this in your backend:
Basic Calculation Principles
1. Define what constitutes an "active user" - This is typically a meaningful engagement action in your product (e.g., "watched a video" or "completed a purchase")2. Count unique users - Only count each user once within the specified time period, regardless of how many times they performed the action
Specific Time Windows
- DAU: Number of unique users who performed the defined event within the last 24 hours - WAU: Number of unique users who performed the defined event within the last 7 days - MAU: Number of unique users who performed the defined event within the last 30 days
How Mixpanel Calculates These Metrics
When calculating these metrics for different time intervals, Mixpanel uses a rolling window approach: - For daily intervals: Each day's calculation looks back 24 hours, 7 days, or 30 days from that specific day - For weekly intervals: Each week's calculation looks back from the last day of that week - For monthly intervals: Each month's calculation looks back from the last day of that monthFor example, when calculating MAU with a daily interval for November 1, Mixpanel would count unique users from October 3 to November 1 (30 days). For a weekly interval ending December 3, it would count unique users from November 4 to December 3 (30 days) Insights documentation.
Implementation Steps for Your Backend
1. Store user events with timestamps and unique user identifiers 2. For any given date: - DAU: Count distinct users with events in the 24-hour period ending on that date - WAU: Count distinct users with events in the 7-day period ending on that date - MAU: Count distinct users with events in the 30-day period ending on that date 3. For different time intervals (daily, weekly, monthly), adjust your calculation window accordinglyYou can also use these metrics to calculate product stickiness using the DAU/MAU ratio, which indicates how frequently users return to your product Mixpanel Blog.In Mixpanel's interface, these metrics are accessed through the "Unique Users" measurement by clicking the advanced settings (> arrow) to select DAU, WAU, or MAU options Insights Measurements.
kapa.ai is still learning and improving, please let me know how I did by reacting below.
ℹ️ Tip: Mention @kapa.ai in the thread for follow-ups or DM the app for 1-to-1 help.
kapa.ai so if I wanted to calculate DAU, WAU, MAU for Jan, Feb, Mar 2025, how do I do this?
Let me check the knowledge base for you again. One moment! 📚
To calculate DAU, WAU, and MAU for January, February, and March 2025 in a way that emulates Mixpanel's approach, you'll need to follow these specific steps:
Monthly Calculation (Jan, Feb, Mar 2025)
For each month: 1. Define your active user event - First determine what action constitutes an "active user" in your product 2. Set the time boundaries for each month: - January: Jan 1-31, 2025 - February: Feb 1-28, 2025 - March: Mar 1-31, 20253. Calculate the metrics for each month:
For MAU:
- For January: Count unique users who performed your defined event between Jan 1-31, 2025 - For February: Count unique users who performed your defined event between Feb 1-28, 2025 - For March: Count unique users who performed your defined event between Mar 1-31, 2025
For DAU:
Calculate the average daily active users for each month: - For each day in the month, count unique users who performed your event that day - Add these daily counts and divide by the number of days in the month
For WAU:
Calculate the average weekly active users for each month: - For each week that falls within the month, count unique users who performed your event that week - Add these weekly counts and divide by the number of weeks in the month
Implementation Details
According to Mixpanel's documentation, when calculating these metrics with different time intervals, the lookback period works as follows: - If using monthly interval: For each month, Mixpanel counts users active within that calendar month Insights documentation- If using daily interval: For each day, Mixpanel looks back from that date: - DAU: 1 day back - WAU: 7 days back - MAU: 30 days back- If using weekly interval: For each week, Mixpanel looks back from the last day of that week: - WAU: 7 days back - MAU: 30 days backTo match Mixpanel's approach exactly, you should use the same rolling window calculation method for your backend implementation Mixpanel Blog.Remember that these calculations require storing user event data with timestamps and unique user identifiers so you can perform the distinct count operations for each time period.
kapa.ai is still learning and improving, please let me know how I did by reacting below.
ℹ️ Tip: Mention @kapa.ai in the thread for follow-ups or DM the app for 1-to-1 help.