SIGN Function in Excel
The SIGN function returns the sign of a number: 1 for positive, -1 for negative, and 0 for zero. Master SIGN with practical examples and solutions.
=SIGN(number)Quick Answer
SIGN function SIGN function is a mathematical function in Excel and Google Sheets that returns the sign of a number. It returns 1 for positive numbers, -1 for negative numbers, and 0 for zero. The syntax is simple: `=SIGN(number)` where number is any numeric value or cell reference.
=SIGN(number)Practical Examples
Basic Sign Detection
Identify the sign of various numbers
Financial Profit/Loss Indicator
Track monthly profit or loss direction for business analysis
Sales Trend Direction
Analyze whether sales are growing or declining month-over-month
Temperature Change Direction
Track whether temperatures are rising or falling
Investment Performance Tracking
Quickly identify winning and losing investments in a portfolio
Advanced: Weighted Direction Score
Create a composite score based on multiple factors' directions
Common Errors and Solutions
SIGN returns #VALUE! error
The most common cause is passing a text value or cell containing text to the SIGN function. SIGN requires a numeric argument and cannot process text strings, even if they look like numbers (e.g., "123" stored as text).
1. Check if the cell contains text by using ISTEXT(A1) 2. Convert text to numbers using VALUE() function: =SIGN(VALUE(A1)) 3. Ensure cells are formatted as Numbers, not Text 4. If data is imported, use Text-to-Columns to convert text numbers to actual numbers 5. For formulas, ensure the nested formula returns a number, not text
Always validate data types before using SIGN. Use data validation rules to ensure only numbers can be entered in source cells. When importing data, explicitly convert text columns to number format.
Example:
SIGN not recognized
This error occurs when SIGN is misspelled or when Excel doesn't recognize the function name. Common misspellings include SIGHN, SIG, or SGN (which is a VBA function, not an Excel function).
1. Verify the spelling is exactly =SIGN( with correct capitalization 2. Ensure there are no extra spaces before or after SIGN 3. Check that you're not accidentally using a VBA function name 4. If using an older Excel version, verify SIGN is supported (it has been since Excel 2003) 5. Re-type the formula rather than copy-pasting from other sources
Use Excel's formula autocomplete feature by typing =SI and selecting SIGN from the dropdown list. This ensures correct spelling and syntax.
SIGN returns 0 for non-zero numbers
This occurs when numbers are formatted with custom number formats that display non-zero values but the underlying cell value is actually 0. For example, a formula like =ROUND(0.00001, 2) displays as 0.00 but SIGN would return 1 because the underlying value is positive.
1. Check the actual cell value (not the displayed value) by increasing decimal places 2. Use ROUND or TRUNC to eliminate very small values: =SIGN(ROUND(A1, 2)) 3. Apply a threshold: =IF(ABS(A1)<0.01, 0, SIGN(A1)) 4. Verify formulas feeding into SIGN are calculating correctly 5. Check for floating-point precision issues in calculations
When working with calculated values, always round to an appropriate number of decimal places before applying SIGN. Document any threshold values you're using for "considered zero" in your analysis.
Example:
SIGN returns wrong direction
The formula logic is inverted, such as subtracting in the wrong order. For example, =SIGN(Old_Value - New_Value) gives the opposite result of =SIGN(New_Value - Old_Value). This is not a formula error but a conceptual mistake in formula construction.
1. Clearly define what you're measuring: growth (New - Old) or decline (Old - New) 2. Test with simple examples: If sales went from 100 to 150, =SIGN(150-100) returns 1 (growth) 3. Add comments to clarify formula intent 4. Create helper columns to show intermediate calculations 5. Use meaningful cell/range names instead of generic references
Always test formulas with known positive and negative examples. Document your formula logic with cell comments. Use consistent ordering conventions throughout your workbook (always New - Old for growth calculations).
Example:
Best Practices and Tips
Simplify Complex IF Statements
Instead of writing lengthy IF statements to check if a number is positive, negative, or zero, use SIGN for cleaner, more efficient formulas. For example, replace `IF(A1>0, "Positive", IF(A1<0, "Negative", "Zero"))` with `CHOOSE(SIGN(A1)+2, "Negative", "Zero", "Positive")`.
Combine with SUMPRODUCT for Counting
Use SIGN with SUMPRODUCT to count positive, negative, or zero values in a range. This is more flexible than COUNTIF for directional analysis. The formula =SUMPRODUCT((SIGN(A1:A10)=1)*1) counts positive numbers, =SUMPRODUCT((SIGN(A1:A10)=-1)*1) counts negatives, and =SUMPRODUCT((SIGN(A1:A10)=0)*1) counts zeros.
Handle Very Small Numbers
When working with calculations that may produce very small numbers due to rounding or floating-point arithmetic, consider setting a threshold below which values are treated as zero. This prevents SIGN from returning 1 or -1 for essentially zero values.
Create Visual Direction Indicators
Combine SIGN with symbols or icons for intuitive visual feedback. Use CHOOSE or IFS to convert SIGN results into arrows, symbols, or emojis. This makes dashboards and reports more user-friendly without requiring complex conditional formatting.
Don't Confuse SIGN with ABS
SIGN and ABS serve different purposes. SIGN returns direction (1, -1, or 0) while ABS returns magnitude (absolute value). A common mistake is using SIGN when you need the absolute value, or vice versa. Use SIGN when you need to know if a number is positive or negative. Use ABS when you need the distance from zero regardless of direction.
Normalize Data for Comparisons
SIGN is excellent for normalizing data when you only care about direction, not magnitude. This is useful when comparing different metrics with different scales. For example, a $1000 profit and 10% growth are both positive indicators regardless of their different units.
Need Help with SIGN Function in Excel?
Stop struggling with formula syntax. Use AskFormulas to generate validated formulas instantly with our AI-powered tool.
Example Excel formula:
Related Formulas
The ABS function returns the absolute value of a number, removing any negative sign. Learn syntax, examples, and common errors with this complete guide.
Master the IF function with practical examples and error solutions. Learn conditional logic in Excel and Google Sheets for smarter decision-making.
The INT function rounds numbers down to the nearest integer by removing decimals. Learn syntax, practical examples, and error solutions.
Master the ROUND function to round numbers to specified decimal places with practical examples and error solutions for Excel and Google Sheets.