Not Equal Symbol (≠): How to Type, Copy, and Use It
The not-equal symbol, ≠, is an equals sign with a slash through it, meaning “is not equal to” — 2 + 2 ≠ 5. It’s the maths way to say two things are different. It isn’t on an English keyboard, so most people copy it or use a shortcut. This page has both, plus the part that trips people up: in code and spreadsheets, you don’t type ≠ at all — you use != or <>.
If you just need the symbol, copy ≠ (or ≈, approximately equal) from the grid below. If you want the shortcuts and how it works in code, the sections below cover both.
In a hurry?
- Copy it: click ≠ in the grid below.
- On Windows: hold Alt and type 8800.
- On a Mac: press Option + = (the equals key).
- In code: use != (most languages) or <> (SQL, Excel), not ≠.
- In HTML: write ≠ (or ≠).
Table of Contents
Copy and paste the not-equal symbol
The not-equal sign and its comparison cousins, with the codes you’re likely to need. Use the grid above to copy with one click; this table is the reference.
| Symbol | Name | Unicode | Windows | HTML |
|---|---|---|---|---|
| ≠ | not equal to | U+2260 | Alt + 8800 | ≠ |
| ≈ | approximately equal | U+2248 | Alt + 8776 | ≈ |
| ≤ | less than or equal | U+2264 | Alt + 8804 | ≤ |
| ≥ | greater than or equal | U+2265 | Alt + 8805 | ≥ |
The ≠ isn’t on a standard keyboard, so it takes a shortcut, a code, or a copy. The sections below cover each device, then the crucial difference between the maths symbol and what you type in code.
How to type the not-equal symbol on any device
Type ≠ on Windows

Use the Alt code: turn on Num Lock, hold Alt, and type 8800 on the numeric keypad for ≠. (This decimal code needs an app that supports it; if it fails, use the next method.) On a laptop with no keypad, press Windows + . for the symbol panel and search “not equal.”
Type ≠ on Mac

On a Mac, press Option + = (Option and the equals key) for ≠. It’s a single shortcut with no dead-key step, which makes the Mac the easiest place to type it — and easy to remember, since it’s the equals key with Option.
Type ≠ on iPhone and Android

