How can you round numbers to a specific number of decimal places in Notion?
When working with formulas in Notion, you’ll eventually come across decimal numbers like 3.14159 or 2.71828.
In Excel, you could simply round these numbers to your desired decimal place.
Notion also has a round()
function, which at first glance seems like the solution to this problem.
But hold your horses!
A weakness of the round function is that it always rounds the value up to the nearest whole number:
So, 3.1415 becomes 3, 2.71828 becomes 2 and so on.
Unfortunately, there’s no way to add more arguments to this function, which means you can’t round to a specific decimal place in Notion as you might in Excel, at least not at first glance.
Use a Formula to Round Numbers in Notion
Fortunately, there’s a simple formula that can help you overcome this challenge.
To round to one decimal place:
- round((prop(“Decimal Number”)) * 10) / 10
To round to two decimal places:
- round((prop(“Decimal Number”)) * 100) / 100
To round to three decimal places:
- round((prop(“Decimal Number”)) * 1000) / 1000
How does this formula work?
As you already know, round()
would round the decimal number 3.1415 up to 3.
If you multiply 3.1415 by 10, you get 31.415. Rounded with round()
you get 31. If you divide this number by 10, the result is 3.1.
In this formula, 10 is your modification number. For each additional decimal place you want to round to, you simply add another zero to the modification number.
For 2 decimal places, you use 100. For 3 decimal places, you use 1000. Etc.
Still not sure how this works?