DAU Calculator using Gemini

Notes:

Aug 16, 2025: The code works, I can preview it in wordpress, but it doesn’t work when I publish the post. It appears the problem has to do with how WP processes HTML files. Might need to upgrade some things on my end (any advice suggestions welcome). For now will share the public link for Canvas below:

https://g.co/gemini/share/ab0cd1f8efe8

I’ve been working on a model where I input retention numbers and total installs, and the output is the DAU of the game. The idea is to try to model how the game grows after launch.

This is still WIP and rudimentary. The current model assume constant install numbers and retention numbers throughout the game’s lifecycle.


How the Calculation Works

The core of the calculator is the DAU calculation, which is determined by summing the active users from every single day since the game’s launch.

The calculateModel function handles the main logic. Here’s a step-by-step breakdown:

  1. Daily Loop: The model iterates through each day of the simulation, from Day 1 to the total number of days you want to model.
  2. Cohort Loop: For each day, it runs a second, nested loop. This inner loop checks every daily install cohort from Day 1 up to the current day.
  3. Retention Rate: It calls the getRetentionRate function to figure out how many users from a specific cohort are still active. This function uses the retention milestones you provided (e.g., Day 1, Day 3, Day 7) and uses linear interpolation to estimate the retention for any day in between. For example, if you have 40% retention on Day 1 and 35% on Day 3, the model assumes a steady, straight-line decline between those two points.
  4. Extrapolation: The model also includes linear extrapolation for days after the last data point. For instance, after Day 360, it uses the last provided retention rate to project a straight-line decline to 0% retention on Day 540.
  5. Calculate DAU: The model then multiplies the initial daily installs by the interpolated retention rate to get the number of users from that specific cohort who are still active. It then sums the retained users from all daily cohorts to get the total DAU for the current day.

This process is repeated for every single day of the simulation, creating a dynamic model that accounts for both new users coming in and older users dropping off.

Total Active User Days

This metric represents the cumulative number of times users were active over a specific period, such as the total lifespan you’re modeling. It’s essentially the sum of your Daily Active Users (DAU) over a set number of days. For example, if on Day 1 you have 100 active users and on Day 2 you have 90 active users, your cumulative active user days after two days is 190. It’s a measure of total engagement or “volume of usage” for your game.


Total Spend

This is the total amount of money you’ve spent to acquire the users who installed your game during the modeled period. It’s calculated by multiplying the total number of installs by the estimated Cost per Install (CPI).


Cost per Active User Days

This metric tells you how much it costs, on average, for each “day of user activity” that you generate. It’s a powerful efficiency metric that helps you assess the value of your marketing dollars. A lower cost per active user day is better, as it indicates you’re generating a lot of engagement for a relatively low cost. It’s calculated by dividing your Total Spend by your Total Active User Days.

Leave a Reply