On the symbols keyboard (123 then #+=), some keyboards include ≠; on others, press and hold the equals = key to reveal it. If it’s not there, copy ≠ from the grid above, or add a maths keyboard.
Type ≠ in Microsoft Word

Type 2260 then press Alt + X to convert the code into ≠. Or use Insert → Symbol, where ≠ sits among the mathematical operators. In the equation editor (Alt + =), \ne gives ≠.
Type ≠ on Linux

Press Ctrl + Shift + U, type 2260, then Enter. That Unicode input works in most GTK and Qt apps.
Add ≠ in HTML and CSS
In HTML, ≠ is ≠ or the numeric ≠. In CSS, a ≠ in a content value is the escaped code point \2260.
≠ in code: use != or <>, not the ≠ character
This is the part most people actually need: in programming, you never type the ≠ character. Every language has its own text version, and pasting the real ≠ symbol into code is a syntax error. The most common form is != (an exclamation mark, meaning “not,” plus equals), used in JavaScript, Python, C, Java, PHP, and most modern languages: if (a != b).
But it isn’t universal. SQL and older BASIC use <> (less-than, greater-than — “either side, so not equal”). Some languages, like Lua, use ~=, and a few (Fortran, Ada) use /=. So before you write “not equal” in code, check which your language wants. What they all share is that the operator is typed from keyboard characters — the ≠ glyph is only ever for display, in text, maths, or a comment.
| Operator | Used in |
|---|---|
| != | JavaScript, Python, C, Java, PHP |
| <> | SQL, Excel, older BASIC |
| ~= | Lua |
| /= | Fortran, Ada, Haskell |
≠ in Excel and spreadsheets: the <> operator
Spreadsheets are the place this catches people out most. In Excel and Google Sheets, “not equal to” is <>, not ≠. So to check whether two cells differ, you write =A1<>B1, which returns TRUE when they’re different. Inside an IF, it’s =IF(A1<>B1, "different", "same").
Typing the actual ≠ character into a formula gives an error, because the spreadsheet doesn’t recognise it as an operator. The <> also works in conditional formatting and filters (“does not equal”). If you only want to display a ≠ in a cell as text, that’s fine — but any comparison the spreadsheet has to evaluate uses <>.
The slash means ‘not’: a family of negated symbols
Here’s a pattern that makes a whole set of maths symbols easy to read: a slash through a symbol negates it. The ≠ is just = with a slash, meaning “not equal.” The same trick builds a family:
≈ (approximately equal) becomes ≉ (not approximately equal) with a slash; ≡ (identical to) becomes ≢ (not identical); ∈ (is an element of a set) becomes ∉ (is not an element); ∃ (there exists) becomes ∄ (there does not exist); and ⊂ (subset of) becomes ⊄ (not a subset). Once you see the slash as “not,” you can read a symbol you’ve never met — whatever it normally means, the slashed version means the opposite.
| Symbol | Means | Slashed | Means |
|---|---|---|---|
| = | equal | ≠ | not equal |
| ≈ | approximately | ≉ | not approximately |
| ∈ | is in the set | ∉ | not in the set |
| ∃ | there exists | ∄ | none exists |
≠ vs ≈, ≤, and ≥: the comparison family
The ≠ belongs to a small family of comparison signs that say how two quantities relate, and they’re worth keeping straight. The ≠ says they’re simply different. The ≈ says they’re close but not exact (π ≈ 3.14). The ≤ and ≥ say one is at most or at least the other (x ≤ 10 means x is 10 or less).
These turn up constantly in everyday maths, spreadsheets, and search filters, and each has its own code and shortcut. The full set of comparison and relation signs, with their Alt codes, is in the [math symbols Alt codes](/math-symbols-on-keyboard-alt-codes/) reference — ≠ is the negative of the most basic relation of all: equality.
Where the equals sign came from (and the slash that cancels it)
The ≠ is only as old as the = it negates, and the equals sign has a known inventor. In 1557, the Welsh mathematician Robert Recorde introduced = in a book of algebra, tired of writing “is equal to” over and over. He chose two parallel lines because, in his words, no two things could be more equal — a small piece of poetry baked into a symbol we use every day.
The not-equal sign simply takes Recorde’s parallel lines and strikes them through. It’s the same logic as any negated symbol: draw the thing, then cancel it with a slash. So ≠ carries a 450-year-old idea — “as equal as two parallel lines” — with a line drawn across to say “but not here.”
≠ in URLs and encoding
In a URL, ≠ is percent-encoded as %E2%89%A0 (its three UTF-8 bytes). In code, when you need the character in a string, the escape is \u2260 in JavaScript, Java, JSON, and Python. If ≠ ever shows as garbled characters or a box, the page is being read in the wrong encoding — serve it as UTF-8 and it renders correctly.
Copy-paste HTML codes
Every code for the not-equal sign and its comparison cousins in one place. Click a cell and copy.
| Symbol | Named entity | Numeric entity | URL (percent) code |
|---|---|---|---|
| ≠ | ≠ | ≠ | %E2%89%A0 |
| ≈ | ≈ | ≈ | %E2%89%88 |
| ≤ | ≤ | ≤ | %E2%89%A4 |
| ≥ | ≥ | ≥ | %E2%89%A5 |
In a CSS content value, use \2260 for ≠. For the full set of operators, see the [math symbols Alt codes](/math-symbols-on-keyboard-alt-codes/) reference; for the plus-minus sign, the [plus-minus symbol](/plus-minus-symbol/) guide.
Troubleshooting
My ≠ shows as a box or garbled text
That’s an encoding mismatch: the UTF-8 bytes for ≠ are being read as an older encoding. Set the file, database, and page charset to UTF-8 and ≠ displays correctly.
My ≠ won’t work in Excel or code
The ≠ character isn’t a valid operator. In Excel use <> (e.g. =A1<>B1); in most programming languages use !=. The ≠ glyph is for display only.
Alt + 8800 isn’t working
That decimal code needs app support and sometimes a registry setting. If it fails, type 2260 then Alt + X in Word, use Option + = on a Mac, or copy ≠ from the grid above.
FAQ
How do I type the not-equal symbol?
On Windows, hold Alt and type 8800. On a Mac, press Option + = (the equals key). In Word, type 2260 then Alt + X. In HTML, write ≠. Or click ≠ in the grid above.
How do I write not-equal in code?
Use your language’s text operator, not ≠: != in JavaScript, Python, C, Java, and PHP; <> in SQL and Excel; ~= in Lua. The ≠ character causes a syntax error.
What is not-equal in Excel?
It’s the <> operator. To test whether two cells differ, write =A1<>B1, or inside a formula =IF(A1<>B1, ...). Typing the ≠ character gives an error.
Why does a slash mean ‘not’?
In maths, drawing a slash through a symbol negates it. ≠ is = with a slash; ∉ is “is in the set” with a slash; ∄ is “there exists” with a slash. The slash always means the opposite of the original.
How do I write ≠ in HTML?
Use ≠ or ≠. In a URL, ≠ is percent-encoded as %E2%89%A0.
