Symbols

How to Type the Squared Symbol (²) and Cubed (³): Alt Codes 0178 and 0179

Type the squared symbol ² with Alt+0178 and cubed ³ with Alt+0179 on Windows. Copy ² and ³ here, plus Mac, iPhone, Android, Word, Excel and HTML methods.

By Blame Media Pty Ltd Updated Nov 16, 2026 5 min read

Copy the symbols in this guide

Copy them here: ² and ³ (for example a², x², m² and m³). On Windows, ² is Alt+0178 and ³ is Alt+0179 on the numeric keypad.

Quick answer

Platform Squared ² Cubed ³
Windows (numpad) Alt+0178 or Alt+253 Alt+0179
Mac Character Viewer (Control+Command+Space), search ‘superscript’ Same
iPhone / iPad Copy and paste, or a text replacement Same
Android Long-press 2 on some keyboards, or copy Long-press 3 on some keyboards, or copy
Microsoft Word Type 00B2, then Alt+X Type 00B3, then Alt+X
Excel / Google Sheets =UNICHAR(178) =UNICHAR(179)
Google Docs Insert > Special characters, search ‘superscript’ Same
HTML ² ³
Unicode U+00B2 U+00B3

For a dedicated copy page, see the squared symbol and the cubed symbol.

Windows: Alt codes for squared and cubed

  1. Turn on Num Lock.
  2. Click where you want the symbol.
  3. Hold Alt and type 0178 on the numeric keypad for ², or 0179 for ³.
  4. Release Alt. The symbol appears.

The number keys above the letters do not work for Alt codes. You must use the numeric keypad.

Other superscript digits

Symbol Name Alt code
¹ Superscript one Alt+0185
² Superscript two Alt+0178 (or Alt+253)
³ Superscript three Alt+0179
ⁿ Superscript n Alt+252
⁴ and higher Superscript four and up No short Alt code

Codes with a leading zero (0178, 0179, 0185) use the Windows-1252 character set. Codes without it (253, 252) use the older CP437 set. There is no CP437 code for ³. For ⁴ and higher, use Word’s Alt+X method below or copy the character.

Emoji and symbol panel

No numpad? Press Windows key + . (period) to open the emoji panel, choose the Symbols tab (the Ω icon), and browse the symbol groups for ² and ³. Copy and paste also works everywhere.

Mac: Character Viewer or text replacement

The US keyboard layout has no Option shortcut for ² or ³. Use one of these instead.

Character Viewer

  1. Click where you want the symbol.
  2. Press Control+Command+Space (or Fn+E / the globe key on newer Macs).
  3. Type superscript in the search box.
  4. Double-click ² or ³ to insert it.

Text replacement (fastest for daily use)

  1. Open System Settings > Keyboard, then click Text Replacements under Text Input (older macOS: System Preferences > Keyboard > Text).
  2. Click +.
  3. In Replace, type a short code such as sq2. In With, paste ².
  4. Repeat with cu3 and ³.

Now typing sq2 followed by a space turns into ². Text replacements sync to your iPhone and iPad through iCloud.

iPhone and iPad

The standard iOS keyboard does not show ² when you hold down the 2 key. Two reliable options:

  1. Copy and paste ² or ³ from this page.
  2. Set up a text replacement: go to Settings > General > Keyboard > Text Replacement, tap +, paste ² as the Phrase and enter a Shortcut such as sq2. Do the same for ³.

After that, typing sq2 in any app offers ² in the suggestion bar.

Android

  1. Open the number row or the ?123 layout.
  2. Long-press 2. Some keyboards show ² and other variants. Slide to it and release.
  3. Long-press 3 for ³.

If your keyboard shows nothing on long-press, copy the symbol from this page. Most keyboards also support a personal dictionary or shortcut feature you can use like text replacement.

Microsoft Word

