Skip to content

SIGN

Returns 1 for a positive number, -1 for a negative number and 0 for zero. It tells you the direction, not the size.

Syntax

=SIGN()

Math and trigonometry

All versions of Excel.

Try it

Edit the formula in D2 or change the inputs. The sheet recalculates as you type.

D2
A
B
C
D
1
Item
Last month
This month
Direction
2
Gloves
100
110
1
3
Tape
80
80
4
Labels
60
45
5
Wrap
200
230
6
Straps
150
140

D2 =SIGN(C2-B2) returns 1

How SIGN works

SIGN reports which side of zero a number is on. It returns 1 for anything positive, -1 for anything negative, and 0 for zero. The size of the number makes no difference: SIGN(0.001) and SIGN(5000) are both 1.

Direction of change

The common use is to turn a difference into a direction. With last month in B2 and this month in C2, =SIGN(C2-B2) is 1 for an increase, -1 for a decrease and 0 for no change. That is easier to count, colour or look up than the raw difference.

Labels from the sign

Because SIGN gives only three possible numbers, it works well as an index into a list. =CHOOSE(SIGN(C2-B2)+2, "Down", "Flat", "Up") adds 2 so -1, 0 and 1 become 1, 2 and 3. The same result comes from nested IFs, but the CHOOSE form is shorter and easy to extend.

Counting and netting

SIGN lets you count increases and decreases without helper columns. =SUMPRODUCT(--(SIGN(C2:C9-B2:B9)=1)) counts rows that went up. The sum of the signs, =SUMPRODUCT(SIGN(C2:C9-B2:B9)), is the number of rises minus the number of falls: a quick way to see whether a series is trending up or down.

Restoring or flipping a sign

  • Apply the sign of one number to another: =SIGN(B2)*ABS(C2) gives C2's size with B2's sign.
  • Flip the sign: =-SIGN(B2).
  • Rebuild a number from its parts: =SIGN(B2)*ABS(B2) equals B2.

SIGN compared with ABS

ABS returns the size and drops the direction. SIGN returns the direction and drops the size. Between them you can recover the original number.

Other points

SIGN of text returns #VALUE!, and SIGN of a blank cell is 0. For a blank cell that should not count as "no change", check it with ISBLANK first. Dates are numbers, so =SIGN(A2-TODAY()) tells you whether a deadline is in the past (-1), today (0) or in the future (1).

Arguments

number
The number, cell or calculation to check, such as C2-B2.

Examples

Each example is a live sheet. Change the inputs or the formula and watch the result.

Example 1

Direction of change: up

D2 =SIGN(C2-B2)

Result: 1

Gloves went up by 10, so the sign is 1.

D2
A
B
C
D
1
Item
Last month
This month
Direction
2
Gloves
100
110
1
3
Tape
80
80
4
Labels
60
45
5
Wrap
200
230
6
Straps
150
140

D2 =SIGN(C2-B2) returns 1

Example 2

No change gives 0

D3 =SIGN(C3-B3)

Result: 0

Tape is unchanged at 80, so the difference and the sign are both 0.

D3
A
B
C
D
1
Item
Last month
This month
Direction
2
Gloves
100
110
3
Tape
80
80
0
4
Labels
60
45
5
Wrap
200
230
6
Straps
150
140

D3 =SIGN(C3-B3) returns 0

Example 3

A decrease gives -1

D4 =SIGN(C4-B4)

Result: -1

Labels fell by 15. The size of the fall doesn't matter to SIGN.

D4
A
B
C
D
1
Item
Last month
This month
Direction
2
Gloves
100
110
3
Tape
80
80
4
Labels
60
45
-1
5
Wrap
200
230
6
Straps
150
140

D4 =SIGN(C4-B4) returns -1

Example 4

Turn the sign into a word

D4 =CHOOSE(SIGN(C4-B4)+2,"Down","Flat","Up")

Result: Down

SIGN gives -1, which plus 2 is position 1 in the list.

D4
A
B
C
D
1
Item
Last month
This month
Trend
2
Gloves
100
110
3
Tape
80
80
4
Labels
60
45
Down
5
Wrap
200
230
6
Straps
150
140

D4 =CHOOSE(SIGN(C4-B4)+2,"Down","Flat","Up") returns Down

Example 5

Count the items that went up

B8 =SUMPRODUCT(--(SIGN(C2:C6-B2:B6)=1))

Result: 2

Gloves and Wrap went up. The double minus turns TRUE and FALSE into 1 and 0 so SUMPRODUCT can add them.

B8
A
B
C
D
1
Item
Last month
This month
2
Gloves
100
110
3
Tape
80
80
4
Labels
60
45
5
Wrap
200
230
6
Straps
150
140
7
8
Rises
2

B8 =SUMPRODUCT(--(SIGN(C2:C6-B2:B6)=1)) returns 2

Your turn.

Solve it in the sheet. Every answer is checked, with hints if you need them.

Task 1 of 2

In D2, return 1 if Q2 is above Q1, -1 if it is below and 0 if it is the same. Fill it down to D6.

Answer in D2, then it fills down to D6.

D2
A
B
C
D
E
1
Region
Q1
Q2
Direction
Trend
2
North
540
610
3
South
720
720
4
East
300
255
5
West
480
500
6
Online
90
80
7

Common mistakes

  • SIGN gives only direction. A rise of 1 and a rise of 10,000 both return 1, so keep the difference too if the size matters.
  • A blank cell is 0, so SIGN of a missing figure reads as "no change". Check with ISBLANK if blanks need separate treatment.
  • Adding 2 to SIGN works as a CHOOSE index only when SIGN returns -1, 0 or 1. Text input returns #VALUE! and breaks it.
  • Rounded values can hide a direction. A difference of 0.0004 shows as 0.00, but SIGN still returns 1. Round first if tiny moves should count as flat.
  • A figure that is text, such as "n/a", makes SIGN(C2-B2) return #VALUE!, and the error spreads to every cell built on it. Clean the data first.

Questions people ask

What does SIGN do in Excel?

It returns 1 for a positive number, -1 for a negative number and 0 for zero. SIGN(-45) is -1.

How do I tell whether a figure went up or down?

Use `=SIGN(C2-B2)` with the earlier figure in B2 and the later one in C2. 1 means up, -1 means down and 0 means unchanged.

How do I turn the sign into text such as Up or Down?

Use `=CHOOSE(SIGN(C2-B2)+2, "Down", "Flat", "Up")`. Adding 2 turns -1, 0 and 1 into the list positions 1, 2 and 3.

What is the difference between SIGN and ABS?

SIGN returns the direction as 1, -1 or 0. ABS returns the size without the sign. Multiplying them, SIGN(x)*ABS(x), gives back x.

How do I check whether a date has passed?

Use `=SIGN(A2-TODAY())`. It is -1 for a past date, 0 for today and 1 for a future date.

Learn SIGN in a real sheet.

Tracks take you from the basics to modelling, one graded exercise at a time.