# Rounding floats

**URL:** <https://discourse.nodered.org/t/rounding-floats/53369>\
**Category:** General\
**Created:** [8 November 2021 11:07 UTC](https://discourse.nodered.org/t/rounding-floats/53369 "2021-11-08T11:07:00Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [8 November 2021 11:27 UTC](https://discourse.nodered.org/t/rounding-floats/53369/5 "2021-11-08T11:27:14Z")

</div>

Why are you wanting to do this? If you are sending it to a dashboard node, for example, most of them allow you to do this at display time by using something like this in the Value Format field  
`{{msg.payload | number: 2}}`  
Generally numbers should not be rounded until they get to the display, it is not good to throw away accuracy before it is necessary.

---

_[View the full topic](https://discourse.nodered.org/t/rounding-floats/53369)._
