·Math symbols·10 min read·Updated October 31, 2026

How to Type the Squared Symbol (²) on Any Keyboard or Phone

Copy ² and type squared on Windows, Mac, iPhone, Android, Word, Docs, and Excel, plus cubed (³), m², and when superscript formatting is the better choice.

Quick answer

Copy ² above, or on Windows with a numeric keypad hold Alt and type 0178. Macs have no built-in ² key combination: open Character Viewer with Control + Command + Space and search “superscript.” In Word for Windows, type 00B2 and press Alt + X.

WindowsAlt + 0178 (numeric keypad)
MacCharacter Viewer → search “superscript”
Word / DocsType 00B2, then press Alt + X
PhoneAndroid: hold 2 on ?123 · iPhone: text replacement
Unicode U+00B2 HTML ² Windows Alt + 0178

Squared symbol shortcuts at a glance

The squared sign ² is a single Unicode character named “superscript two” (U+00B2). You use it for square units such as m² and ft², and for simple powers such as x² or πr². Because it is one character rather than a styled 2, it keeps its raised position when you paste it into an email, a form field, a spreadsheet label, or a social post.

Device or app Fastest reliable method
Windows with a numeric keypad Hold Alt, type 0178 on the keypad, release Alt
Windows laptop without a keypad Windows + . → Symbols, Character Map, or copy ²
Mac Control + Command + Space, search “superscript”
Microsoft Word for Windows Type 00B2, then press Alt + X
Google Docs Insert → Symbols → Special characters, search “superscript”
Excel or Google Sheets =UNICHAR(178) for a label; =A2^2 to calculate
iPhone Create a text replacement once, then type your shortcut
Android (Gboard) Tap ?123, touch and hold 2, choose ²
Chromebook Ctrl + Shift + U, type 00b2, press Enter
HTML ² or the literal ² in a UTF-8 page

First decide: the ² character or superscript formatting?

Many guides skip this step, and it explains most “my squared sign disappeared” problems. There are two different ways to make a raised 2:

  • The ² character is a real Unicode symbol. It behaves like any other letter or digit: it copies, pastes, and stays raised in plain-text places such as Gmail subject lines, website forms, chat apps, file names, and spreadsheet text.
  • Superscript formatting raises ordinary text inside a rich-text editor such as Word, Google Docs, or Pages. The underlying text is still a normal 2, so pasting it somewhere that discards formatting leaves you with “m2.” Formatting can raise anything, though, including x¹⁰, 2ⁿ⁺¹, or an entire expression.
What you are writing Better choice
Room or property size in a listing, form, or message The ² character
A simple power in a sentence, such as x² or πr² The ² character
Exponents above 3, letters, or longer powers in a document Superscript formatting
A calculation in a spreadsheet, calculator, or code The ^ or ** operator, not ²
Fractions, roots, or multi-line formulas An equation editor or LaTeX

One more detail matters for data. Unicode defines ² as a compatibility form of the digit 2, so software that applies compatibility normalization (NFKC) converts “m²” to “m2.” That is usually harmless in search, but it means ² should not be the only thing carrying a mathematical meaning in stored data.

Type ² on Windows

Click where the symbol should go, turn on Num Lock, hold the Alt key, type 0178 on the numeric keypad, and release Alt. Use the keypad, not the number row above the letters; classic Alt codes listen for keypad input. The cubed sign works the same way with Alt + 0179.

You may also see Alt + 253 recommended. That shorter code comes from the old DOS code page and can produce ² too, but the result depends on the program. The leading-zero version is the one worth memorizing. Our Windows Alt codes guide explains why the two systems differ.

On a laptop without a numeric keypad

  • Press Windows + . to open the emoji panel, select the Symbols section, and browse for the raised digits.
  • Open Character Map from the Start menu, tick Advanced view, type “superscript” in Search for, then select ² and choose Copy.
  • Use the copy button at the top of this page, or the symbol finder, and paste the character.

In Word for Windows, Ctrl + Shift + + (the = key on a U.S. keyboard) toggles superscript formatting if you would rather raise an ordinary 2.

Type ² on a Mac

There is no built-in Option-key shortcut for ² on the U.S. layout. Several websites claim that Option + 2 works, but on a U.S. Mac keyboard that combination types the trademark sign ™. Use one of these instead.

Character Viewer (no setup). Press Control + Command + Space, or Fn/Globe + E, type “superscript” in the search field, and double-click superscript two. Add it to Favorites if you use it often, so it is one click away next time.

Text replacement (best for frequent use). Open System Settings → Keyboard → Text Replacements and click +. Enter a short code such as sq2 under Replace and paste ² under With. From then on, typing sq2 in apps that support macOS text replacements inserts ².

Unicode Hex Input (for people who know codes). In System Settings → Keyboard, edit your input sources and add Unicode Hex Input. While it is the active input source, hold Option and type 00B2 to insert ². Switch back to your normal layout when you are done.

Superscript formatting. In Pages, select a normal 2 and press Control + Shift + Command + +. In Word for Mac, use the superscript button (x²) on the Home tab.

Type squared on iPhone

Apple’s keyboard does not include ² among the alternates on the 2 key, so the dependable approach is a one-time text replacement:

  1. Copy ² from the top of this page.
  2. Open Settings → General → Keyboard → Text Replacement, or touch and hold the globe or emoji key on the keyboard and tap Keyboard Settings → Text Replacement.
  3. Tap +, paste ² into Phrase, and type a shortcut such as sq2 into Shortcut.
  4. Tap Save. Typing sq2 followed by a space now produces ².

