# How to get MEAN of two columns

**URL:** <https://forum.inductiveautomation.com/t/how-to-get-mean-of-two-columns/46511>\
**Category:** Module Development\
**Created:** [May 9, 2021, 4:08pm UTC](https://forum.inductiveautomation.com/t/how-to-get-mean-of-two-columns/46511 "2021-05-09T16:08:27Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![pmishra](https://avatars.discourse-cdn.com/v4/letter/p/dc4da7/32.png) [@pmishra](https://forum.inductiveautomation.com/u/pmishra)\
**Post date:** [May 9, 2021, 4:08pm UTC](https://forum.inductiveautomation.com/t/how-to-get-mean-of-two-columns/46511/1 "2021-05-09T16:08:27Z")

</div>

I have two columns in my dataset and I want the third column as a mean of two columns.  
I have achieved this result by writing code in java.  
But I wanted to calculated this using some ‘commons-math’ library. But I am unable to find any specific library for this.  
Below I have attached the link of the commons-math library for the reference.  
[http://commons.apache.org/proper/commons-math/](http://commons.apache.org/proper/commons-math/)

Can anyone know which class should I have to used for achieving this result…

---

<div class="post-metadata">

**Author:** ![JordanCClark](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/jordancclark/32/83362_2.png) [@JordanCClark](https://forum.inductiveautomation.com/u/JordanCClark)\
**Post date:** [May 10, 2021, 11:39am UTC](https://forum.inductiveautomation.com/t/how-to-get-mean-of-two-columns/46511/2 "2021-05-10T11:39:53Z")

</div>

[https://commons.apache.org/proper/commons-math/javadocs/api-3.6/org/apache/commons/math3/stat/descriptive/moment/Mean.html](https://commons.apache.org/proper/commons-math/javadocs/api-3.6/org/apache/commons/math3/stat/descriptive/moment/Mean.html)
