Use this formula to turn two number properties into a visual progress bar with a percentage.
if(
or(empty(prop("Total")), prop("Total") == 0),
"No total",
lets(
percent, round(prop("Completed") / prop("Total") * 100),
filled, floor(percent / 10),
repeat("█", filled) + repeat("░", 10 - filled) + " " + format(percent) + "%"
)
)For example, 6 completed items out of 10 displays ██████░░░░ 60%.
What this formula does
| Formula part | Meaning |
|---|---|
Completed / Total * 100 | Calculates the percentage |
round(...) | Removes decimal places |
floor(percent / 10) | Converts the percentage to ten bar segments |
repeat(...) | Draws filled and empty segments |
The empty or zero-total check prevents a division-by-zero error.
Database setup
Create these properties in your Notion database:
| Property | Type | Example |
|---|---|---|
Completed | Number | 6 |
Total | Number | 10 |
Progress | Formula | The formula above |
Use the same unit for both numbers. For example, use completed tasks and total tasks, or completed lessons and total lessons.
Use a shorter progress bar
For a compact five-segment bar, change the repeated counts and divide by five:
if(
or(empty(prop("Total")), prop("Total") == 0),
"No total",
lets(
percent, round(prop("Completed") / prop("Total") * 100),
filled, floor(percent / 20),
repeat("■", filled) + repeat("□", 5 - filled) + " " + format(percent) + "%"
)
)Show only the percentage
Use this variant when you need a clean number for sorting or grouping:
if(
or(empty(prop("Total")), prop("Total") == 0),
0,
round(prop("Completed") / prop("Total") * 100)
)Avoid percentages above 100%
If Completed can accidentally exceed Total, clamp the result before drawing the bar:
if(
or(empty(prop("Total")), prop("Total") == 0),
"No total",
lets(
percent, min(100, max(0, round(prop("Completed") / prop("Total") * 100))),
filled, floor(percent / 10),
repeat("█", filled) + repeat("░", 10 - filled) + " " + format(percent) + "%"
)
)Common problems
If you see a formula error, check that Completed and Total are Number properties, not text or formula outputs that return text.
If the bar is empty, make sure Completed is not blank and that Total is greater than zero. Empty completed values are safer to treat as 0 if your workflow allows unfinished rows.
If the bar looks different across devices, use simple characters such as █ and ░. Custom emoji can have different widths depending on the font.
When to use this formula
Progress bars work well for projects, reading lists, courses, habits, OKRs, budgets, and any database with a completed count and a total count.