Not Equal Sign (≠): How to Type the Does Not Equal Symbol — Complete Guide
The not equal sign — written ≠ in math and rendered as !=, <>, ~=, or /= in different programming languages — is one of the most-used inequality symbols anywhere in computing. This guide covers every way to type it, paste it, encode it, and use it as an operator: across Windows, macOS, Linux, Chromebook, iOS, and Android; inside Word, Excel, Google Docs, and LaTeX; and in 20+ programming languages with their exact syntax.
Copy the not equal sign
If you just want the symbol, here it is:
≠Triple-click the box above to select, then copy. Useful Unicode metadata:
| Property | Value |
|---|---|
| Unicode code point | U+2260 |
| Decimal | 8800 |
| UTF-8 | E2 89 A0 |
| UTF-16 | 2260 |
| HTML entity (named) | ≠ |
| HTML entity (numeric) | ≠ |
| HTML entity (hex) | ≠ |
| CSS escape | \2260 |
| LaTeX | \neq or \ne |
| Official Unicode name | NOT EQUAL TO |
| Block | Mathematical Operators |
Quick reference: every way to type ≠
| Where you are | How to type ≠ |
|---|---|
| Windows (anywhere) | Hold Alt + type 8800 on the number pad |
| Windows (no num pad) | Type 2260 then press Alt+X in Word, or use the emoji panel Win+. |
| macOS | Option+= |
| Linux (compose key) | Compose = / |
| Linux (GNOME/Wayland) | Ctrl+Shift+U, then type 2260, then Enter |
| Chromebook | Ctrl+Shift+U, then 2260, then Enter |
| iOS | Long-press = on the math keyboard, or paste from Safari |
| Android (Gboard) | Switch to ?123, then =<, long-press = |
| Microsoft Word | Type 2260 then Alt+X, or Ctrl++ then 2260 |
| Excel / Google Sheets formula | Use <> as the operator (e.g. =A1<>B1) |
| HTML | ≠ or ≠ |
| LaTeX | \neq (or \ne) |
| Markdown | Paste ≠ directly, or use the HTML entity |
How to type ≠ on Windows
Method 1: Alt code (fastest if you have a number pad)
- Make sure Num Lock is on.
- Hold Alt and type
8800on the numeric keypad. - Release Alt. The ≠ appears.
This works in most Windows applications including Notepad, Outlook, Slack, Discord, and browsers. It does not work using the number row at the top of the keyboard — only the dedicated number pad.
Method 2: Windows emoji and symbol panel
Press Win+. (Windows key + period) to open the emoji panel. Click the Ω symbols tab, choose Math Symbols, and click ≠. Works on any laptop without a number pad.
Method 3: Character Map
Press Win, type Character Map, open it, search for "not equal", select ≠, click Copy, then paste.
Method 4: AutoHotkey (if you type ≠ often)
::neq::≠With this hotstring loaded, typing neq followed by space auto-replaces with ≠.
How to type ≠ on macOS
The shortcut on every Mac keyboard is:
Option+=
That's the equals key (the one to the left of Delete), held with the Option (⌥) key. Works in every macOS app — TextEdit, Pages, Notes, Safari, Slack, VS Code.
If the shortcut is intercepted by the active app, open Edit → Emoji & Symbols (or press Ctrl+Cmd+Space), search for not equal, double-click the ≠ to insert.
For frequent use, set up a Text Replacement: System Settings → Keyboard → Text Replacements. Add :neq: → ≠. After that, typing :neq: anywhere on macOS or iOS (when iCloud sync is on) inserts ≠.
How to type ≠ on Linux
Compose key
If you've enabled a Compose key (typically Right-Alt, Right-Win, or Caps Lock):
Compose = / → ≠
To enable a Compose key on GNOME: Settings → Keyboard → Compose Key. On KDE: System Settings → Keyboard → Advanced → Position of Compose key.
Ctrl+Shift+U Unicode entry
In any GTK or Qt-based app (which is most of them), hold Ctrl+Shift+U, type 2260, and press Enter or release the keys.
xmodmap or .XCompose
For more permanent bindings, add a line like this to ~/.XCompose:
<Multi_key> <equal> <slash> : "≠"Chromebook / ChromeOS
ChromeOS supports the same Unicode hex input as Linux:
- Hold Ctrl+Shift+U.
- You'll see an underlined
u. - Type
2260. - Press Enter or Space.
Alternative: copy ≠ from this page, then use Right-click → Paste wherever you need it.
iOS and iPadOS
The default Apple keyboard does not expose ≠ directly. Three reliable options:
- Set up a Text Replacement. Settings → General → Keyboard → Text Replacement → add
≠as the phrase and:neq:as the shortcut. Now typing:neq:anywhere replaces with ≠. - Use the Emoji keyboard's symbols. Some third-party keyboards expose math symbols directly.
- Copy/paste from this page.
Android
On Gboard (Google's keyboard, default on most Android phones):
- Tap
?123to open the symbols layer. - Tap
=<to open the secondary symbols. - Long-press =; ≠ appears as one of the alternates.
On SwiftKey, the path is similar: symbols → secondary symbols → long-press =.
For everyday use, set up a clip on Gboard: tap the clipboard icon, paste ≠, pin it. It now stays one tap away.
Microsoft Word
Word has more ways to insert ≠ than any other application, because of how often it shows up in technical docs.
- Math AutoCorrect: Type
\neqand press Space — Word converts it to ≠. Enable under File → Options → Proofing → AutoCorrect Options → Math AutoCorrect, including outside math regions. - Unicode shortcut: Type
2260, then press Alt+X. - Insert → Symbol: Insert → Symbol → More Symbols, change subset to Mathematical Operators, double-click ≠.
- Equation editor: Alt+= opens the equation editor, then type
\neq.
Excel, Google Sheets, and Apple Numbers
In spreadsheet formulas the not-equal operator is <>, not ≠. The Unicode glyph is purely cosmetic in this context.
=IF(A1<>B1, "different", "same")
=COUNTIF(A:A, "<>0")
=SUMPRODUCT((A2:A100<>"")*1)If you want the literal ≠ glyph in a cell label or chart title, paste it as text — the operator stays <>.
Google Docs and Notion
Both support direct Unicode paste. In Google Docs, also Insert → Special characters, search "not equal".
For Notion, the slash command /equation opens a LaTeX block where \neq renders as ≠.
HTML, CSS, and the web
You have three encodings for the not-equal sign in HTML:
| Form | Code |
|---|---|
| Named entity | ≠ |
| Decimal numeric reference | ≠ |
| Hex numeric reference | ≠ |
All three render as ≠. The named entity ≠ is shortest and well-supported in every browser since IE6.
In CSS, especially in content: for pseudo-elements, escape the code point:
.no-match::before {
content: "\2260 ";
}Note the trailing space after \2260 — without it, the parser would consume the next hex digit if there is one.
LaTeX and math typesetting
The standard command is \neq (or its alias \ne):
$x \neq y$
$5 \ne 7$Related negations available via the amssymb package:
| Symbol | LaTeX | Meaning |
|---|---|---|
| ≠ | \neq / \ne | not equal |
| ≢ | \not\equiv | not identically equal / not congruent |
| ≇ | \ncong | not approximately equal |
| ≢ | \nequiv | not equivalent (alt) |
| ≮ | \nless | not less than |
| ≯ | \ngtr | not greater than |
| ≰ | \nleq | not less than or equal |
| ≱ | \ngeq | not greater than or equal |
| ∉ | \notin | not an element of |
| ⊄ | \not\subset | not a subset of |
Not equal in 20+ programming languages
This is the section most general "how to type ≠" guides skip. Here is the complete operator-by-operator matrix.
| Language | Operator | Notes |
|---|---|---|
| Python | != | <> existed in Python 2; removed in Python 3. |
| JavaScript / TypeScript | != (loose), !== (strict) | Always prefer !== — != does type coercion. |
| Java | != | For object equality, use !a.equals(b). |
| C / C++ | != | Pointer comparison vs value comparison are different. |
| C# | != | Operator can be overloaded for value types. |
| Go | != | Slices/maps/funcs can only be compared to nil. |
| Rust | != | Requires the PartialEq trait. |
| Swift | != | !== exists for reference identity on classes. |
| Kotlin | != (structural), !== (referential) | Mirrors Swift. |
| Ruby | != | Implemented via ==; can be overridden. |
| PHP | != or <> (loose), !== (strict) | Strict avoids type juggling. |
| Perl | != (numeric), ne (string) | Mixing them silently produces wrong answers. |
| SQL (ANSI) | <> | != works in MySQL, PostgreSQL, SQLite, MSSQL, Oracle as a non-standard alias. |
| SQL (NULL-safe) | IS DISTINCT FROM | Postgres / SQL standard. Treats NULL as a value. |
| Bash / Zsh | != (string), -ne (numeric) | [[ "$a" != "$b" ]] vs [ "$x" -ne "$y" ]. |
| R | != | For vectors returns a logical vector; use !identical(a, b) for full equality. |
| MATLAB / Octave | ~= | != is not valid. |
| Lua | ~= | Same as MATLAB. |
| Haskell | /= | Defined in the Eq typeclass. |
| OCaml / F# | <> | != exists but means physical inequality. |
| Pascal / Delphi | <> | Standard since the original Pascal. |
| Fortran | /= or .NE. | .NE. is the legacy form. |
| Scheme / Common Lisp | (not (= a b)) or /= | Lisp uses prefix notation. |
| VB.NET / VBA | <> | Used in Excel macros too. |
| Excel formula | <> | String comparisons are case-insensitive. |
The classic gotchas
- JavaScript:
0 != "0"isfalse— they're considered loosely equal. Use!==. - Python:
NaN != NaNisTrue. So isfloat("nan") == float("nan")beingFalse. Usemath.isnan(). - SQL:
NULL <> NULLisNULL, notTRUE. To treat NULL as a value, useIS DISTINCT FROM(Postgres) or wrap inCOALESCE. - Java:
"foo" != "foo"is sometimes false because of string interning, sometimes true if one of them was created withnew String("foo"). Always use.equals()for strings. - Perl:
"abc" != "xyz"isfalsebecause!=coerces both to 0. Usenefor strings.
Why does != sometimes look like ≠?
Modern programming fonts — Fira Code, JetBrains Mono, Cascadia Code, Iosevka, Monoid — use OpenType ligatures to render != as a single ≠ glyph. The underlying source is still two characters (! and =); only the rendering changes. Editors using these fonts include VS Code (with "editor.fontLigatures": true), JetBrains IDEs, and most modern terminals.
If you're staring at a screenshot and can't tell whether the source has != or a literal ≠, check the file itself — ligatures are display-only.
What ≠ actually means in math
The not-equal sign asserts that two expressions denote different values. It is the negation of the equals sign (=), introduced by Robert Recorde in 1557 in The Whetstone of Witte.
The exact phrasing of an inequality depends on what you're saying:
| Symbol | Reads as | Example |
|---|---|---|
| ≠ | "is not equal to" | 5 ≠ 7 |
| < | "is strictly less than" | 3 < 5 |
| > | "is strictly greater than" | 9 > 4 |
| ≤ | "is less than or equal to" | x ≤ 10 |
| ≥ | "is greater than or equal to" | n ≥ 1 |
| ≈ | "is approximately equal to" | π ≈ 3.14 |
| ≡ | "is identically equal to" | (a + b)² ≡ a² + 2ab + b² |
| ≢ | "is not identically equal to" | |
| ∝ | "is proportional to" | F ∝ a |
Frequently asked questions
What is the difference between ≠ and !=?
None — they mean the same thing. ≠ is the typographic Unicode glyph used in math and prose. != is the ASCII operator used in most programming languages. Some editors render != as ≠ via ligatures, but the underlying source is two ASCII characters.
What is the Alt code for the not equal sign on Windows?
Alt+8800. You must use the numeric keypad with Num Lock on. The number row at the top of a normal keyboard does not work.
How do I type ≠ on a Mac?
Option+=. That's the equals key with the Option (⌥) modifier.
Is there a not equal symbol on the iPhone keyboard?
Not by default. Set up a Text Replacement under Settings → General → Keyboard → Text Replacement mapping :neq: (or any shortcut you like) to ≠.
Why does != not work in Excel?
Excel's not-equal operator is <>, not !=. Use =IF(A1<>B1, "different", "same").
What's the HTML code for the not equal sign?
Three options, all rendering as ≠: ≠ (named entity), ≠ (decimal), or ≠ (hex).
Why is NaN != NaN true in JavaScript and Python?
By IEEE 754 specification, NaN is not equal to anything — including itself. Use Number.isNaN() in JS or math.isnan() in Python to test for NaN.
What is the LaTeX command for ≠?
\neq or its alias \ne. For "not approximately equal" use \ncong; for "not identically equal" use \not\equiv (load amssymb for the wider set).
Is <> the same as != in SQL?
Yes, in every major dialect (PostgreSQL, MySQL, SQL Server, Oracle, SQLite). <> is the ANSI SQL standard; != is a non-standard alias accepted by all of them. Note that neither matches NULL values — use IS DISTINCT FROM for NULL-aware comparison.
Can I make my keyboard always type ≠ when I press !=?
Yes, via macros: AutoHotkey on Windows, Karabiner on macOS, or .XCompose on Linux. But it's rarely worth it — most code is ASCII-only.
Hire engineers who get the small details right
The not-equal operator is a small example of the kind of low-level fluency that separates a competent engineer from a great one. NaN semantics, NULL-aware comparisons, type coercion in JavaScript, string vs reference equality in Java — these are the gotchas that ship to production when teams move fast.
Codersera matches you with vetted remote developers who have shipped production code in your stack. Every developer is technically interviewed, reference-checked, and ready to extend your engineering team — with a risk-free trial period to make sure the technical fit is right.