# Percentile aggregation for histogram buckets

**URL:** <https://discuss.elastic.co/t/percentile-aggregation-for-histogram-buckets/201676>\
**Category:** Kibana\
**Created:** [September 30, 2019, 4:11pm UTC](https://discuss.elastic.co/t/percentile-aggregation-for-histogram-buckets/201676 "2019-09-30T16:11:42Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![surenraju](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/surenraju/32/62606_2.png) [@surenraju](https://discuss.elastic.co/u/surenraju)\
**Post date:** [September 30, 2019, 4:11pm UTC](https://discuss.elastic.co/t/percentile-aggregation-for-histogram-buckets/201676/1 "2019-09-30T16:11:42Z")

</div>

We are moving our application metrics from prometheus to elastic stack.

As part of migration, from the histogram buckets, is there any way in elastic search or in kibana to calculate 50th, 95th, 99th percentile latency?

Prometheus supports this through function histogram\_quantile  
[https://prometheus.io/docs/prometheus/latest/querying/functions/#histogram\_quantile](https://prometheus.io/docs/prometheus/latest/querying/functions/#histogram_quantile)

Is there way to achieve similar result in elastic search or kibana?

---

<div class="post-metadata">

**Author:** ![jbudz](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jbudz/32/45922_2.png) [@jbudz](https://discuss.elastic.co/u/jbudz)\
**Post date:** [September 30, 2019, 10:27pm UTC](https://discuss.elastic.co/t/percentile-aggregation-for-histogram-buckets/201676/2 "2019-09-30T22:27:46Z")

</div>

If I'm understanding correctly, this is an option with the histogram or date histogram aggregation and [https://www.elastic.co/guide/en/elasticsearch/reference/current/search-aggregations-metrics-percentile-aggregation.html](https://www.elastic.co/guide/en/elasticsearch/reference/current/search-aggregations-metrics-percentile-aggregation.html).

In Kibana the buckets would show on the x-axis or on one row of a table, with percentiles on the y axis or columns

---

<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:** [October 28, 2019, 10:27pm UTC](https://discuss.elastic.co/t/percentile-aggregation-for-histogram-buckets/201676/3 "2019-10-28T22:27:50Z")

</div>

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