# sign

Learn how to use the sign function in Notion formulas.
The `sign()` function returns the sign of its argument. It indicates whether its argument is positive, negative, or zero.
1
sign(number)
`sign()` accepts only numbers; it will not auto-convert Booleans or other data types.

## Example Formulas

1
sign(-5) // -1
2
3
sign(5) // 1
4
5
sign(0) // 0
6
7
sign(+"-1") // -1

## Example Database

The example database below lists bank account balances. The `sign()` function is used to determine the output of the Status property. ### "Balance" Property Formula

1
// Compressed
2
sign(prop("Balance")) == -1 ? "🔴 Negative Balance!" : sign(prop("Balance")) == 0 ? "🟡 \$0 Balance" : "🟢 Balance OK"
3
4
// Expanded
5
sign(
6
prop("Balance")
7
) == -1 ?
8
"🔴 Negative Balance!" :
9
sign(
10
prop("Balance")
11
) == 0 ?
12
"🟡 \$0 Balance" :
13
"🟢 Balance OK"
This simple formula uses a nested if-statement (written in the ternary operator syntax with `?` and `:`) to return one of three status messages.
The output is determined by the `sign()` function's output.
Good to know: You can also use comparison operators such as larger and smaller to accomplish the same thing.
E.g. `prop("Balance") < 0`.

#### Other formula components used in this example: 