Squared Symbol (²)
The squared symbol ² is Unicode U+00B2, the superscript two for squares and square units. Press Copy to put it on your clipboard, or type it with Alt + 0178 on Windows.
- Unicode
U+00B2- HTML
²- Windows
Alt + 0178
How to type the squared symbol (²)
The quickest way is to press Copy above and paste. To type ² yourself, use the method for your device below. On Windows the alt code is Alt + 0178.
Windows
- Hold Alt and type 0178 on the numeric keypad, then release Alt. Num Lock must be on. This uses the Windows-1252 code page, so it works in almost every Windows app.
- Hold Alt and type 253 on the numeric keypad. This older code (from code page 437) works in Notepad, Word and most desktop apps.
- In Word or Outlook, type 00B2 and press Alt + X. Alt + X converts the hex code before the cursor into the character, and back again.
- Press Win + R, type charmap and press Enter. Tick “Advanced view”, search for Superscript Two, then Select and Copy. Character Map is built into every version of Windows.
Mac
- Press Control + Command + Space to open the Character Viewer, search for superscript two and double-click it.
- With the Unicode Hex Input keyboard enabled (System Settings → Keyboard → Input Sources), hold Option and type 00B2.
Linux & ChromeOS
- Press Ctrl + Shift + U, type b2, then press Enter or Space. Works in GTK and IBus apps (GNOME, Firefox, Chrome, LibreOffice) and on ChromeOS.
- Press your Compose key, then ^ 2. Needs a Compose key set in your keyboard settings.
iPhone & iPad
- Copy ² from this page, then go to Settings → General → Keyboard → Text Replacement and add it with a shortcut such as ;squa. The shortcut then turns into the symbol as you type, in every app.
Android
- In Gboard, long-press 2 on the ?123 page.
- Copy ² here, then open Gboard settings → Dictionary → Personal dictionary and add it with a shortcut.
Microsoft Word
- Type 00B2, then press Alt + X.
- Insert → Symbol → More Symbols. Set “from” to Unicode (hex), type 00B2 in “Character code” and click Insert.
Google Docs
- Insert → Special characters, then search for “superscript two” or draw it in the box.
Excel & Google Sheets
- Enter
=UNICHAR(178)in a cell. It works in Excel 2013 and later and in Google Sheets.
HTML
- Write
²or²in your HTML.
What does ² mean?
² is the superscript two, the exponent that means “squared”: 5² = 25. You will see it most often in units of area, such as m², km² and ft², and in formulas like E = mc² and a² + b² = c².
There are two ways to get a raised 2. One is the character ², which stays raised wherever you paste it: in a text message, a spreadsheet cell, a file name or a web form. The other is formatting an ordinary 2 as superscript in Word or HTML (<sup>2</sup>). Formatting is better for long or unusual exponents, but it disappears as soon as the text is copied into plain text. The character is the reliable choice for m² and similar units.
², ³ and ¹ are old Latin-1 characters with good font support and simple keyboard codes. The other superscript digits live in a different Unicode block, so in some fonts they sit at a slightly different height.
Common uses
- Area units: 120 m², 3 km², 400 ft²
- Formulas in plain text: E = mc², x² + y² = r²
- Spreadsheet headers and labels: “Price per m²”
Squared Symbol codes for HTML, CSS and programming
Every code below produces ². Use the HTML entity in web pages, the CSS escape in content, and the escape sequence in source code.
| Unicode code point | U+00B2 | |
|---|---|---|
| HTML entity (named) | ² | |
| HTML decimal | ² | |
| HTML hex | ² | |
| CSS content | content: "\B2"; | |
| JavaScript | "\u00B2" | |
| Python | "\u00B2" | |
| Python (by name) | "\N{SUPERSCRIPT TWO}" | |
| Java / C# | "\u00B2" | |
| LaTeX | ^2 | |
| UTF-8 bytes | C2 B2 | |
| UTF-16 | 00B2 | |
| URL encoded | %C2%B2 | |
| Windows Alt code | Alt + 0178 | |
| Alt code (CP437) | Alt + 253 |
² vs look-alike characters
These characters look similar to ² but have a different meaning and code. Pasting the wrong one can break search, sorting and screen readers.
| Char | Name | When to use it |
|---|---|---|
Subscript TwoU+2082 | Subscript two, for chemistry such as H₂O and CO₂. It sits below the line. | |
Digit TwoU+0032 | The ordinary digit 2 formatted as superscript. It looks the same but loses its position when pasted as plain text. | |
Superscript ThreeU+00B3 | Superscript three, for cubes and volumes (m³). |
Symbols similar to ²
Click to copy, or open a symbol for its codes. See the full superscript and subscript collection.
² character properties
- Official Unicode name
- SUPERSCRIPT TWO
- Also known as
- superscript two, power of two, to the power of 2, sup2
- Code point
- U+00B2
- Unicode block
- Latin-1 Supplement (U+0080–U+00FF)
- General category
- Other number (No)
- Added in
- Unicode 1.1 (1993)
- Plane
- Basic Multilingual Plane (0)
- Emoji
- No, it is a text symbol
Frequently asked questions
How do I type m² on a keyboard?
Type m, then the ² character: Alt + 0178 on Windows, or copy it from this page. On a Mac, use the Character Viewer (Control + Command + Space) and search for “superscript two”.
How do I square a number in Excel?
Use the caret: =A1^2, or =POWER(A1,2). The ² character is only for labels, not calculations.
What is the alt code for the squared symbol?
On Windows, hold Alt and type 0178 on the numeric keypad to get ². The shorter code Alt + 253 also works in most desktop apps. On a laptop without a keypad, copy it from this page or use 00B2 then Alt + X in Word.
How do I type the squared symbol on a Mac?
There is no single Option shortcut for ² on the US layout. Press Control + Command + Space to open the Character Viewer, search for “superscript two” and double-click it, or copy it from this page.
What is the HTML code for the squared symbol?
Use the named entity ² or the numeric reference ² (hex ²). All three display ² in every browser.
What is the Unicode for the squared symbol?
² is U+00B2, officially named SUPERSCRIPT TWO, in the Latin-1 Supplement block. It has been part of Unicode since version 1.1 (1993).