To type a number to the power of another on any keyboard, press Shift + 6 to type the caret (^) between them, so 5 to the power of 2 becomes 5^2.
For a raised exponent like 5², use a superscript shortcut in your editor, an Alt code on Windows, or a copied Unicode character, and in code use the language's power operator.
The quickest universal method: Use the caret symbol (^)
The caret is on the 6 key of a standard US keyboard, and it works in every text box, chat, search bar and formula. It is also the operator Excel uses for exponents.
- Type the base number, for example 5.
- Hold Shift and press 6 to type the caret (^).
- Type the exponent, for example 2, so the text reads 5^2.
- Wrap a multi-digit or negative exponent in parentheses, for example 10^(-3), so nobody misreads where the exponent ends.
Use the caret when the reader only needs to understand the value, or when the app has no formatting. Switch to a superscript when the result has to look like printed math.
Which method should you use?
| Where you are typing | Use this | Result |
|---|---|---|
| Chat, search box, plain-text email | Caret: Shift + 6 | 5^2 |
| Microsoft Word | Ctrl + Shift + Plus sign (+) on Windows, Command + Shift + Plus sign (+) on Mac | Formatted superscript 5² |
| Google Docs | Ctrl + . on a PC, ⌘ + . on a Mac | Formatted superscript |
| Excel or Google Sheets formula | =5^2 in Excel, or =POWER(5,2) in either app | Calculated answer, 25 |
| Any Windows app, squared or cubed only | Alt + 0178 (²) or Alt + 0179 (³) on the numeric keypad | A real ² or ³ character |
| Phone or a site with no formatting | Copy and paste a Unicode superscript digit | A real ⁴ or ⁵ character |
| Web page you build | The HTML sup element | 5<sup>2</sup> in the browser |
| Python or JavaScript | The ** operator | A calculated power |
What “to the power of” looks like when typed
Written math shows the exponent small and raised. A keyboard has no raised-number key, so typed text uses one of four conventions.
| Style | How 5 to the power of 2 appears | Where it is used |
|---|---|---|
| Caret notation | 5^2 | Plain text, calculators, Excel formulas, LaTeX and UnicodeMath input |
| Formatted superscript | 5 with a small raised 2 | Word, Google Docs, Pages and other rich-text editors |
| Unicode superscript character | 5² | Anywhere text is accepted, because ² is a character, not formatting |
| Programming operator | 5 ** 2 | Python and JavaScript; MATLAB uses ^ and .^ |
Formatting disappears when you paste into a plain-text field, but a Unicode character survives. That difference decides most of the choices below.
How to type superscript powers in Microsoft Word
Word has a toggle shortcut, a ribbon button and a symbol dialog. The shortcut is the fastest when you are typing a formula line by line.
- Type the base number, for example x or 10.
- Press Ctrl + Shift + Plus sign (+) on Windows, or Command + Shift + Plus sign (+) on a Mac, to turn superscript on.
- Type the exponent, for example 3.
- Press the same shortcut again to return to normal text.
- To format existing text instead, select the exponent and select Home > Superscript.
- For a real superscript character, select Insert > Symbol > More Symbols, set Font to (normal text) and Subset to Superscripts and Subscripts, then select the digit and Insert.
Word also converts a typed Unicode code: type 00B2 and press Alt + X to turn it into ². The Font dialog launcher on the Home tab has a Superscript checkbox under Effects as well.

