Notion: How to calculate a percentage
Notion is a powerful tool for organising your work and life, offering flexibility that caters to everything from simple task lists to complex databases. One common task users often need is to calculate percentages, whether for tracking project completion, analysing data, or managing budgets. In this guide, I’ll walk you through the process of calculating a percentage in Notion, ensuring you get the most out of this versatile platform.
Step 1: Set up your database
Pick a database you have set up in Notion, this could be anything from a task list to a budget tracker.
Create a new database: Start by creating a table database by clicking the "Table" option in the "New" menu. You can choose to create a full-page table or an inline table, depending on your needs.
Add columns: For a percentage calculation, you’ll typically need at least two numerical columns.
For example, if you’re tracking task completion, you might have a "Total Tasks" column and a "Completed Tasks" column.
Step 2: Input your data
Enter the relevant data into your columns. Let’s assume you’re tracking a project’s progress.
Total Tasks: Enter the total number of tasks for each project.
Completed Tasks: Enter the number of tasks that have been completed.
Step 3: Add a formula column
To calculate the percentage, you’ll need to add a new column that uses a formula.
Create a new column: Click on the "+" sign at the right end of your table to add a new column. Name this column something like "Completion Percentage."
Set the property type: Click on the column header, select "Edit property," and choose "Formula" from the list of property types.
Step 4: Calculate percentage
Method 1 - Percentage formula
(prop("Completed Tasks") / prop("Total Tasks"))
Then right-click on the formula column, go to property settings and change the Number Format to “Percent”.
Percentage formula without editing settings:
This formula divides the number of completed tasks by the total number of tasks and then multiplies the result by 100 to get a percentage.
(prop("Completed Tasks") / prop("Total Tasks")) * 100
Percentage formula that handles division by zero:
To avoid errors when the total number of tasks is zero, you can enhance your formula:
if(prop("Total Tasks") == 0, 0, (prop("Completed Tasks") / prop("Total Tasks")) * 100)
This formula checks if the "Total Tasks" value is zero. If it is, the percentage will automatically be set to zero, preventing a division-by-zero error.
Round the result:
If you prefer to round the percentage to a specific decimal place, you can use the round()
function:
round((prop("Completed Tasks") / prop("Total Tasks")) * 100)
Method 2 - Column percentage
Once the formula is in place, your column total can be automatically calculated for the percentage empty or percentage not empty for each column in your database.
Calculating a percentage in Notion is straightforward once you know how to set up your formulas. Whether you’re tracking project completion, budget spending, or any other metric, understanding how to use formulas in Notion empowers you to get more out of this already robust tool. By following these steps, you’ll have a precise and dynamic percentage calculation that updates automatically as your data changes.