You have a Notion database formula that returns 0 even though the source property clearly contains a non-empty value. This usually happens when the formula references a property that is not the correct type, such as a number property that is blank or a text property that contains non-numeric characters. This article explains the root causes of this issue and provides step-by-step fixes so your formula displays the expected result.
Key Takeaways: Why Notion Formula Returns 0 and How to Fix It
- Formula Editor > Check property type: Ensure the source property is a Number or a Text property that contains only digits; mixed content causes 0.
- Database > Add a Rollup property: Use Rollup to convert a text or date property into a number before using it in a formula.
- Formula Editor > Use the
toNumber()function: Convert text to number explicitly to avoid 0 results from empty or non-numeric cells.
Why a Notion Formula Returns 0 When the Source Property Has Data
Notion formulas are strict about data types. A formula that performs arithmetic on a property that is not a number will often return 0 instead of an error. For example, if you use prop("Cost") 2 and the Cost property is a text field containing “25”, Notion treats it as text and cannot multiply it, so it returns 0. The same happens if the source property has blank cells — even if some rows have values, a blank cell causes the formula to output 0 for that row. Another common cause is using a date property directly in a number formula; dates are not numbers, so the formula yields 0.
Formula Type Mismatch
When you create a formula that references a property, Notion expects the referenced property to be compatible. If the source property is a Select, Multi-select, Text, Date, or Checkbox, and your formula tries to add or multiply it, Notion cannot interpret the value as a number and defaults to 0. This is not a bug — it is how Notion enforces type safety.
Blank or Empty Cells in the Source Property
Even if most rows have a value, a single blank cell in the source property will cause the formula to return 0 for that row. Notion does not skip blank cells; it treats them as empty, and any arithmetic on an empty value results in 0.
Non-Numeric Characters in a Text Property
If the source property is a text field that contains numbers but also includes letters, spaces, or symbols like “$25”, Notion cannot extract the numeric portion. The formula sees the entire string as non-numeric and returns 0.
Steps to Fix a Notion Formula That Returns 0
Follow these steps in order. Test the formula after each step to identify the exact cause.
- Check the source property type
Open your database. Hover over the column header of the property your formula references. Note the property type shown in the dropdown menu. If it is not a Number property, the formula will likely return 0. Change the property type to Number if the data allows it. Right-click the column header, select “Property type,” and choose “Number.” Confirm that all values are numeric; any non-numeric entries will be deleted. - Convert text to number using the toNumber function
If you cannot change the property type (for example, because the column also contains text labels), edit the formula. Click the formula cell, then click “Edit formula.” Wrap the property reference withtoNumber(). For example, changeprop("Cost") 2totoNumber(prop("Cost")) 2. This tells Notion to interpret the text as a number. If the text contains non-numeric characters,toNumber()will return 0 for that row, so clean the data first. - Use a Rollup to convert date or select values to numbers
For source properties that are dates or select options, add a Rollup property. Create a new property, set type to “Rollup.” Choose the same database as the source. In the “Property” field, select the property you want to convert. In the “Calculate” dropdown, choose “Count” or “Count All” (for select options) or “Date” functions like “Date Difference” to get a numeric value. Then reference the Rollup property in your formula instead of the original property. - Remove blank cells or use the empty() function
To avoid 0 from blank cells, check for empty values in your formula. Use theempty()function to return an alternative value. Example:if(empty(prop("Cost")), 0, prop("Cost") 2). This returns 0 only if the cell is empty, but if you want to skip the row, use""instead of0. For a blank result, useif(empty(prop("Cost")), "", prop("Cost") 2). - Clean non-numeric characters from text properties
If the source is a text property with numbers that include currency symbols, commas, or spaces, remove them. Edit the formula to strip non-digit characters using thereplaceAll()function. Example:toNumber(replaceAll(prop("Cost"), "[^0-9.]", "")) 2. This removes everything except digits and the decimal point. Test on a row that contains “$1,250.50”. The formula will strip the dollar sign and comma, then convert to 1250.5.
If Notion Formula Still Returns 0 After the Main Fix
Formula references a Rollup that is empty
A Rollup property can return empty if the related database row does not have a value in the source property. Ensure the Rollup calculation is set correctly. For example, if you use “Sum” and the source property has no numbers, the Rollup will be 0. Change the Rollup calculation to “Count” or “Count Values” to get a count of non-empty cells.
Formula uses a function that returns 0 for non-numeric input
Some Notion functions like sum() and round() return 0 if any argument is not a number. Wrap each argument with toNumber() or check with empty() before using them in aggregate functions.
Database has a filter that hides rows with errors
If your database view has a filter that hides rows where the formula returns 0, you may not see the problematic rows. Remove all filters temporarily. Click the filter icon and delete each filter. Then scroll through all rows to find rows where the source property is blank or has non-numeric content.
Notion Formula Data Types: What Works and What Returns 0
| Source Property Type | Formula Example | Result |
|---|---|---|
| Number | prop("Price") 2 |
Correct numeric value |
| Text (contains only digits) | toNumber(prop("Price")) 2 |
Correct numeric value |
| Text (contains letters or symbols) | prop("Price") 2 |
0 |
| Date | prop("Date") + 1 |
0 (dates are not numbers) |
| Select | prop("Status") 2 |
0 |
| Checkbox | prop("Done") + 1 |
0 |
| Empty cell (any type) | prop("Value") 2 |
0 |
The table shows that only Number properties and text properties explicitly converted with toNumber() produce correct results. All other types or empty cells cause the formula to return 0.
You can now identify why a Notion formula returns 0 and apply the correct fix: change the property type to Number, use toNumber(), or clean non-numeric characters with replaceAll(). Next, review all formulas in your workspace for similar type mismatches. For advanced data cleaning, combine toNumber() with replaceAll() to handle currency symbols and spaces in a single formula.