How to type powers in Google Docs
Google Docs has a superscript shortcut and a separate equation editor that builds the exponent for you.
- Type the base number in your document.
- Press Ctrl + . on Windows, or ⌘ + . on a Mac, to turn superscript on.
- Type the exponent, then press the same shortcut again to go back to normal text.
- For a full equation, click where it should go and select Insert > Symbols > Equation.
- In the equation box, type \, then press Shift + 6 to start a superscript, and type the exponent.
- Press Ctrl + / (Windows, ChromeOS) or ⌘ + / (Mac) if you want the full list of Docs keyboard shortcuts.
Docs subscript works the same way with Ctrl + , on a PC or ⌘ + , on a Mac, which helps with chemical formulas.
How to type powers in Microsoft Excel and Google Sheets
In a spreadsheet you usually want the answer, not a raised number. Both apps calculate a power from a formula.
- Select an empty cell.
- In Excel, type =5^2 and press Enter to get 25; the caret is Excel's exponent operator.
- In Excel or Google Sheets, type =POWER(5,2) and press Enter for the same result, where the first value is the base and the second is the exponent.
- Use cell references for live values, for example =POWER(A2,B2).
- To only display a raised digit in Excel, double-click the cell, select the exponent characters, press Ctrl + 1, check Superscript under Effects and click OK.
Google Sheets also lists POW(base, exponent) as an operator function that returns a number raised to a power. Excel has no direct superscript shortcut, but Alt, H, F, N, E walks the ribbon to the same checkbox by keyboard.

How to type squared and cubed symbols directly
Squared (²), cubed (³) and superscript one (¹) are single characters on Windows, so they paste anywhere with their raised look intact.
- On Windows, turn on Num Lock.
- Hold Alt and type 0178 on the numeric keypad, then release Alt to get ².
- Use Alt + 0179 for ³ and Alt + 0185 for ¹, again on the numeric keypad with the leading 0.
- On Windows 11 without a keypad, press Windows key + . (period), select Symbols, and pick the digit from the symbol list.
- On a Mac, press Fn/Globe + E or choose Edit > Emoji & Symbols, search for superscript, and click the digit.
Alt codes only work with the numeric keypad, not the number row across the top of the keyboard. You can still type the degree symbol and other Latin-1 characters the same way.

Unicode superscript numbers you can copy and paste
Copy a character from the table and paste it after your base number. These are text characters, so they survive in chats, social posts and plain-text email.
| Character | Name | Windows Alt code | Code point (for Word Alt + X) |
|---|---|---|---|
| ¹ | Superscript one | Alt + 0185 | 00B9 |
| ² | Superscript two (squared) | Alt + 0178 | 00B2 |
| ³ | Superscript three (cubed) | Alt + 0179 | 00B3 |
| ⁰ ⁴ ⁵ ⁶ ⁷ ⁸ ⁹ | Superscript zero and four to nine | No Alt + 0 code | In Word's Superscripts and Subscripts symbol subset |
| ⁺ ⁻ ⁿ | Superscript plus, minus and n | No Alt + 0 code | In Word's Superscripts and Subscripts symbol subset |
Combine characters for longer exponents, for example 10⁻³ or 2¹⁰.
How to type exponents on a Mac keyboard
Mac apps share the Character Viewer, and Pages and Word each add a superscript shortcut.
- In Pages, select the exponent and press Control-Shift-Command-Plus Sign (+).
- Or in Pages, open the Format sidebar, click Style, click the Advanced Options button in Font, and choose Superscript from the Baseline pop-up menu.
- In Word for Mac, press Command + Shift + Plus sign (+) before and after the exponent.
- Anywhere else, press Fn/Globe + E to open the Character Viewer and insert a superscript digit.
- For a reusable shortcut, open Apple menu > System Settings > Keyboard > Text Replacements, click +, type a shortcut such as ^2 and set ² as the replacement, then click Add.

