²

How to Type Squared (²) and Cubed (³) on Any Device

How-To Guides · 2 min read · Published October 25, 2026

Quick answer: on Windows, hold Alt and type 0178 for ² or 0179 for ³ on the numeric keypad. In Word and Google Docs you can also raise any number with superscript formatting (Ctrl+Shift+= in Word, Ctrl+. in Docs). On a Mac and on phones, copy ² from this page or save a text replacement.

Quick reference: every method

Every Alt code below is verified against the real Windows code pages — where none exists we say so, rather than list one that won’t work.

CharNameWindowsMacHTMLWord (Alt+X)Unicode
¹ Superscript One Alt+0185 Copy / paste ¹ 00B9 + Alt+X U+00B9
² Superscript Two Alt+0178 Copy / paste ² 00B2 + Alt+X U+00B2
³ Superscript Three Alt+0179 Copy / paste ³ 00B3 + Alt+X U+00B3
⁴ Superscript Four Copy / paste Copy / paste ⁴ 2074 + Alt+X U+2074

Character or formatting?

There are two ways to get a raised number, and they behave differently:

  • The characters ¹ ² ³ (and ⁴ to ⁹) are real Unicode characters. They stay raised wherever you paste them: chats, social media, file names, web forms. Best for units such as m², cm³ and km².
  • Superscript formatting raises any text in a document, including x¹⁰ or 2ⁿ, but the formatting disappears when the text is pasted as plain text. Best for maths in Word or Docs.

Windows

¹ ² ³ are in Windows-1252, so they have leading-zero Alt codes: Alt+0185 ¹, Alt+0178 ², Alt+0179 ³. The squared sign is also in the old DOS table as Alt+253. The superscript digits from ⁴ upwards have no Alt code; copy them from the table above or use Word's Alt+X code (2074 for ⁴). Without a numeric keypad, see Alt codes not working.

Word and Google Docs

  • Word: select the number and press Ctrl+Shift+= (Command+Shift+= in Word for Mac) to toggle superscript. Or insert the character with Alt+0178 or 00B2 then Alt+X.
  • Google Docs: select the number and press Ctrl+. (Command+. on Mac), or Format → Text → Superscript.

Excel and Google Sheets

To calculate a square, use =A1^2 (or =POWER(A1,2)). To show a unit such as m², type Alt+0178 in the cell or use =UNICHAR(178); the character works in headings, labels and number formats such as 0" m²". In an Excel text cell you can also select one character in the formula bar and apply Format Cells → Font → Superscript.

Mac

The US Mac keyboard has no Option shortcut for ² or ³. Use the Character Viewer (Control+Command+Space, search "superscript"), your app's superscript formatting, or a text replacement such as m2m → m².

iPhone and Android

On Gboard, touch and hold the 2 or 3 key on the number row or symbols page to see ² and ³ in many languages. The iPhone keyboard doesn't offer them, so a text replacement is the quickest way.

HTML

Use &sup2; (²) and &sup3; (³), or the <sup> element for any number: x<sup>10</sup>.

Related: √ square root, fractions, our superscript and subscript characters, and the math symbols hub.

Frequently asked questions

What is the Alt code for squared (²)?

Alt+0178 gives ² and Alt+0179 gives ³. Type the digits on the numeric keypad with Num Lock on. Alt+253 also gives ² because it is in the old DOS table too.

How do I type m² on a Mac?

There is no Option shortcut for ². Use the Character Viewer (Control + Command + Space, search "superscript two"), apply superscript formatting in your app, or set up a text replacement such as m2m → m².

What is the difference between ² and a superscript 2?

² is its own character and stays raised anywhere you paste it. A superscript 2 is a normal 2 with formatting, which is lost when the text is pasted into plain-text places such as a chat or a web form.

How do I type squared in Excel?

Type Alt+0178 in the cell or use =UNICHAR(178). To calculate a square, use =A1^2.

Looking for something else? Browse 1,000+ copy-paste symbols, the full Alt Codes finder, or the emoji picker.