Skip to content

Not equal sign ≠

The not equal sign (≠) means two values are different: 3 ≠ 4. On a Mac, press Option+Equals. In code and spreadsheets, you write it as != or <> instead.

U+2260 · NOT EQUAL TO

Block: Mathematical Operators · Unicode 1.1 · Math symbol

How to type it

Windows
Win + . (period) opens the emoji & symbol panel
Microsoft Word
2260, then Alt + X
Mac (US layout)
⌥ =
Linux (GTK/IBus)
Ctrl + Shift + U, 2260, Space

Codes for developers

Code point
U+2260
Unicode name
NOT EQUAL TO
HTML entity
&ne; &#x2260; &#8800;
CSS
content: "\2260";
JavaScript / JSON
"\u2260"
Python
"\u2260"
URL encoding
%E2%89%A0
UTF-8
E2 89 A0
UTF-16
2260

Look-alike characters

  • EQUALS SIGN
  • ALMOST EQUAL TO
  • NOT IDENTICAL TO
  • U+0021 U+003D

Using ≠ in math

The sign is an equals sign with a slash through it. It states that two expressions have different values:

  • 5 + 2 ≠ 8
  • x ≠ 0, a common condition before dividing by x
  • a ≠ b ≠ c is ambiguous, because it doesn’t say that a ≠ c. Write “a, b and c are distinct” instead.
  • A ≠ ∅ says that set A is not empty.

Related signs: ≈ means approximately equal, ≡ means identical or congruent in modular arithmetic, and ≢ means not identical. In LaTeX, \neq or \ne gives ≠, and \not\equiv gives ≢.

Not equal in code and spreadsheets

WhereNot equalExample
Python, C, Java, PHP!=if x != 0:
JavaScript!== (strict) or !=a !== b
SQL<> (standard) or !=WHERE status <> 'closed'
Excel, Google Sheets<>=IF(A1<>B1, "diff", "same")
Visual Basic<>If a <> b Then
Lua~=if a ~= b then

In JavaScript, prefer !==. The loose != converts types first, so 0 != "" is false. Some coding fonts draw != as a single ≠ through ligatures, but the file still contains two characters, and the code needs them.

Typing ≠ in documents

  • Word: in an equation (Alt+=), type \ne and press space.
  • Google Docs: Insert > Special characters and search “not equal,” or Insert > Equation and type \neq followed by a space.
  • Mac: besides the Option shortcut, the Character Viewer (Control+Command+Space) lists related math signs.
  • Excel filters and conditional formatting: the built-in “does not equal” option does the same job as <> without a formula.
  • Phones: neither iPhone nor Android has a default ≠ key. Copy it here or create a text replacement.

In math content, use the real ≠ rather than a stand-in like =/=, which screen readers announce as three separate symbols.

Frequently asked questions

How do I type the not equal sign on a Mac?

Press Option+Equals (Option+=).

How do I type ≠ on Windows?

In Word, type 2260 and press Alt+X. Elsewhere, copy it from this page; the short Alt codes don’t include it.

How do you write not equal in Excel?

Use <>, as in =A1<>B1. Excel formulas don’t accept ≠.

What does != mean?

It is the not-equal operator in most programming languages, the plain-text version of ≠.

Unicode data: Unicode Character Database 18.0.0 (unicode.org).

More symbols

All symbols · Copy and paste symbols · Emoji search