The not equal sign (≠) is a mathematical symbol that indicates that two numbers, values, or expressions are not equal. It is one of the most commonly used comparison symbols in mathematics, science, programming, and logic.
Whether you’re solving algebra problems, comparing measurements, or writing code, understanding the not equal symbol helps you express that two values are different without ambiguity.
Related: If you’re learning mathematical comparison symbols, our Equals Sign Guide explains when two values are considered equal and how the equals symbol (=) differs from the not equal sign.
What Is the Not Equal Sign?
The not equal sign (≠) indicates that the value on the left side is different from the value on the right side.
Symbol: ≠
Name: Not equal sign
Meaning: The two values or expressions are not equal.
Example
5 ≠ 4
This statement is true because 5 and 4 have different values.
Another example:
12 − 5 ≠ 8
Since 12 − 5 = 7, the statement correctly shows that 7 is not equal to 8.
Related: If you’re comparing values that are close—but not exactly the same—see our Approximate Equal Sign Guide to learn when to use ≈ instead of ≠.
How the Not Equal Sign Works
The ≠ symbol is simply an equals sign with a diagonal slash through it. The slash indicates that the equality statement is false.
For example:
15 ≠ 12
This tells us that 15 and 12 are different values.
Unlike the greater than (>) or less than (<) symbols, the not equal sign does not indicate which value is larger or smaller. It only confirms that the two values are not identical.
Using the Not Equal Sign in Basic Mathematics
In arithmetic, the not equal sign is used to compare numbers and verify whether a statement is true.
Examples
9 ≠ 6
4 + 4 ≠ 9
18 ÷ 3 ≠ 5
These comparisons help students recognize correct and incorrect mathematical statements.
Related: Looking for a complete reference? Our Math Symbols List explains the meaning of common mathematical symbols used in arithmetic, algebra, geometry, and calculus.
Not Equal Sign in Algebra
The not equal symbol frequently appears in algebra to define restrictions or describe values that are not allowed.
Example
x ≠ 0
This means x can be any value except zero.
You’ll often see this when dividing by a variable, since division by zero is undefined.
Another example:
x² − 9 ≠ 0
This states that the expression must not equal zero under the given condition.
Related: If you’re solving algebraic equations, our Difference of Two Squares Calculator can help factor expressions such as x² − 9 into (x − 3)(x + 3).
Not Equal Sign in Logic and Set Theory
In logic and set theory, the symbol ≠ shows that two variables or elements are different.
Examples:
a ≠ b
A ≠ B
These statements simply indicate that the two variables or sets are not identical.
Not Equal Sign in Programming
Most programming languages don’t use the ≠ symbol directly. Instead, they use alternative operators that represent the same idea.
| Language | Not Equal Operator |
|---|---|
| Python | != |
| Java | != |
| C/C++ | != |
| JavaScript | != or !== |
| SQL | <> or != |
Although the symbols differ, they all mean “not equal to.”
Not Equal Sign vs Other Comparison Symbols
Understanding how the not equal sign compares with other mathematical symbols can help you avoid mistakes.
| Symbol | Meaning |
|---|---|
| = | Equal to |
| ≠ | Not equal to |
| > | Greater than |
| < | Less than |
| ≥ | Greater than or equal to |
| ≤ | Less than or equal to |
| ≈ | Approximately equal to |
Each symbol has a distinct purpose and should be used in the appropriate context.
Related: Our Plus–Minus Sign (±) Guide explains another commonly used mathematical symbol and when it represents two possible values.
How to Type the Not Equal Sign (≠)
Depending on your device, there are several ways to type the not equal symbol.
Windows
- Hold Alt and type 8800 on the numeric keypad (Unicode input may vary by application).
- Or insert the symbol using your word processor’s Insert → Symbol menu.
Mac
Press:
Option + =
HTML
≠
or
≠
LaTeX
\neq
Common Mistakes to Avoid
When using the not equal sign, keep these points in mind:
- Don’t confuse ≠ with ≈ (approximately equal).
- Remember that ≠ only means the values are different—it doesn’t indicate which is larger.
- Don’t replace > or < with ≠ unless you simply want to show inequality.
- In programming, use the language’s correct operator (such as !=) instead of the mathematical symbol.
Real-World Uses of the Not Equal Sign
The not equal sign appears in many fields beyond mathematics, including:
- Mathematics and algebra
- Computer programming
- Scientific research
- Engineering calculations
- Statistical analysis
- Database queries
- Logical reasoning
- Education and examinations
It provides a clear way to express that two values, measurements, or conditions are different.
Frequently Asked Questions
What does the not equal sign (≠) mean?
It means that two numbers, values, or expressions are not the same.
Is ≠ the same as greater than or less than?
No. The symbol ≠ only indicates that two values are different. It does not specify which one is larger.
What is the programming equivalent of ≠?
Most programming languages use !=, while SQL may use <>.
Can the not equal sign be used in equations?
Yes. It is commonly used in algebra, logic, and mathematical statements to indicate that two expressions are unequal.
Final Thoughts
The not equal sign (≠) is one of the most important comparison symbols in mathematics. It allows you to clearly state that two values or expressions are different without indicating which is greater or smaller. Whether you’re solving equations, writing computer code, or interpreting scientific data, understanding how to use the not equal symbol correctly is an essential mathematical skill.
Related: Continue building your understanding of mathematical notation with our Math Symbols List, Equals Sign Guide, Approximate Equal Sign Guide, and Plus–Minus Sign (±) Guide. Together, these resources explain the symbols you’ll encounter most often in mathematics, science, engineering, and programming.