You want to show task completion visually inside a Notion database without leaving the page. Notion does not have a built-in progress bar component, but you can create one using a formula that generates a text-based bar. This article explains how to build a progress bar using the slice and repeat functions in a Notion database formula. You will learn the exact formula syntax, how to configure the supporting properties, and how to avoid common mistakes that break the bar.
Key Takeaways: Building a Progress Bar in Notion Database
- Formula property with
sliceandrepeatfunctions: Creates a text bar that fills based on a percentage value. - Number property named “Progress”: Stores the completion percentage from 0 to 100.
- Formula syntax
slice("██████████", 0, round(Progress / 10)): Converts the number into a filled bar segment.
How the Notion Progress Bar Formula Works
The progress bar is a formula property that outputs a string of Unicode block characters. The formula uses the repeat function to create a string of empty blocks and the slice function to replace some of them with filled blocks based on a percentage number. You need a Number property to store the progress value. The formula reads that number, divides it by 10 to get the count of filled blocks, then combines filled and empty blocks into a single string. The result is a text bar that visually fills from left to right.
Prerequisites
Before writing the formula, create a database in Notion with at least two properties:
- A Number property named “Progress” — stores a value between 0 and 100.
- A Formula property — will contain the progress bar code.
You can use any existing number property, but the formula must reference it by name. If the property name contains spaces, wrap it in prop("Exact Name").
Steps to Add a Progress Bar to a Notion Database
- Add a Number property for progress
Open your Notion database. Click the + button in the last column header. Select Number from the property type list. Name it Progress. Enter a value between 0 and 100 in any row to test later. - Add a Formula property
Click the + button again. Select Formula from the property type list. Name it Progress Bar. - Open the formula editor
Click inside the Formula column for any row. The formula editor panel opens on the right side of the window. - Enter the progress bar formula
Copy and paste the following code into the editor:slice("██████████", 0, round(prop("Progress") / 10)) + slice("░░░░░░░░░░", 0, 10 - round(prop("Progress") / 10))
Replaceprop("Progress")with the exact name of your number property if different. - Close the formula editor
Click anywhere outside the editor or press Escape. The formula property now displays a text-based progress bar for each row. - Test with different values
Change the Progress number in a row to 50. The bar should show five filled blocks and five empty blocks. Change it to 100 to see ten filled blocks. Change it to 0 to see all empty blocks.
Alternative Formula Using Only Filled Blocks
If you prefer a bar without empty blocks, use this simpler formula:
slice("██████████", 0, round(prop("Progress") / 10))
This version only shows the filled portion. The empty area stays blank, which may look cleaner in some database views.
Common Mistakes and How to Avoid Them
Progress Bar Shows an Error or Empty String
The formula references a property name that does not exist. Verify that the Number property is named exactly as written inside prop("Name"). Property names are case-sensitive. If the name contains spaces, enclose it in double quotes inside the prop() function.
Bar Shows Only Filled or Only Empty Blocks Regardless of Value
The round function may be missing or the division is incorrect. Confirm that the formula divides the Progress value by 10. For example, a Progress value of 75 divided by 10 equals 7.5. round(7.5) returns 8, so the bar shows 8 filled blocks. Without round, the formula may fail or produce unexpected results.
Bar Characters Display as Squares or Question Marks
The Unicode block characters may not render in all environments. Use standard ASCII characters instead. Replace █ with # and ░ with -. The formula becomes:slice("##########", 0, round(prop("Progress") / 10)) + slice("----------", 0, 10 - round(prop("Progress") / 10))
Bar Does Not Update When Progress Changes
Formula properties update automatically when a referenced property changes. If the bar does not refresh, check that the formula references the correct property. Also confirm that the Progress property is a Number type, not a Text or Select type.
Notion Progress Bar Formula vs Alternative Methods
| Item | Formula-Based Progress Bar | Rollup + Checkbox Method |
|---|---|---|
| Setup complexity | One formula property | Multiple rollup and formula properties |
| Visual appearance | Text-based Unicode blocks | Number percentage only |
| Update speed | Instant when number changes | Requires relation and rollup recalculation |
| Customization | Change block characters or bar length | Limited to percentage display |
| Best for | Simple task tracking per item | Project-level completion from subtasks |
You now have a working progress bar inside your Notion database using only a formula property. Try adjusting the bar length by changing the number of characters in the slice string. For example, use 20 characters for a finer granularity and divide the Progress value by 5 instead of 10. This formula approach keeps your database lightweight and avoids third-party widgets.