What ≠ means
The sign ≠ says two values are different: 3 + 4 ≠ 8. It is simply the equals sign with a slash through it. The equals sign itself goes back to the Welsh mathematician Robert Recorde, who introduced = in 1557 because, as he put it, no two things can be more equal than a pair of parallel lines.
≠ does not say which side is bigger. If you need that, use an inequality symbol such as < or >. Related negated signs include ≢ (not identical to, used for congruences such as 7 ≢ 2 (mod 3)) and ≉ (not almost equal, the negation of the approximately symbol ≈).
How to type the not equal sign
On a Mac, press Option + =. Windows has no classic Alt code for ≠, so copy it here, or in Microsoft Word type 2260 and press Alt + X. In Google Docs, use Insert > Special characters and search for "not equal".
In HTML, write ≠. In LaTeX, use \neq or \ne, and \not\equiv for ≢. Some coding fonts with ligatures draw != as a single ≠-like glyph, but the file still contains the two characters.
Not equal in code and spreadsheets
Programming languages do not accept ≠ as an operator, so each one spells it with plain keyboard characters. C, Java, JavaScript, Python and PHP use !=, and JavaScript and PHP add !== for a strict check that also compares types. SQL and Excel use <>, as in =IF(A1<>0, "has value", "empty"). Lua and MATLAB use ~=, and Haskell uses /=.
If you paste ≠ into an Excel formula, it will not work. Keep ≠ for documents, chats and notes, where it is shorter and clearer than !=. For the other comparison signs, see the math symbols list.