# How to calculate daily new users to a website

**URL:** <https://discuss.elastic.co/t/how-to-calculate-daily-new-users-to-a-website/186214>\
**Category:** Kibana\
**Tags:** elastic-stack-graph\
**Created:** [June 18, 2019, 9:38am UTC](https://discuss.elastic.co/t/how-to-calculate-daily-new-users-to-a-website/186214 "2019-06-18T09:38:29Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![LeeDr](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/leedr/32/9289_2.png) [@LeeDr](https://discuss.elastic.co/u/LeeDr)\
**Post date:** [June 24, 2019, 5:52pm UTC](https://discuss.elastic.co/t/how-to-calculate-daily-new-users-to-a-website/186214/2 "2019-06-24T17:52:16Z")

</div>

The simple answer is like this. I used `Unique count` of clientip and a Date Histogram with a daily interval.

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/8/c/8c707df2eb3b20054048792e07eb359d13ea024a.png)

But the problem with this is that it's counting how many unique IPs there are each day. So the count on the second day includes all the IP addresses on that day even if they also were visitors on the previous day.

There are several other posts on this topic but I don't think any of them have a good solutions you could implement in Kibana. For example;

> [@Cumulative Sum Regardless of Time Interval - ES](https://discuss.elastic.co/t/cumulative-sum-regardless-of-time-interval-es/100237):
>
> Hi, I posted the following in the Kibana category, and it was suggest that it might belong here in Elasticsearch:

Here's a post that looks like it's developing the correct query in Elasticsearch but I'm not sure if we can do that in Kibana;

> <https://stackoverflow.com/questions/34445376/use-doc-count-as-cumulative-count>

I'll try to spend some time to see if Kibana can do this;

> **[Pipeline aggregations | Elasticsearch Guide \[8.11\] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/current/search-aggregations-pipeline.html#_special_paths)**

---

_[View the full topic](https://discuss.elastic.co/t/how-to-calculate-daily-new-users-to-a-website/186214)._