How to type powers on a Chromebook
ChromeOS has no Alt codes, so use the caret or the formatting tools in Google Docs.
- In any text field, press Shift + 6 to type the caret, for example 3^4.
- In Google Docs, select Insert > Symbols > Equation, type \, press Shift + 6 and type the exponent.
- In Google Docs, press Ctrl + /, search the shortcut list for superscript, and use the shortcut it shows.
- In Google Sheets, type =POWER(3,4) in a cell to calculate the value.
- To paste a raised digit into a chat or form, copy it from the Unicode table above.
The Show accent marks and special characters setting under Settings > Device > Keyboard and inputs only offers accented letters, not superscript digits.
How to type powers on Linux
Linux desktops vary, so the reliable routes are the caret and the office suite's superscript command.
- In a terminal, chat or plain-text file, type the caret, for example 2^8.
- In LibreOffice Writer, press Ctrl + Shift + P to turn superscript on, type the exponent, and press it again to turn it off.
- In Google Docs in a Linux browser, use Ctrl + . for superscript.
- In Python on Linux, use
2 ** 8to calculate the power. - For ², ³ and other raised digits in plain text, paste them from the Unicode table.
LibreOffice uses Ctrl + Shift + B for subscript, and on macOS both shortcuts use Command in place of Ctrl.
How to type powers on iPhone and iPad
The iPhone keyboard has no superscript key, so a text replacement is the fastest repeatable way to get ² or ³.
- For plain text, switch to the number and symbol keys and type the caret (^) between the numbers.
- To set up a shortcut, touch and hold the globe or emoji key in any text field and tap Keyboard Settings.
- Tap Text Replacement, then tap +.
- Paste ² into Phrase, type a shortcut such as sq2 into Shortcut, and save.
- Type sq2 in any app and the keyboard replaces it with ²; repeat for ³ and other digits.
Text replacements sync to your other Apple devices signed in to the same Apple Account, so a shortcut made on a Mac also works on iPhone.

How to type powers on Android
Gboard and most Android keyboards include the caret on a symbols page, and raised digits can come from copy and paste.
- Tap the numbers and symbols key on the keyboard.
- Find the caret (^) on the symbols page and type it between the base and the exponent, for example 4^3.
- For a raised digit, copy ², ³ or another character from the Unicode table on this page.
- Paste it right after the base number in your message.
How to type powers in HTML, websites, and blog editors
HTML has a dedicated superscript element, and most blog editors expose it as a toolbar button that writes the same tag.
- In raw HTML, wrap the exponent in the sup element, for example
E=mc<sup>2</sup>. - For squared or cubed only, you can use the named entities
²and³, or¹for superscript one. - In a visual blog editor, select the exponent and use the editor's superscript formatting button if it has one.
- If the editor strips formatting, paste a Unicode superscript character instead.
- Use CSS
vertical-align: superonly for raised text that is decoration, such as a brand mark, not for math.
MDN describes sup as being for typographic conventions such as exponents and ordinals, and suggests MathML for more complex equations.
How to type powers in email, notes, and messaging apps
Chat apps and many email clients send plain text, so formatting rarely survives. Characters always do.
- In a chat or SMS, type the caret, for example 2^10, or paste a superscript character such as 2¹⁰.
- On Windows 11, press Windows key + . (period) in the message box, select Symbols, and pick a superscript digit.
- On a Mac, press Fn/Globe + E in Mail, Notes or Messages to open the Character Viewer.
- On iPhone, iPad or Mac, use a text replacement so a short code types ² or ³ for you.
- In an email client that edits rich text, check its formatting toolbar for a superscript option before you send.

How to type powers in math and science tools
Equation editors treat the caret as the superscript command, so you type 5^2 and the tool raises the 2 for you.
- In Word, press Alt + = to insert an equation.
- Type the expression in linear format, for example x^2, then press Space so Word builds the exponent.
- Press Ctrl + = or select Convert > Professional to show the finished equation.
- In Word's LaTeX mode, put long exponents in braces, for example x^{10}.
- In Excel, numeric exponents for display go in an equation: select Insert > Symbol > Equation > Insert New Equation, then choose Script on the Equation tab.
- In MATLAB, use ^ for matrix powers and .^ to raise each element of an array, for example A.^2.
Outside an equation editor, Windows Alt codes also let you type the not-equal sign and other math symbols next to your exponents.

