Skip to content
How to Type Symbols

How to Type ² and ³ (Squared and Cubed Symbols)

How to type ² and ³ on Windows, Mac, Word, Excel, phones and the web — and why the real Unicode characters beat superscript formatting when text has to travel.

By SymbolHeroUpdated 7 min read

Quick answer: On Windows, hold Alt and type 253 on the numeric keypad for ² — Alt + 0178 gives the same character — and Alt + 0179 for ³. There is no standard Mac Option shortcut for either one, so use the Character Viewer or copy them here:

²Superscript Two (Squared)U+B2Details
³Superscript Three (Cubed)U+B3Details

Before the methods, one distinction decides which approach you should use. Superscript formatting (the kind you get from a toolbar button) and the superscript characters ² and ³ are not the same thing, and they behave very differently once text leaves the document it was written in.

Real characters vs superscript formatting

² (U+00B2) and ³ (U+00B3) are ordinary Unicode characters. They are text, exactly like the letter A. Type m² and you have two characters: m and ².

Superscript formatting takes a normal digit 2 and raises and shrinks it visually. The underlying character is still a plain 2; only its styling changed. That styling lives in the document’s formatting layer.

The practical consequence: formatted superscript does not survive plain text. Copy a formatted m2 into a filename, a chat message, a form field, a CSV file, an email subject line, a code editor or a spreadsheet cell and it becomes m2 — visibly wrong and, in a measurement, misleading. The real character ² survives all of those intact.

Real character ² Formatted superscript
Survives copy to plain text Yes No
Works in file names, URLs, chat Yes No
Available for any digit Only 0–9 and a few letters Yes, any character
Scales with the font Fixed design in the font Yes
Right for x², CO₂, chemical formulas in prose Usually yes In a typeset equation, yes

Rule of thumb: use the real characters for units and short expressions that need to travel (m², km³, 10³), and use formatting inside a document where the styling is part of the typesetting and nothing will be copied out as plain text.

Type ² and ³ on Windows

  1. Turn Num Lock on.
  2. Hold Alt.
  3. Type the code on the numeric keypad.
  4. Release Alt.
Character Name Unicode Alt codes HTML
¹ Superscript one U+00B9 Alt + 0185 ¹
² Superscript two U+00B2 Alt + 253 or Alt + 0178 ²
³ Superscript three U+00B3 Alt + 0179 ³
ⁿ Superscript small n U+207F Alt + 252 none

Note that ² has two codes — 253 from the old DOS code page 437, 0178 from Windows-1252 — while ³ has only the Windows-1252 code 0179. The leading zero is part of the code, not decoration, so never add or remove one. Our guide to Alt codes covers the two code pages, and the Alt code finder tells you whether a given character has a code at all.

Superscript digits 4 through 9 (⁴⁵⁶⁷⁸⁹) have no Alt codes. Neither do the subscripts ₀₁₂₃. For those, use the emoji and symbol panel (Windows + ., then the Symbols tab), Character Map, or copy them from the superscript and subscript category.

Type ² and ³ on a Mac

There is no standard Option-key shortcut for ² or ³ on macOS, which surprises people who are used to ° (Option + Shift + 8) having one. Your options:

  • Character Viewer: press Control + Command + Space, search for “superscript two”, and double-click the result. Add it to Favorites and it stays one click away.
  • Text replacement: in System Settings > Keyboard > Text Input > Text Replacements, add ² as the replacement for a short trigger such as sq2. It then works in every app and syncs to your iPhone.
  • Copy it from the buttons at the top of this page.

Our guide to typing special characters on a Mac covers the Character Viewer and Option-key layout in more depth.

Microsoft Word

Word supports both approaches, and the difference matters here more than anywhere else.

The real characters

Type 00B2 and press Alt + X to turn the code into ²; 00B3 gives ³. Alt codes work too, and so does Insert > Symbol > More Symbols with the subset set to Latin-1 Supplement. Full details are in our guide to inserting symbols in Microsoft Word.

Superscript formatting

Ctrl + Shift + + toggles superscript on and off: turn it on, type your digit, then turn it off again. Word’s AutoFormat separately raises the letters in ordinals such as 1st and 2nd, which is the same formatting mechanism applied automatically.