Alt+X (Unicode)

  1. Type 00B2.
  2. Press Alt+X. It converts to ².
  3. For ³, type 00B3 then Alt+X.
  4. For ⁴, type 2074 then Alt+X.

If the code follows a letter or number, such as m00B2, Word may read the letters as part of the code. Type the code first, convert it, then go back and add the letter.

Alt codes in Word

Alt+0178 and Alt+0179 work in Word the same way as elsewhere in Windows.

Insert Symbol

Go to Insert > Symbol > More Symbols, set the subset to Latin-1 Supplement, select ² or ³, and click Insert.

Superscript formatting

Select a normal 2 and press Ctrl+Shift+= on Windows to make it superscript. This is formatting, not a separate character (see the difference below). For exponents like x¹⁰ or equations, see how to do exponents in Word and Excel.

Excel and Google Sheets

  • =UNICHAR(178) returns ².
  • =UNICHAR(179) returns ³.
  • To join it with text: =A1&UNICHAR(178) turns 25 m into 25 m² if A1 holds that text.

You can also type the symbol straight into a cell with Alt+0178 or Alt+0179 on Windows, or paste it. Note that a cell containing m² is text. To actually calculate a square, use =A1^2.

Google Docs

  1. Click Insert > Special characters.
  2. Type superscript in the search box.
  3. Click ² or ³ to insert it.

On Windows, the Alt codes also work directly in Google Docs.

HTML, CSS and JavaScript

Use Squared Cubed
Named entity ² ³
Numeric entity ² ³
CSS content '\00B2' '\00B3'
JavaScript string '\u00B2' '\u00B3'
Superscript tag <sup>2</sup> <sup>3</sup>

Use the entity for units like m² in running text. Use <sup> when you need any exponent, such as x<sup>10</sup>.

The ² character vs superscript formatting

The ² character is a real Unicode symbol. It survives copy and paste, so m² stays m² in a text message, email, social post, file name or spreadsheet cell.

Superscript formatting shrinks and raises an ordinary 2. It only exists in apps that support formatting, like Word, Google Docs or HTML. Paste it into a plain text field and it becomes a normal 2, so m² turns into m2.

Rule of thumb: use the ² and ³ characters for units and short labels. Use superscript formatting for math with larger or mixed exponents.

Troubleshooting

  • Nothing happens with Alt codes: turn on Num Lock and use the numeric keypad, not the top number row.
  • No numeric keypad on your laptop: use the emoji panel (Windows key + .), Character Map, or copy and paste.
  • Wrong symbol appears: check the leading zero. Alt+0178 gives ², but Alt+178 gives a shaded block from the old CP437 set.
  • Alt+X does nothing: that shortcut works in Word and WordPad, not in browsers or most other apps.
  • The symbol shows as a box: the font lacks the glyph. Switch to a common font like Arial, Calibri or Times New Roman.
  • Superscript lost after pasting: you pasted formatting, not the character. Use ² or ³ instead.

Frequently asked questions

Is there a keyboard shortcut for squared on a Mac? +

Not on the US layout. Use the Character Viewer with Control+Command+Space and search 'superscript', or create a text replacement so a short code like sq2 becomes ².

Why does Alt+178 give me a block instead of ²? +

Without the leading zero, Windows uses the old CP437 character set, where 178 is a shaded block. Type Alt+0178 for ², or use Alt+253, which is ² in CP437.

How do I type superscript 4 or higher? +

There is no short Alt code for ⁴ and above. In Word, type 2074 and press Alt+X for ⁴; elsewhere, copy the character or use the Character Viewer or emoji panel.

Will m² display correctly in a text message or email? +

Yes. The ² character is standard Unicode, so it displays on virtually all phones and computers. Only superscript formatting gets lost when pasted as plain text.

Can I calculate a square in Excel using the ² symbol? +

No. The ² symbol is just text. To square a number, use a formula such as =A1^2 or =POWER(A1,2).

✓ Copied to clipboard