# How are rolling averages calculated?

Use rolling analysis to remove noise or spikes from data and smooth out trends over time. Mixpanel’s Segmentation report shows a linear analysis by default; change it to rolling by clicking the three dots in the upper righthand corner:

Mixpanel calculates the rolling average based on the chosen time units (hour, day, week, or month) for the entirety of the viewable date range in the graph. For example, here, the rolling average for a Sign In Event is calculated daily from August 11, 2016 through September 9, 2016:

• The first day represented here (August 11, 2016) shows 77,118 Sign Ins. This will be the same number as if you looked at total Sign In Events for that day (not rolling).

• The second day (August 12, 2016) represents a rolling average of the past two days. This equals the total number of Sign In Events from day one plus day two, divided by two.

• The third day (August 13, 2016) would then equal the total number of Sign In Events from day one plus day two plus day three, divided by three, etc.

## Maximum intervals

Given the above calculation, there is also maximum subset sizing to calculate rolling average. The maximum sizing for each interval is as follows:

• Hourly rolling average subset size maximum = 12

• Daily rolling average subset size maximum = 7

• Weekly rolling average subset size maximum = 5

• Monthly rolling average subset size maximum = 3

That means in the above example, the rolling average for August 20 will not be the totals for days one through 10 divided by 10; instead, it will only consider the totals from August 20 and the previous six days.

## How is rolling different from Average in the Total dropdown?

When selecting Average from the middle dropdown, you are looking at the total number of Events divided by the unique users doing those Events to get the average number of times an Event is triggered per user:

If you select average from this dropdown as well as rolling, you’ll be looking at the rolling average number of Events triggered per user as opposed to the rolling average total Events triggered or rolling average uniques.