# Can we calculate in Kibana?

**URL:** <https://discuss.elastic.co/t/can-we-calculate-in-kibana/36007>\
**Category:** Kibana\
**Created:** [December 1, 2015, 8:55am UTC](https://discuss.elastic.co/t/can-we-calculate-in-kibana/36007 "2015-12-01T08:55:51Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![Pieter\_Agenbag](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/pieter_agenbag/32/4562_2.png) [@Pieter\_Agenbag](https://discuss.elastic.co/u/Pieter_Agenbag)\
**Post date:** [December 2, 2015, 7:21am UTC](https://discuss.elastic.co/t/can-we-calculate-in-kibana/36007/4 "2015-12-02T07:21:11Z")

</div>

Just add a scripted field that subtracts the two values from each other and then plot an average of that value.

> [@Manually Calculate Terms within a bar chart](https://discuss.elastic.co/t/manually-calculate-terms-within-a-bar-chart/35745/4):
>
> Yup - that should be simple enough with a scripted field. Simply go to Settings choose your index and click on Scripted fields. Click "Add scripted field" and enter a name for the field Define your script , which should be "doc['status1'].value - doc['status2'].value" Done - you should now have a status3 field to use.

---

_[View the full topic](https://discuss.elastic.co/t/can-we-calculate-in-kibana/36007)._
