Excel function

SIGNfunction

Returns the sign of a number as 1, 0 or -1.

All versions
=SIGN(A2)
A
B
1
2
3
4
5
6
7

Click a cell in the table to change number. Click positive and negative values in turn. Try breaking it on purpose to see the errors.

Result

1

number
A2You can also click a cell in the table

The cell with the number to calculate. Click another value in the table.

What is the SIGN function?

=SIGN(number)

SIGN returns 1 for a positive number, 0 for zero and -1 for a negative number.

Use it to see the direction of a change or to put a sign back on another number. Click a value in column A; column B shows the same formula copied down.

SIGN is handy for showing whether a figure went up or down, or for branching on profit versus loss. It only ever returns -1, 0 or 1, which makes it easy to combine with CHOOSE or IF to show a different label for each direction.

Arguments

number
The number or cell.

SIGN examples

  1. Example 1. Direction of change

    =SIGN(C2-B2)

    1 if this month went up, -1 if it went down.

  2. Example 2. Keep the sign

    =SIGN(A2)*ROUND(ABS(A2),0)

    Round the size and keep the sign.

  3. Example 3. Month-on-month arrows

    =CHOOSE(SIGN(C2-B2)+2, "↓", "→", "↑")

    Adding 2 to SIGN gives 1, 2 or 3, which CHOOSE turns into an arrow.

    Last month B2This month C2SIGN(C2-B2)Shown
    1201501↑
    1501500→
    15090-1↓
  4. Example 4. Count the months that grew

    =SUMPRODUCT(--(SIGN(C2:C13-B2:B13)=1))

    Counts how many of 12 months beat the month before.

Common mistakes

FAQ

What about 0?
It returns 0.
Can IF do this?
Yes: =IF(A2>0,1,IF(A2<0,-1,0)) is the same.
How do I flip the sign?
Use -A2 or =A2*-1. SIGN is not needed.