You want a Notion formula to display a number with a comma as a thousands separator or a period as a decimal separator based on your region, but the formula output shows a raw decimal number instead. The root cause is that Notion formulas have no built-in function for locale-aware number formatting. This article explains the technical limitation and provides practical workarounds using string manipulation to achieve the desired separator format.
Key Takeaways: Why Notion Formulas Cannot Use Locale Separators and How to Work Around It
- Notion formula language lacks a locale or format function: No built-in way to apply region-specific thousands or decimal separators to a number.
- Manual string manipulation with slice and concat: You can insert a comma or period using formula functions like
format,slice, andconcat. - Property type limits: Number properties store raw values; the formula output is always a string, so you lose numeric sortability once formatted.
Why Notion Formulas Cannot Apply Locale-Specific Number Formatting
Notion formulas operate on a limited set of functions that handle numbers as raw floating-point values. There is no function equivalent to JavaScript’s toLocaleString() or Excel’s TEXT() with a locale code. The formula engine does not have access to your browser or system locale settings. When you use the format() function on a number, it always outputs a period as the decimal separator and no thousands separator. For example, format(1234567.89) returns "1234567.89" regardless of whether your region uses a comma as a thousands separator. This is a deliberate design choice to keep the formula language predictable and cross-platform consistent.
The Technical Limitation
The Notion formula parser interprets numbers using a period as the decimal separator. There is no parameter in the format() function or any other function to change the decimal or thousands separator. The only way to control the output is to convert the number to a string and manually insert the desired separator characters.
Steps to Create a Formula That Inserts a Custom Thousands Separator
These steps assume you have a number property named “Amount”. The formula will output a text string with a comma as the thousands separator and two decimal places. You can replace the comma with a period or any other character.
- Open the database and add a formula property
Click the database title area and select “Add a view” or go to the database properties menu. Click “Add a property” and choose “Formula”. Name it “Formatted Amount”. - Write the formula to extract the integer part
Use thefloor()function to get the integer portion:floor(prop("Amount")). This removes decimals. Store this temporarily in a variable if you use a long formula, but for clarity we will write it inline. - Convert the integer part to a string and reverse it
Notion formulas do not have a reverse function. Instead, use a combination offormat(),slice(), andlength()to insert separators from the right. A simpler approach for numbers up to 9 digits is to hardcode the separators using conditionalifstatements based on the length of the string. - Apply the separator insertion logic
Write a formula that checks the length of the integer string and usesconcat()to insert a comma at the correct position. Example for a number with 7 digits:concat(slice(format(floor(prop("Amount"))), 0, 1), ",", slice(format(floor(prop("Amount"))), 1, 4), ",", slice(format(floor(prop("Amount"))), 4, 7)). This is repetitive but works. - Add the decimal part
Useround()with a multiplier to get two decimal places:round(100 (prop("Amount") - floor(prop("Amount")))) / 100. Then convert to string and concatenate with a period or comma. Example:concat(formattedInteger, ".", format(round(100 (prop("Amount") - floor(prop("Amount")))))).
A complete formula for a 7-digit number with comma thousands separator and two decimal places looks like this:
let(
num, prop("Amount"),
intPart, format(floor(num)),
decPart, format(round(100 (num - floor(num)))),
len, length(intPart),
separator, ",",
if(len == 7, concat(slice(intPart, 0, 1), separator, slice(intPart, 1, 4), separator, slice(intPart, 4, 7), ".", decPart),
if(len == 6, concat(slice(intPart, 0, 3), separator, slice(intPart, 3, 6), ".", decPart),
if(len == 5, concat(slice(intPart, 0, 2), separator, slice(intPart, 2, 5), ".", decPart),
if(len == 4, concat(slice(intPart, 0, 1), separator, slice(intPart, 1, 4), ".", decPart),
concat(intPart, ".", decPart)))))
)
Common Issues and Edge Cases With Manual Number Formatting
Formula Returns “NaN” or “Undefined”
If the property “Amount” is empty or not a number, the floor() function may return NaN. Add a check using if(empty(prop("Amount")), "", ...) to return an empty string when the property is blank.
Decimal Part Shows Only One Digit or No Digits
When the decimal portion is less than 10, format() returns a single digit. For example, 0.05 becomes “5”. Use concat("0", format(...)) when the decimal part is less than 10. Check with if(decPart < 10, concat("0", decPart), decPart).
Numbers With More Than 9 Digits
Hardcoding separators for every possible length is impractical. You can use a recursive approach with a let() loop, but Notion formulas have a recursion limit. For numbers with 10 or more digits, consider using a third-party automation tool like Zapier to format the number before writing it to Notion.
Notion Formula Number Formatting Limitations vs Workarounds
| Formatting Aspect | Built-in Notion Formula | Manual Workaround |
|---|---|---|
| Thousands separator | Not available | Insert comma or period via concat and slice |
| Decimal separator | Always period | Replace period with comma using replaceAll() after formatting |
| Locale-aware formatting | Not possible | Not possible; workaround is static |
| Number sortability | Preserved with Number property type | Lost when output is a text string |
| Handling of large numbers | Unlimited precision | Limited by formula length and recursion depth |
Conclusion
You now understand why Notion formulas cannot format numbers with locale-specific separators: the formula language lacks any locale or formatting function. You can work around this by manually inserting separators using concat, slice, and format, but the output becomes a text string that cannot be sorted numerically. For databases that require sorting, keep the original Number property and use a separate Formula property for the formatted display. If you need full locale support, consider using an external integration or a Notion API script that applies toLocaleString() before writing the value.