Overview

Subscript and superscript are typographic styles in which characters are rendered smaller and shifted vertically relative to the baseline. A subscript is lowered beneath the baseline, while a superscript is raised above it. Both are used to add information compactly within a line of text, for example in scientific formulas, mathematical notation, and editorial markers.

Subscript

Subscript characters appear slightly below the normal text line and are usually smaller than the surrounding text. Common examples include chemical formulas such as N₂, H₂O and CO₂, where the digits indicate the number of atoms in a molecule; for information on chemical naming and formulas see chemical formulas.

  • Chemistry: atomic counts and isotopic notation.
  • Mathematics and computer science: indices (for example a_i) and array subscripts.
  • Notation in formulas to label variables or components.

Superscript

Superscript characters are shifted upward relative to the baseline and are also smaller than normal text. Typical uses include powers and exponents such as 2⁵ or x²; see exponents for details and their role in mathematics. Superscripts are also used for ordinal indicators (1st, 2nd), electrical charge notation (Na⁺, SO₄²⁻ where the charge is shown as a superscript), and reference markers like footnote numbers.

  • Mathematical exponents and powers.
  • Chemical charge notation and oxidation states.
  • Editorial marks such as footnote indicators.

Typing and technical notes

Different systems provide different ways to create subscripts and superscripts. Many markup languages and typesetting systems have dedicated syntax (for example, LaTeX uses _ for subscripts and ^ for superscripts). Web documents typically use elements named "sub" and "sup" to achieve the effect; some fonts and Unicode include limited sets of superscript and subscript characters. Because support and rendering vary across fonts, platforms, and assistive technologies, authors should check how the characters are produced and read by screen readers when accessibility is important.