unaryPlus
Learn how to use the unaryPlus (+) operator in Notion formulas.
The unaryPlus (+) operator is used to convert Booleans and numeric strings to numbers.
1
+string
2
+Boolean
3
โ€‹
4
unaryPlus(string)
5
unaryPlus(Boolean)
Unlike toNumber, it cannot convert dates to numbers. Otherwise, it is functionally equivalent, and it can be written with the + operator for quick use.
You can also use the function version, unaryPlus().
Good to know: A unary operator only has a single operand, while a binary operator has two. unaryPlus and unaryMinus are, as their names imply, unary operators. Examples of binary operators include add, divide, pow, etc.

1
+"42" // Output: 42
2
โ€‹
3
+true // Output: 1
4
โ€‹
5
+false // Output: 0
6
โ€‹
7
unaryPlus("42") // Output: 42
unaryPlus() can be combined with other operators, including unaryMinus and even add, which uses the same + character.
1
20 + + "30" // Output: 50
2
โ€‹
3
-+"30" // Output: -30
4
โ€‹
5
20 + - + "30" // Output? -10 [Notion will rewrite this to 20 + -(+"30")]

The example database below tracks daily habits with a checkbox property for each habit. The Score property converts each checkboxโ€™s Boolean value into a number, and then adds up a total score for the day.

unaryPlus
College Info Geek on Notion

1
+prop("Deck Swabbed") + +prop("Teeth Brushed") + +prop("Lime Eaten")

Notion's Phone Number property type outputs a string (see it listed in the API Reference for more detail).
The example database below uses unaryPlus and the replaceAll function to turn phone numbers into true numbers, even if they have additional formatting.

unaryPlus
College Info Geek on Notion

1
+replaceAll(prop("Phone"), "[() -]", "")
unaryPlus canโ€™t operate on a string that contains non-numeric characters such as ( or -. So Number first uses the replaceAll function to remove them. It does this by passing a regular expression in its matching argument - "[() -]" - where the special bracket [] characters equate to:
โ€œMatch any character listed here.โ€
This includes the space.
Next, replaceAll()'s replacement argument replaces all matched characters with an empty string - "" - in effect removing them. The result is a phone number converted to a purely numeric string - e.g. (482) 491-5813 is converted to 4824915813.
Finally, the + operator converts this numeric string into a true number.

โ€‹
My name is Thomas Frank, and I'm a Notion-certified writer, YouTuber, and template creator. I've been using Notion since 2018 to organize my personal life and to run my business and YouTube channel. In addition to this formula reference, I've created a free Notion course for beginners and several productivity-focused Notion templates. If you'd like to connect, follow me on Twitter.
Last modified 20d ago
Copy link
On this page
Example Formulas
Example Database: Daily Habit Score
View and Duplicate Database
"Score" Property Formula
Example Database: Numeric Phone Numbers
View and Duplicate Database
โ€œNumberโ€ Property Formula