Math
How to type Superscript two (²)
Copy the character, or use the shortcut that matches your keyboard and app.
Windows
Hold Alt and type 0178 on the numeric keypad.
Mac
Character Viewer → superscript
Microsoft Word
Type 00B2 then Alt + X
Google Docs
Insert → Special characters → squared
How to insert it
Copy
Click the keycap, then paste with Ctrl+V or Cmd+V.
Alt code
Num Lock on, hold Alt, type 0178, release Alt.
Code
Use the Unicode, HTML, CSS, or JS value below in documents and stylesheets.
- Unicode
U+00B2- HTML decimal
²- HTML hex
²- CSS
\00B2- JavaScript
\u{00B2}- Alt code
Alt + 0178
Related
About the Superscript two
The Superscript two (², U+00B2) the superscript two: x² means x times itself. You'll see it in area units like m².
Mathematical symbols live or die by precision — a lookalike won't do. These get typed constantly in school documents, spreadsheets, and technical writing, which is why the Alt code and Unicode value in the reference table are worth memorizing.
If you type ² regularly, stop copying it. On Windows, hold Alt and type 0178 on the numeric keypad. On a Mac, press Control+Command+Space to open the Character Viewer and find it instantly. In Word, type b2 and press Alt+X. The full code list is in the reference table below.
In Unicode it lives in the Latin-1 Supplement block, so it behaves the same everywhere Unicode is supported — which today means virtually every device, app, and browser. Related symbols: Pi, Infinity, Plus-minus.
Superscript two quick reference
| Symbol | ² |
|---|---|
| Name | Superscript two |
| Unicode | U+00B2 |
| Alt code | Alt + 0178 |
| HTML decimal | ² |
| HTML hex | ² |
| HTML entity | ² |
| CSS | \00B2 |
| JavaScript | \u00B2 |
| URL encoded | %C2%B2 |
Compatibility: Displays correctly on iPhone, Android, Windows and Mac.
How to type ² on your phone
iPhone / iPad
iPhones have no Alt codes. The fastest way is to copy the symbol above and paste it where you need it. To reuse it often, save it as a text replacement: go to Settings → General → Keyboard → Text Replacement, tap +, paste the symbol into Phrase and give it a Shortcut.
Android
On Gboard, tap ?123 then =\< to open the symbols keyboard — many symbols hide under a long-press on related keys. Otherwise just copy the symbol above and paste it; it works in every app.