Superscript, subscript and fraction symbols
A superscript or subscript is a character in itself, not formatting: m², cm³, x⁴, H₂O, CO₂. Pasting it keeps it in apps that drop rich text, such as a username, an SMS or a spreadsheet cell. The fractions ½ ¼ ¾ ⅓ ⅔ ⅛ are single characters too.
The tool above opens on the search "superscript (then "subscript", "fraction")". Below, 14 characters of this category. Superscript digits and letter first, then subscript digits, then the vulgar fractions.
Table with codes
| Symbol | Unicode name | Code point | HTML | Windows Alt | Mac (US) |
|---|---|---|---|---|---|
| ¹ | superscript one | U+00B9 | ¹ ¹ | Alt+0185 | - |
| ² | superscript two | U+00B2 | ² ² | Alt+0178 | - |
| ³ | superscript three | U+00B3 | ³ ³ | Alt+0179 | - |
| ⁴ | superscript four | U+2074 | ⁴ | - | - |
| ⁿ | superscript latin small letter n | U+207F | ⁿ | - | - |
| ₀ | subscript zero | U+2080 | ₀ | - | - |
| ₁ | subscript one | U+2081 | ₁ | - | - |
| ₂ | subscript two | U+2082 | ₂ | - | - |
| ½ | vulgar fraction one half | U+00BD | ½ ½ | Alt+0189 | - |
| ⅓ | vulgar fraction one third | U+2153 | ⅓ | - | - |
| ¼ | vulgar fraction one quarter | U+00BC | ¼ ¼ | Alt+0188 | - |
| ⅔ | vulgar fraction two thirds | U+2154 | ⅔ | - | - |
| ¾ | vulgar fraction three quarters | U+00BE | ¾ ¾ | Alt+0190 | - |
| ⅛ | vulgar fraction one eighth | U+215B | ⅛ | - | - |
The Alt column uses the numeric keypad with Num Lock on: a code with a leading zero (0169) is Windows-1252 and works on any Windows, a code without it comes from the OEM code page of the system (437 on a US one) and may differ elsewhere. The Mac column is the Option shortcut on a US keyboard; "-" means there is none. Names are the official Unicode names, in English.
How to type them
The examples use ² (U+00B2); the same methods work for every character in the table with its own code.
| Where | How |
|---|---|
| Any app | Copy ² from the table above and paste it. |
| Windows Alt | Hold Alt and type the number on the numeric keypad (Num Lock on): Alt+0178 gives ². |
| Word | Type B2 and press Alt+X: Word turns the hex code U+00B2 into ². |
| macOS | Open the Character Viewer with Control+Command+Space and search for it, or enable Unicode Hex Input, hold Option and type B2. |
| Linux | Press Ctrl+Shift+U, type B2 and press Enter (GTK and many desktop apps). |
| HTML / CSS / JS | ² or ² in HTML, \B2 in a CSS content value, \u00B2 in a JavaScript string. |
Good to know
- Only ¹ ² ³ and the fractions ½ ¼ ¾ are in Latin-1 (Alt+0185, Alt+0178, Alt+0179, Alt+0189, Alt+0188, Alt+0190 on Windows). Superscript ⁴ and the subscripts come from later blocks (U+2070 to U+209F) and have no Alt code, so copy them from here.
- Unicode does not have a superscript for every letter: all digits, + − = ( ) and the letters i and n exist, but many letters are missing. For a full formula use real markup (sup and sub in HTML, or a formula tool), not look-alike characters.
- Squared and cubed are the classic case: "m²" is the characters m and ² (U+00B2), so a search for "m2" does not find it and a screen reader says "m squared" only if the voice knows the character. In data columns write "m2" and keep ² for display.
Using the tool
- Read the table or search another word in the tool above (try "snowman").
- Click a character to see its code in several formats and copy the one you need.
- Paste it where you need it, and check the result in the app that will show it: fonts and platforms draw characters differently.
Frequently asked questions
How do I type squared (²) and cubed (³)?
On Windows hold Alt and type 0178 for ² and 0179 for ³; on a Mac there is no default shortcut, so copy them here. In HTML use ² and ³.
How do I write a fraction like ½ in a message?
Copy ½ (U+00BD, Alt+0189 on Windows) from the table. For fractions without their own character, such as 5/16, write them with a slash or use the fraction slash U+2044 between superscript and subscript digits.
What is the code point of ²?
² is U+00B2 (178 in decimal), named superscript two in Unicode. In HTML write ², in CSS \B2 and in JavaScript \u00B2.