Repeat with ³ and a shortcut like cu3 if you need cubed values. Choose a shortcut made of letters rather than ^2: you may genuinely need to type ^2 in a calculator or spreadsheet app, and a replacement would get in the way.

Type squared on Android

On Gboard, tap ?123 to open the numbers layout, then touch and hold 2 and slide to ². The same menu also lists fractions such as ⅔. Holding 3 offers ³, and holding 1 offers ¹.

Samsung Keyboard and other keyboard apps arrange their symbol pages differently. If yours does not offer ², copy it once and save it as a personal dictionary or text shortcut in that keyboard’s settings.

Squared in Word, Google Docs, and Excel

Microsoft Word

In Word for Windows, type 00B2 and immediately press Alt + X; Word converts the code to ². If the code follows a letter or number without a space, select just the four characters first so Word converts the right sequence. You can also choose Insert → Symbol → More Symbols and pick ² from the Latin-1 Supplement subset.

For exponents larger than 3, select the digits and press Ctrl + Shift + + to apply superscript formatting. For anything with fractions or roots, use Insert → Equation.

Google Docs

Choose Insert → Symbols → Special characters and search for “superscript,” or draw a small 2 in the drawing box. To format a normal 2 as superscript, select it and press Ctrl + . on Windows and ChromeOS or ⌘ + . on a Mac.

Excel and Google Sheets

Spreadsheets need extra care, because a typed ² is text, not math:

  • To calculate a square, use =A2^2 or =POWER(A2,2). A cell containing 5² will not equal 25.
  • To build a label, use =UNICHAR(178), for example ="Area (m"&UNICHAR(178)&")". You can also type Alt + 0178 directly into a header cell on Windows.
  • To show units on numbers, apply a custom number format such as 0.00" m²" (in Excel, Format Cells → Number → Custom; in Google Sheets, Format → Number → Custom number format). The cell displays “42.50 m²” but still holds the number 42.5, so SUM and charts keep working.

Excel’s Format Cells → Font → Superscript option works on selected characters of text, not on numeric values. That is why the custom number format is the better choice for measurements.

Type ² on a Chromebook

Press Ctrl + Shift + U, type 00b2, and press Space or Enter. An underlined “u” appears while you enter the code. The same method gives ³ with 00b3. In Google Docs on a Chromebook, Ctrl + . applies superscript formatting instead.

Squared in HTML and code

On a UTF-8 web page you can type ² directly, or use the named reference &sup2; (numeric forms: &#178; or &#xB2;). Use the <sup> element instead when the exponent is longer than one digit or should be marked up as superscript text, as in x<sup>10</sup>.

In programming languages, ² is not an operator. Use x ** 2 in Python and JavaScript, Math.pow(x, 2) where needed, or the language’s own power function. Converting the character itself to a number fails in many languages; in Python, int("²") raises a ValueError.

Cubed and other superscript numbers

Only ¹, ², and ³ were part of the old Latin-1 character set, which is why they are the only superscript digits with classic Windows Alt codes and named HTML references. The rest live in Unicode’s Superscripts and Subscripts block.

Character Name Unicode Windows Alt code HTML
¹ Superscript one U+00B9 Alt + 0185 &sup1;
² Superscript two U+00B2 Alt + 0178 &sup2;
³ Superscript three U+00B3 Alt + 0179 &sup3;
⁰ Superscript zero U+2070 None &#8304;
⁴–⁹ Superscript four–nine U+2074–U+2079 None &#8308;–&#8313;
⁻ Superscript minus U+207B None &#8315;
ⁿ Superscript n U+207F None &#8319;

In Word for Windows, type the four characters after “U+” and press Alt + X: 2074 becomes ⁴, 207B becomes ⁻. Stringing these characters together works for short powers such as 10⁶ or x⁻¹. For anything longer, superscript formatting or an equation editor is easier to type and easier to read.

Writing square units: m², ft², km²

Attach ² directly to the unit with no space: m², cm², km², ft², in². Leave a normal space between the number and the unit, as in 25 m². In plain-text systems that cannot display ², “sq m” and “sq ft” are clear alternatives, and m^2 is common in code and technical notes.

Avoid mixing styles in one document. A property listing that says “1,200 sq ft” in one place and “1,200 ft²” in another looks careless, even though both are correct.

Troubleshooting

Alt + 0178 types nothing or the wrong character

Confirm Num Lock is on, use the numeric keypad, and include the leading zero. Some apps, remote desktops, and games intercept Alt; paste the character or use Character Map instead.

The ² turned into a normal 2 after pasting

You copied superscript formatting, not the ² character. Paste the real character from this page, or re-enter it with one of the character methods above.

The ² shows as a box or question mark

The font lacks the glyph, or the file is not saved as UTF-8. Switch to a common system font and check the file or database encoding.

My iPhone or Mac replacement doesn’t fire

Type the shortcut and then a space or punctuation mark. Check the spelling of the shortcut in Text Replacement settings, and remember that some third-party apps ignore system text replacements.

References and compatibility

These references document the input methods above. Shortcuts vary by keyboard layout, app, and version; where official documentation does not cover a method, the reference noted is a third-party source.

Editorial note: Shortcuts can vary by keyboard layout and app. Check the stated platform and use the copy-and-paste fallback when needed. Report a correction with your device, layout, and application; see our editorial policy for limitations.