How to type powers in programming
Most languages do not use the caret for powers, and some treat it as bitwise XOR, which silently returns the wrong number.
| Language or tool | Power syntax | What ^ does |
|---|---|---|
| Python | 5 ** 2 or pow(5, 2) |
Bitwise XOR of two integers |
| JavaScript | 5 ** 2 or Math.pow(5, 2) |
Bitwise XOR |
| Excel and Google Sheets formulas | =5^2 in Excel, =POWER(5,2) in both |
Exponent in Excel |
| MATLAB | A^2 (matrix) or A.^2 (element-wise) |
Matrix power |
In Python, -12 returns -1 because the power binds tighter than the minus sign on its left; write (-1)2 to get 1. A negative integer exponent such as 10**-2 returns the float 0.01.
Common problems and fixes
Alt + 0178 types nothing or the wrong character
Alt codes only read the numeric keypad, not the number row.
- Turn on Num Lock.
- Hold Alt and type 0178 on the keypad, including the leading 0.
- On a laptop without a keypad, press Windows key + . (period) and pick ² from Symbols in Windows 11, or paste it from the Unicode table.
The superscript shortcut does nothing in Excel
Excel has no direct superscript shortcut like Word's.
- Double-click the cell and select only the exponent characters.
- Press Ctrl + 1, check Superscript under Effects, and click OK.
- If you need the calculated value, type =5^2 or =POWER(5,2) instead.
Superscript disappears when you paste into a chat or email
Word and Docs superscript is formatting, and plain-text fields drop formatting.
- Replace the formatted exponent with a Unicode character such as ² or ³.
- Paste the text again and check that the raised digit stays.
5^2 gives 7 in Python or JavaScript
In both languages ^ is bitwise XOR, not a power.
- Replace
5^2with5 ** 2. - Run the line again and check that the result is 25.
Word keeps typing everything small and raised
Superscript is a toggle and is still switched on.
- Press Ctrl + Shift + Plus sign (+) once more, or Command + Shift + Plus sign (+) on a Mac.
- Check that the Superscript button on the Home tab is no longer highlighted.
Typing exponents on a keyboard FAQ
How do you type to the power of on a keyboard?
Press Shift + 6 to type the caret (^) between the base and the exponent, so 5 to the power of 2 is written 5^2. It works in any text field, and Excel reads it as an exponent in formulas.
What is the keyboard shortcut for superscript?
In Microsoft Word it is Ctrl + Shift + Plus sign (+) on Windows and Command + Shift + Plus sign (+) on a Mac. In Google Docs it is Ctrl + . on a PC and ⌘ + . on a Mac.
What is the Alt code for squared (²)?
Hold Alt and type 0178 on the numeric keypad to get ². Use Alt + 0179 for cubed (³) and Alt + 0185 for superscript one (¹). The number row at the top of the keyboard does not work for Alt codes.
How do you type an exponent in Excel?
Type =5^2 in a cell and press Enter to calculate 5 to the power of 2, or use =POWER(5,2). To only show a raised digit, select it in the cell, press Ctrl + 1 and check Superscript.
How do you type squared on a laptop without a number pad?
On Windows 11, press Windows key + . (period), select Symbols and pick ². On a Mac, press Fn/Globe + E and search for superscript. Copying ² from a character table also works on any laptop.
How do you type exponents on a Chromebook?
Type the caret with Shift + 6 for plain text. In Google Docs, insert an equation and type \ then Shift + 6, or press Ctrl + / to look up the superscript shortcut in the Docs shortcut list.
How do you write powers in Python?
Use the operator, for example 2 8, or the built-in pow(2, 8). The caret (^) is bitwise XOR in Python, so 2 ^ 8 returns 10 instead of 256.
How do you type x squared on an iPhone?
Create a text replacement in Keyboard Settings > Text Replacement with ² as the phrase and a short code as the shortcut. Typing the code then inserts ². You can also type x^2 using the caret on the symbols keyboard.



![How to use Advanced Find in Outlook [complete guide 2026]](https://techdows.com/wp-content/uploads/2026/12/How-to-use-Advanced-Find-in-Outlook-complete-guide-2026-1-600x338.jpg)

