Superscript vs Subscript: Differences, Examples and Correct Uses
Learn the difference between superscript and subscript, see examples from math, science, and writing, and choose Unicode or semantic markup.
Superscript and subscript may look like small formatting choices, but they often carry important meaning. A character above the normal text line can show an exponent, an ionic charge, or a note reference. A character below the line can show an atom count or identify a mathematical variable.
That difference matters in mathematics, chemistry, academic writing, and web publishing. Put a character in the wrong position, and you may change the meaning rather than the appearance.
This guide explains superscript vs subscript with clear examples, correct uses, HTML markup, and common mistakes to avoid.
What Is Superscript?
Superscript is a letter, number, or symbol that appears slightly above the normal text baseline. It also usually appears smaller than the surrounding text.
For example, the 2 in x² is superscript. Here, it acts as an exponent and tells the reader to square x. The 3 in 10³ works in the same way.
Superscript also appears outside mathematics. Chemists use it for ionic charge, while editors may use it for note references.
MDN lists exponents, superior lettering, and ordinal numbers among appropriate uses of the HTML <sup> element. It also advises authors not to use <sup> only for visual styling.
What Is Subscript?
Subscript is a letter, number, or symbol placed slightly below the normal text baseline. Like superscript, it usually appears smaller than the main text.
The formula H₂O gives a familiar example. The lowered 2 shows two hydrogen atoms in a water molecule. In CO₂, the subscript 2 shows two oxygen atoms.
Mathematics also uses subscripts. Symbols such as x₁, x₂, and x₃ can identify related variables or members of a sequence.
MDN identifies mathematical variable numbers and chemical formulas as appropriate uses of the HTML <sub> element.
Superscript vs Subscript: What Is the Difference?
The main difference between superscript and subscript is position, but that position can change meaning.
| Feature | Superscript | Subscript |
|---|---|---|
| Position | Above the baseline | Below the baseline |
| Typical size | Smaller than normal text | Smaller than normal text |
| Mathematics | Exponents, powers, specialized notation | Indices and variable labels |
| Chemistry | Ionic charge and parts of nuclide notation | Number of atoms or groups |
| Academic writing | Note-reference numbers in some styles | Less common in ordinary prose |
| HTML | <sup> | <sub> |
A simple memory trick helps: “super” suggests above, while “sub” suggests below. However, the subject convention should decide where a character belongs.
Common Uses of Superscript
Exponents and Powers
Exponents are one of the best-known uses of superscript.
In 5², the superscript 2 means 5 × 5, which equals 25. In x³, the raised 3 means x is raised to the third power.
Scientific notation also uses superscript, as in 10⁶ or 10⁻³. Still, not every raised character means “exponent,” so context matters.
Ionic Charges in Chemistry
Chemists commonly place an ion’s charge at the upper right of a chemical symbol or formula.
For example, Ca²⁺ represents a calcium ion with a 2+ charge. Cl⁻ represents a chloride ion with a single negative charge.
IUPAC’s Nomenclature of Inorganic Chemistry, commonly called the Red Book, states that charges appear as a right upper index. It also gives forms such as 2+ and 2− for multiple charge units.
This distinction is central to superscript vs subscript notation in chemistry. Charge belongs in the superscript position, while atom counts normally belong in the subscript position.
Mass Numbers in Nuclide Notation
Superscript also appears in nuclide notation.
IUPAC states that the mass number appears as a left superscript, while the atomic number appears as a left subscript. Thus, oxygen-18 can be written with 18 at the upper left of O and 8 at the lower left when both numbers appear.
This detail matters because mass number and atomic number describe different properties. IUPAC defines atomic number as the number of protons in an atomic nucleus.
Footnotes and Note References
Some academic and editorial systems use raised note-reference numbers in running text.
The Chicago Manual of Style, for example, uses superscript note-reference numbers in text. Chicago’s official guidance generally places a note reference at the end of a sentence or clause and, in its published punctuation guidance, puts it after punctuation except a dash.
Citation systems differ, so follow the style required by your publisher, school, or organization.
Common Uses of Subscript
Chemical Formulas
Chemistry provides the most familiar subscript examples.
In H₂O, the subscript 2 shows two hydrogen atoms. In CO₂, the 2 shows two oxygen atoms.
IUPAC explains that a right subscript can indicate the number of atoms in an entity. Its notation guidance also distinguishes this position from the right superscript used for charge.
Chemists normally omit a subscript of 1 in ordinary chemical formulas. That is why water appears as H₂O rather than H₂O₁. Chemistry already has plenty of symbols; it does not need extra luggage.
Mathematical Indices and Variables
Subscripts help mathematicians distinguish related quantities without creating a new letter for every item.
For instance, x₁ may identify the first value in a sequence, x₂ the second, and x₃ the third. A notation such as aᵢ can identify a general indexed term.
The exact meaning depends on the field, so define unusual subscripts when readers cannot infer them from standard notation.
Superscript vs Subscript in HTML
Web authors can mark up simple raised and lowered text with the HTML <sup> and <sub> elements.
For example:
x<sup>2</sup> displays as x².
H<sub>2</sub>O displays as H₂O.
MDN says authors should use these elements to follow typographic conventions or standards, not merely to push text up or down for appearance. If you only want a visual effect, CSS is the better choice.
This distinction is worth remembering when publishing technical content. HTML markup should represent the intended notation rather than act as a shortcut for decorative positioning.
When Should You Use MathML?
Simple HTML works well for straightforward examples such as x² or H₂O. Complex mathematical notation may need more structure.
MathML provides dedicated elements for mathematical expressions. <msub> attaches a subscript to a base, <msup> attaches a superscript, and <msubsup> attaches both to the same base.
MDN marks <msubsup> as widely available across modern browsers. It is useful when an expression needs both positions at once.
Use MathML when you need structured mathematical notation rather than simple inline typography.
Common Superscript and Subscript Mistakes
The first mistake is treating both forms as decoration. In technical subjects, their positions often carry meaning.
The second mistake is swapping them. H₂O correctly uses a subscript for the hydrogen count. Moving that 2 to the superscript position would no longer write the standard formula for water.
Another mistake is using HTML tags only to imitate a logo or brand style. MDN recommends CSS when raised or lowered text serves appearance rather than a typographic convention.
Consistency matters too. Keep notation stable unless you clearly define a new meaning.
Finally, do not add superscript or subscript simply because it looks “scientific.” Good notation communicates information. Bad notation merely wears a lab coat.
Superscript vs Subscript: Which One Should You Use?
Choose superscript when a recognized convention calls for a raised character. Common examples include exponents, ionic charges, mass numbers in nuclide notation, and note-reference numbers in some styles.
Choose subscript when a convention calls for a lowered character. Common examples include atom counts in chemical formulas and indices attached to mathematical variables.
When you feel unsure, identify the character’s job first. Meaning should drive formatting.
Frequently Asked Questions
Is Superscript the Same as an Exponent?
No. An exponent often appears as superscript, but superscript has other uses.
For example, Ca²⁺ uses superscript to show ionic charge. “Superscript” describes typographic position, while “exponent” describes a mathematical function.
Is Subscript Used Only in Chemistry?
No. Chemistry uses subscript extensively, but mathematics, physics, engineering, computing, and other technical fields also use it.
Subscripts can identify values, terms, variables, or components, depending on the notation system.
Can Superscript and Subscript Appear Together?
Yes. Some mathematical and scientific notation needs both positions around the same base.
MathML includes the <msubsup> element for this purpose. It attaches one subscript and one superscript to a base expression.
Should I Use CSS Instead of <sup> and <sub>?
Use <sup> and <sub> when raised or lowered text follows a genuine typographic convention.
Use CSS when you only want to shift text for visual styling. MDN makes this distinction in its usage guidance for both elements.
What Is the Easiest Way to Remember Superscript vs Subscript?
Think: “super goes up; sub goes down.”
Then check the context. In x², the exponent goes up. In H₂O, the atom count goes down.
That shortcut handles many everyday examples without turning your keyboard into a chemistry exam.
Final Takeaway
The superscript vs subscript difference starts with position, but meaning matters more. Superscript appears above the baseline and commonly represents exponents, charges, mass numbers, or note references. Subscript appears below the baseline and commonly represents chemical counts or indexed variables.
For websites, use <sup> and <sub> when typographic conventions require them. Use CSS for appearance alone and MathML for more complex mathematical structure.
Once you understand each character’s job, the choice becomes straightforward. Small text can carry a lot of information, so give every number and symbol the right seat.