# How to limit the number of digits after a decimal place

**URL:** <https://community.thunkable.com/t/how-to-limit-the-number-of-digits-after-a-decimal-place/67698>\
**Category:** Questions about Thunkable X\
**Created:** [February 5, 2019, 7:21pm UTC](https://community.thunkable.com/t/how-to-limit-the-number-of-digits-after-a-decimal-place/67698 "2019-02-05T19:21:49Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Pest](https://avatars.discourse-cdn.com/v4/letter/p/e480ec/32.png) [@Pest](https://community.thunkable.com/u/Pest)\
**Post date:** [February 5, 2019, 7:21pm UTC](https://community.thunkable.com/t/how-to-limit-the-number-of-digits-after-a-decimal-place/67698/1 "2019-02-05T19:21:49Z")

</div>

I’ve been playing around with writing a little currency conversion app. It does basically what I wanted it to do, and I learned about using APIs. I would like to polish it up design wise a bit, and I’m having a problem with the result of dividing to get the exchange rate after a value is entered. Say I enter 32 $CAD and the result that comes back is $USD26.35336324673464. I obviously am only interested in the first two decimal places. Using the ROUND block just gives me an integer, which is OK, but if basically renders the currency conversion almost useless, as the cents matter too! Any ideas on how to do this?

---

<div class="post-metadata">

**Author:** ![domhnallohanlon](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/domhnallohanlon/32/29554_2.png) [@domhnallohanlon](https://community.thunkable.com/u/domhnallohanlon)\
**Post date:** [February 5, 2019, 8:24pm UTC](https://community.thunkable.com/t/how-to-limit-the-number-of-digits-after-a-decimal-place/67698/2 "2019-02-05T20:24:35Z")

</div>

Hi @Pest,

Take a look at @jane’s tutorial that shows how to round to any number of decimal places:

> [@Rounding a Number](http://community.thunkable.com/t/rounding-a-number/56174):
>
> The Thunkable ‘round’ function will round a given number to its closest whole number. However, there are times when you want to round a number to a certain number of decimals. A common example of this is with money. Taking the Euro as an example, people commonly want to round to the nearest cent instead of the nearest euro. Here is how to round a number to 2 decimal places: [image] Let’s use an example. A product costs €10/kg. It is currently on sale, and costs ⅔ of its normal price. 10 \*…

---

<div class="post-metadata">

**Author:** ![brad\_singer](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/brad_singer/32/29715_2.png) [@brad\_singer](https://community.thunkable.com/u/brad_singer)\
**Post date:** [February 6, 2019, 12:03am UTC](https://community.thunkable.com/t/how-to-limit-the-number-of-digits-after-a-decimal-place/67698/3 "2019-02-06T00:03:29Z")

</div>

multiply number by 100 then round then divide by 100  
it moves 26.3533 to 2635.33 and then rounds that to 2635 then divide by 100 to get 26.35

---

<div class="post-metadata">

**Author:** ![ioannis](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/ioannis/32/146956_2.png) [@ioannis](https://community.thunkable.com/u/ioannis)\
**Post date:** [November 8, 2024, 12:16pm UTC](https://community.thunkable.com/t/how-to-limit-the-number-of-digits-after-a-decimal-place/67698/4 "2024-11-08T12:16:20Z")

</div>


