# Decimal problems

**URL:** <https://forum.bubble.io/t/decimal-problems/170086>\
**Category:** Database\
**Created:** [September 20, 2021, 5:44am UTC](https://forum.bubble.io/t/decimal-problems/170086 "2021-09-20T05:44:49Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![dehacked79](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/dehacked79/32/42926_2.png) [@dehacked79](https://forum.bubble.io/u/dehacked79)\
**Post date:** [September 20, 2021, 5:44am UTC](https://forum.bubble.io/t/decimal-problems/170086/1 "2021-09-20T05:44:49Z")

</div>

Why is it that sometimes bubble will store a value as -17.1699999999999 instead of -17.17?

---

<div class="post-metadata">

**Author:** ![blurapps](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/blurapps/32/102380_2.png) [@blurapps](https://forum.bubble.io/u/blurapps)\
**Post date:** [September 20, 2021, 6:05am UTC](https://forum.bubble.io/t/decimal-problems/170086/2 "2021-09-20T06:05:31Z")

</div>

That’s because it’s running Javascript in the backend. You can format this down to as many decimal places as you need with `:format` in the property editor

---

<div class="post-metadata">

**Author:** ![dehacked79](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/dehacked79/32/42926_2.png) [@dehacked79](https://forum.bubble.io/u/dehacked79)\
**Post date:** [September 20, 2021, 6:19am UTC](https://forum.bubble.io/t/decimal-problems/170086/3 "2021-09-20T06:19:41Z")

</div>

In your opinion would format be a better solution than using “Rounded to”?

---

<div class="post-metadata">

**Author:** ![blurapps](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/blurapps/32/102380_2.png) [@blurapps](https://forum.bubble.io/u/blurapps)\
**Post date:** [September 20, 2021, 6:38am UTC](https://forum.bubble.io/t/decimal-problems/170086/4 "2021-09-20T06:38:09Z")

</div>

`Rounded to` or `ceiling` will bring it to a closest integer.  
In case you want to display it as a decimal number with only 2 decimal places for instance, I would recommend using `:formatted as` - because it provides more options.

![image](https://us1.discourse-cdn.com/bubble/original/3X/6/c/6cb5bb37b2f878ed230cd122067b239c08cf1a90.png)
