# Does extended\_stats aggregation return appoximate value or exact value?

**URL:** <https://discuss.elastic.co/t/does-extended-stats-aggregation-return-appoximate-value-or-exact-value/165693>\
**Category:** Elasticsearch\
**Created:** [January 25, 2019, 4:15am UTC](https://discuss.elastic.co/t/does-extended-stats-aggregation-return-appoximate-value-or-exact-value/165693 "2019-01-25T04:15:13Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![kdh6429](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kdh6429/32/31676_2.png) [@kdh6429](https://discuss.elastic.co/u/kdh6429)\
**Post date:** [January 25, 2019, 4:15am UTC](https://discuss.elastic.co/t/does-extended-stats-aggregation-return-appoximate-value-or-exact-value/165693/1 "2019-01-25T04:15:13Z")

</div>

as term aggregation count is appoximate, is extended\_stats query also return approximate value? or does it guarantee exact value?

---

<div class="post-metadata">

**Author:** ![polyfractal](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/polyfractal/32/48162_2.png) [@polyfractal](https://discuss.elastic.co/u/polyfractal)\
**Post date:** [February 1, 2019, 1:32pm UTC](https://discuss.elastic.co/t/does-extended-stats-aggregation-return-appoximate-value-or-exact-value/165693/2 "2019-02-01T13:32:53Z")

</div>

ExtendedStats (and all the other "simple" metrics like min/max/stats, etc) are all exact. The only approximate aggs are:

- Terms (due to the top-n nature of the algorithm)
- Cardinality (due to HyperLogLog algorithm)
- Percentiles / Percentile Ranks (due to TDigest or HDRHisto algorithm)
- Median Absolute Deviation (due to using TDigest internally)

I believe every other agg will return exact results.

---

<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:** [March 1, 2019, 1:32pm UTC](https://discuss.elastic.co/t/does-extended-stats-aggregation-return-appoximate-value-or-exact-value/165693/3 "2019-03-01T13:32:54Z")

</div>

Closed on March 1, 2019, 1:32pm UTC

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