Program Functions

Notion Calculations: Rounding Numbers (Ceil, Floor, Round)

Screen Shot 2020-01-03 at 5.54.36 PM.jpg

Let's talk about how to round numbers in Notion. For those unfamiliar with Excel, this function may be foreign to you. Actually, Excel gives the user an efficient round function that makes this process a lot smoother. Notion uses something a bit different. This tutorial will explain a solution to problems like these:

  • How do I round a number to the nearest tenth in Notion?

  • And how do I round a number to the lowest tenth?

  • And how do I round a number to the highest tenth?

Let's begin with this scenario. We want to find the percentage of a task completed by dividing Completed tasks by Subtasks. The result is a number that's not very nice to look at.

Screen Shot 2020-01-03 at 3.59.07 PM.jpg

Let's simply round the number first with round:

round(prop("Completed") / prop("Subtasks"))

It will look something like this:

Screen Shot 2020-01-03 at 3.58.51 PM.jpg

That round up is too dramatic. Let's try using a workaround: (100 * x) / 100

round(100 * prop("Completed") / prop("Subtasks")) / 100
Screen Shot 2020-01-03 at 5.44.04 PM.jpg

Cool! Let's dive a little deeper. Suppose we want to always round the number down rather than to the nearest integer? For this use floor:

floor(100 * prop("Completed") / prop("Subtasks")) / 100


Always round the number up with ceil:

ceil(100 * prop("Completed") / prop("Subtasks")) / 100