A quirk worth knowing: Word’s AutoCorrect converts a typed 2 after certain units into ² in some configurations, which is why a document sometimes contains a mixture of real characters and formatted digits. If a document behaves inconsistently in find-and-replace, that mixture is usually why — searching for 2 will not find a ², and searching for ² will not find a formatted 2.

Google Docs

Ctrl + . (or Cmd + . on a Mac) toggles superscript formatting. For the real characters, use Insert > Special characters and search for “superscript two”, or draw the shape in the sketch box. See inserting special characters in Google Docs.

Excel and Google Sheets

Spreadsheets have a hard limitation: superscript formatting only applies to text cells. If a cell contains a number or a formula, Excel will not keep character-level formatting on part of it. So for a label like Area (m²) the real Unicode character is the only reliable option.

  • In Excel on Windows, type the Alt code directly while editing the cell.
  • Use a formula: =UNICHAR(178) returns ², =UNICHAR(179) returns ³. Those are the decimal values of U+00B2 and U+00B3.
  • Build a label with concatenation: ="Area ("&UNICHAR(178)&")".
  • In Google Sheets there is no special-characters menu; use =UNICHAR(178) or paste the character.

For the exponent in an actual calculation, none of this applies — use the ^ operator or the POWER function. =A1^2 squares a value; ² is only ever display text.

iPhone and Android

Neither platform guarantees a long-press route to ² and ³. Some Android keyboards, including certain Gboard layouts, offer superscript digits when you press and hold a number on the symbols keyboard, but this varies by keyboard app and version, so do not count on it.

The reliable method on iPhone is Settings > General > Keyboard > Text Replacement: tap +, paste ² into the Phrase field, and set a shortcut such as sq2. Typing the shortcut then inserts the real character in any app. Android offers a comparable personal dictionary feature in the keyboard settings. Our guide to typing symbols on iPhone and Android walks through the setup.

In HTML and CSS

Character Named entity Decimal Hexadecimal
¹ ¹ ¹ ¹
² ² ² ²
³ ³ ³ ³

HTML also has a formatting route — the sup element — which is the correct choice for genuine mathematical or footnote superscripts, because it is semantic and works for any content, not just the handful of digits Unicode provides. Use the characters for units like km² in running text, and the element for expressions like x raised to n. All three superscript digits have genuine named entities, so any of the three forms above is safe to use.

Why it isn’t working

  • The Alt code produced nothing. Num Lock is off, or you used the number row instead of the keypad.
  • You got a different character. Check the leading zero: Alt + 178 and Alt + 0178 are not the same.
  • Your superscript disappeared when pasting. It was formatting, not a character. Use ² instead.
  • Find-and-replace cannot locate it. A real ² and a formatted 2 are different text. Search for whichever one the document actually contains — the Unicode lookup tool will tell you which by showing every code point in a pasted string.
  • It renders as a box. Rare for ² and ³, which appear in almost every font, but it points to a font without Latin-1 coverage.
  • Searching your site for “m2” misses “m²”. Search engines and find-in-page often do not treat them as equivalent. For anything that must be findable both ways, mention both spellings.

Every superscript and subscript character, including ⁴–⁹ and ₀–₉, is listed in the superscript and subscript category, and you can search the whole library in the symbol finder. For related guides, see how to type the degree symbol and common math symbols and their meanings.

Frequently asked questions

What is the Alt code for the squared symbol?

Alt + 253 or Alt + 0178, typed on the numeric keypad with Num Lock on. Both give ² (U+00B2). For ³, use Alt + 0179.

Is there a Mac shortcut for ² and ³?

No standard Option-key shortcut exists for either. Use the Character Viewer (Control + Command + Space), set up a text replacement, or copy the character.

Should I use ² or superscript formatting?

Use ² whenever the text may be copied elsewhere — units, file names, spreadsheet labels, web copy, chat. Use superscript formatting inside a document for equations and for exponents that are not 0–9, since Unicode has no superscript characters for arbitrary content.

Why can superscript formatting only go on some Excel cells?

Excel applies character-level formatting to text, not to numbers or formula results. A cell holding a number cannot show part of itself as superscript, which is why ² as a real character is the practical answer for labels.

Are ² and the superscript zero the same as the degree sign?

No. The degree sign (°, U+00B0) is a separate character designed to sit at cap height for temperatures and angles. Superscript zero is a digit. Using one for the other looks wrong at larger sizes and breaks search.

Need a different symbol?

Search 7,503 symbols by name, everyday word or code point, and copy any of them in one tap.