# Using tinymath in TSVB to find remainder

**URL:** <https://discuss.elastic.co/t/using-tinymath-in-tsvb-to-find-remainder/358590>\
**Category:** Kibana\
**Created:** [May 1, 2024, 7:55pm UTC](https://discuss.elastic.co/t/using-tinymath-in-tsvb-to-find-remainder/358590 "2024-05-01T19:55:15Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kepernicus](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kepernicus/32/134061_2.png) [@Kepernicus](https://discuss.elastic.co/u/Kepernicus)\
**Post date:** [May 1, 2024, 7:55pm UTC](https://discuss.elastic.co/t/using-tinymath-in-tsvb-to-find-remainder/358590/1 "2024-05-01T19:55:15Z")

</div>

Howdy!

I'm looking at trying to find the remainder of an integer with value after a decimal using the mod function in tinymath. I cannot for the life of me get it to work. I've tried 30 different ways of writing params.x% 1, given how all the other functions worked. Would mod(params.x, 1) work?  
^i'm away from my stack right now and I only just thought of that way of writing it...

---

<div class="post-metadata">

**Author:** ![Marco\_Liberati](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/marco_liberati/32/82953_2.png) [@Marco\_Liberati](https://discuss.elastic.co/u/Marco_Liberati)\
**Post date:** [May 2, 2024, 7:20am UTC](https://discuss.elastic.co/t/using-tinymath-in-tsvb-to-find-remainder/358590/2 "2024-05-02T07:20:02Z")

</div>

Hi @Kepernicus

you can use this formula: `mod( params.x, 1)`
