# Average on a percentile bucket

**URL:** <https://discuss.elastic.co/t/average-on-a-percentile-bucket/110822>\
**Category:** Elasticsearch\
**Created:** [December 8, 2017, 10:29am UTC](https://discuss.elastic.co/t/average-on-a-percentile-bucket/110822 "2017-12-08T10:29:24Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jean\_Pierre](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jean_pierre/32/15190_2.png) [@Jean\_Pierre](https://discuss.elastic.co/u/Jean_Pierre)\
**Post date:** [December 8, 2017, 10:29am UTC](https://discuss.elastic.co/t/average-on-a-percentile-bucket/110822/1 "2017-12-08T10:29:24Z")

</div>

I need to compute the average response time of a service hile excluding the 5% cases having the biggest response times.

I would like to know if there is a way for me to create a bucket with only the 95% of documents having the smallest response times (a bucket based on a kind of percentile) then to compute the average of response times on this bucket.

The idea is to exclude the strange behaviors of the app and only consider the normal time behavior.

Thanks for you answers

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [January 5, 2018, 10:29am UTC](https://discuss.elastic.co/t/average-on-a-percentile-bucket/110822/2 "2018-01-05T10:29:35Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
