# Average calculation problem

I have a problem with Average. Does it calculate correct? For example, I have collected 54798 things by 1 month and metabase shows me average number 110, when actually it suppose to be 54798/30 = 1826,6. What's the logic of average calculation in metabase?

Hi!
In Metabase, the average is calculated based on the values in each row, which can differ from simple arithmetic averages because of how data is aggregated and grouped. Try grouping your data by the relevant time period (e.g., by day, week, or month)
Thanks.

Hi!
Thanks for reply! Yes, I did that, I groupped by month and average did not change

Hi @Kam

Sorry for the late reply and thanks for the screenshot! I understand what you wanted

Metabase calculates the average based on the actual data points in the selected date range, not just the number of days. This means it considers the values you have for each date within the period.
For example, if you have data like this:

• 2024-01-01: 100
• 2024-01-02: 200
• 2024-01-03: 300

When grouped by month, Metabase averages these values: (100 + 200 + 300) / 3 = 200. So, for January 2024, the average is 200. It doesn't simply divide the total by the number of days in the month.

To get the average per day for the whole month, use a custom expression:
`SUM([containers_count]) / 30`

Hope this helps!