The SIGN function returns 1 for positive numbers, 0 for zero, and -1 for negative numbers. It quickly classifies values without complex IF statements.
=SIGN(number)What does SIGN do?
The SIGN function is a simple but useful math tool in Excel. You give it a number, and it tells you the sign of that number: 1 if the number is positive, 0 if it is exactly zero, and -1 if it is negative. That is all it does, but that single piece of information can simplify many formulas.
Why does this matter? Many business rules depend on whether a value is above, below, or exactly at a target. Instead of writing nested IF statements, you can use SIGN to turn any number into a clean -1, 0, or 1. That makes formulas easier to read and less likely to contain errors.
For example, imagine you track monthly sales against a target. You want to flag each month as above target, on target, or below target. With SIGN you can subtract the target from actual sales and pass the result to SIGN. The output immediately tells you the direction of the gap, and you can use that in conditional formatting, charts, or further calculations.
When to use SIGN
- Classifying values as positive, zero, or negative in a helper column.
- Creating simple up/down/flat indicators for dashboards.
- Comparing actual versus target and flagging the direction of the difference.
- Avoiding division by zero by checking SIGN before dividing.
- Building conditional formatting rules based on whether a value is above or below zero.
- Simplifying nested IF formulas that only need to know the sign of a number.
SIGN syntax
=SIGN(number)| Argument | Required? | What to enter |
|---|---|---|
number | Required | The number whose sign you want to find. It can be a number, a cell reference, or a formula that returns a number. For example, =SIGN(-5) returns -1, and =SIGN(A1) returns the sign of the value in cell A1. |
What it returns: The SIGN function returns 1 if the number is positive, 0 if the number is zero, and -1 if the number is negative.
SIGN examples
1 Basic signs of simple numbers
This example shows how SIGN works on a few plain numbers. The goal is to see the three possible outputs. In cell D2, the formula =SIGN(B2) looks at the value in B2. Because B2 is 42, a positive number, SIGN returns 1. You can copy the formula down to see that -7 returns -1 and 0 returns 0.
| A | B | C | D | E | |
|---|---|---|---|---|---|
| 1 | Label | Value | |||
| 2 | Positive | 42 | 1 | ||
| 3 | Negative | -7 | |||
| 4 | Zero | 0 | |||
| 5 |
2 Flagging sales above or below target
Here each region has actual sales and a target. The goal is to show whether sales are above target (1), exactly on target (0), or below target (-1). In cell D2, the formula =SIGN(B2-C2) subtracts the target in C2 from actual sales in B2. For North, 1200 minus 1000 is 200, a positive number, so SIGN returns 1. Copying the formula down shows that East is below target and Central is exactly on target.
| A | B | C | D | E | |
|---|---|---|---|---|---|
| 1 | Region | Actual Sales | Target | ||
| 2 | North | 1200 | 1000 | 1 | |
| 3 | South | 850 | 900 | ||
| 4 | East | 1100 | 1200 | ||
| 5 | West | 950 | 950 | ||
| 6 | Central | 700 | 700 | ||
| 7 |
3 Checking budget variance direction
This table compares budgeted and actual expenses by department. A positive variance means you spent more than budget, and a negative variance means you spent less. The goal is to return 1 for over budget, 0 for exactly on budget, and -1 for under budget. In cell D2, =SIGN(B2-C2) subtracts budget from actual. For Marketing, 5000 minus 4800 is 200, so SIGN returns 1. For Operations, 3000 minus 3200 is -200, so SIGN returns -1.
| A | B | C | D | E | |
|---|---|---|---|---|---|
| 1 | Department | Actual Expense | Budget | ||
| 2 | Marketing | 5000 | 4800 | 1 | |
| 3 | Operations | 3000 | 3200 | ||
| 4 | HR | 2500 | 2500 | ||
| 5 | IT | 7000 | 6500 | ||
| 6 |
4 Avoiding division by zero with SIGN
Suppose you want to calculate a ratio of change, but the base value might be zero. Dividing by zero causes an error. The goal is to return 0 when the base is zero, and otherwise perform the division. In cell D2, the formula =IF(SIGN(C2)=0,0,(B2-C2)/C2) first checks the sign of the base in C2. If C2 is zero, SIGN returns 0, and the IF returns 0. Otherwise it calculates the percentage change. For Product A, the base is 100, so the result is 0.2.
| A | B | C | D | E | |
|---|---|---|---|---|---|
| 1 | Product | New Value | Base Value | ||
| 2 | Product A | 120 | 100 | 0.2 | |
| 3 | Product B | 80 | 0 | ||
| 4 | Product C | 150 | 200 | ||
| 5 |
5 Creating up, down, or flat indicators
This example turns the sign of a price change into a text label. The goal is to show 'Up', 'Down', or 'Flat' for each item. In cell D2, the formula =IF(SIGN(B2-A2)=1,"Up",IF(SIGN(B2-A2)=-1,"Down","Flat")) compares the new price in B2 with the old price in A2. If the difference is positive, SIGN returns 1 and the formula returns 'Up'. If negative, it returns 'Down'. If zero, it returns 'Flat'. For Item 1, 15 minus 10 is 5, so the result is 'Up'.
| A | B | C | D | E | |
|---|---|---|---|---|---|
| 1 | Old Price | New Price | |||
| 2 | 10 | 15 | Up | ||
| 3 | 20 | 18 | |||
| 4 | 30 | 30 | |||
| 5 | 25 | 22 | |||
| 6 |
Common SIGN errors and how to fix them
| Error | Why it happens | How to fix it |
|---|---|---|
| #VALUE! | The argument is text that cannot be converted to a number, such as =SIGN("abc"). | Make sure the argument is a number, a cell containing a number, or a formula that returns a number. Use =SIGN(VALUE("5")) if you need to convert text that looks like a number. |
| #NAME? | The function name is misspelled, for example =SGN(5). | Use the correct spelling =SIGN(5). |
| #N/A | A referenced cell contains #N/A or another error value. | Check the referenced cell and correct the error, or use =IFERROR(SIGN(A1),"") to handle it. |
| Wrong result | The argument is a date or a logical value. Excel treats dates as numbers, so =SIGN(DATE(2020,1,1)) returns 1 because dates are positive serial numbers. | Only use SIGN on numbers where the sign is meaningful. If you need to test a date, compare it to another date instead. |
Tips for using SIGN
- Use SIGN to simplify formulas that only care about whether a value is positive, negative, or zero.
- Combine SIGN with IF to create clean three-way branches without nested comparisons.
- Remember that SIGN returns 0 only for exactly zero; very small positive or negative numbers still return 1 or -1.
- Use SIGN in conditional formatting rules to highlight positive and negative values differently.
- When dividing, check
SIGN(denominator)=0first to avoid #DIV/0! errors.
Frequently asked questions
What does the SIGN function return for zero?
SIGN returns 0 when the number is exactly zero.
Can SIGN handle text?
If the text can be converted to a number, such as "5", SIGN returns 1. If the text cannot be converted, SIGN returns #VALUE!.
Does SIGN work with dates?
Yes, because Excel stores dates as numbers. Since dates are positive serial numbers, SIGN returns 1 for any valid date.
How is SIGN different from ABS?
ABS returns the absolute value (always positive), while SIGN returns only the sign: 1, 0, or -1.
Related functions
Every example on this page was recalculated by SheetSkill’s spreadsheet engine. SIGN reference