# How to round numbers to two decimal points?

**URL:** <https://discourse.processing.org/t/how-to-round-numbers-to-two-decimal-points/18506>\
**Category:** Beginners\
**Created:** [March 8, 2020, 6:06pm UTC](https://discourse.processing.org/t/how-to-round-numbers-to-two-decimal-points/18506 "2020-03-08T18:06:15Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![anon94203042](https://avatars.discourse-cdn.com/v4/letter/a/898d66/32.png) [@anon94203042](https://discourse.processing.org/u/anon94203042)\
**Post date:** [March 8, 2020, 6:06pm UTC](https://discourse.processing.org/t/how-to-round-numbers-to-two-decimal-points/18506/1 "2020-03-08T18:06:15Z")

</div>

Is there a way to do that? I need it for money transactions. For example:

```auto
10 -> 10.00
10.5 -> 10.50
10.55 -> 10.55
10.555 -> 10.56
10.554 -> 10.55

```

---

<div class="post-metadata">

**Author:** ![LuckSmith](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/lucksmith/32/5805_2.png) [@LuckSmith](https://discourse.processing.org/u/LuckSmith)\
**Post date:** [March 8, 2020, 6:13pm UTC](https://discourse.processing.org/t/how-to-round-numbers-to-two-decimal-points/18506/2 "2020-03-08T18:13:42Z")

</div>

hello, [this](https://processing.org/reference/nf_.html) might help
