Underleaf Logo
Underleaf
Blog
Log InTry Free

Learn LaTeX

Getting Started

  • What is LaTeX?
  • LaTeX for Beginners

How to Use Superscripts and Subscripts in LaTeX

Subscripts and superscripts are essential for mathematical notation, chemical formulas, and academic writing. This guide covers all the methods for creating sub and superscripts in LaTeX, both in math mode and text mode.

Basic Math Mode Usage

In math mode, use _ for subscripts and ^ for superscripts:

Common Applications

  1. Mathematical sequences:
  2. Chemical formulas:
  3. Powers and exponents:

Text Mode Options

For subscripts and superscripts in regular text, use the \textsuperscript and \textsubscript commands.

Common superscript and subscript errors

  1. Missing $ inserted: ^ and _ are math syntax. Put the expression inside $...$, \(...\), or a display-math environment.
  2. Double superscript: write x^{2^n}, not x^2^n. Braces tell LaTeX which exponent belongs inside the other.
  3. Only one character is raised or lowered: write x_{total} rather than x_total.
  4. For chemical formulas in running text, consider the mhchem package instead of manually switching in and out of math mode.

Command Reference

CommandUse CaseMode
_SubscriptsMath mode
^SuperscriptsMath mode
\textsuperscriptSuperscriptsText mode
\textsubscriptSubscriptsText mode

Advanced Techniques

Multiple levels of subscripts and superscripts:

Side-by-side sub/superscripts:

Best Practices

  1. Always use curly braces for multi-character sub/superscripts
  2. Use math mode for mathematical expressions, even within text
  3. Consider readability when nesting multiple levels
  4. Use \textsubscript and \textsuperscript for non-mathematical content
  5. Be consistent with spacing around operators and relations

Try it free

Skip the syntax — let AI write it.

Snap a photo of an equation, a table, or full handwritten notes and Underleaf turns it into clean, compilable LaTeX in seconds. 10 free credits every month, no credit card required.

Convert your page
Handwritten notes converted into a typeset LaTeX document

How to Use Superscripts and Subscripts in LaTeX

Subscripts and superscripts are essential for mathematical notation, chemical formulas, and academic writing. This guide covers all the methods for creating sub and superscripts in LaTeX, both in math mode and text mode.

Basic Math Mode Usage

In math mode, use _ for subscripts and ^ for superscripts:

Common Applications

  1. Mathematical sequences:
  2. Chemical formulas:
  3. Powers and exponents:

Text Mode Options

For subscripts and superscripts in regular text, use the \textsuperscript and \textsubscript commands.

Common superscript and subscript errors

  1. Missing $ inserted: ^ and _ are math syntax. Put the expression inside $...$, \(...\), or a display-math environment.
  2. Double superscript: write x^{2^n}, not x^2^n. Braces tell LaTeX which exponent belongs inside the other.
  3. Only one character is raised or lowered: write x_{total} rather than x_total.
  4. For chemical formulas in running text, consider the mhchem package instead of manually switching in and out of math mode.

Command Reference

CommandUse CaseMode
_SubscriptsMath mode
^SuperscriptsMath mode
\textsuperscriptSuperscriptsText mode
\textsubscriptSubscriptsText mode

Advanced Techniques

Multiple levels of subscripts and superscripts:

Side-by-side sub/superscripts:

Best Practices

  1. Always use curly braces for multi-character sub/superscripts
  2. Use math mode for mathematical expressions, even within text
  3. Consider readability when nesting multiple levels
  4. Use \textsubscript and \textsuperscript for non-mathematical content
  5. Be consistent with spacing around operators and relations
Underleaf Logo
Underleaf

Practical tools for academic writing, document conversion, and research workflows.

Go to appContact us

Company

PricingBlogTutorialsConference TemplatesConference Deadlines

Free Tools

Image to LaTeXExcel to LaTeXArXiv to LaTeXTikZ GeneratorLaTeX Table GeneratorCitation GeneratorThesis GeneratorChrome ExtensionAll Tools

Ask AI about Underleaf

Ask ChatGPTAsk ClaudeAsk Perplexity

© 2026 Underleaf. All rights reserved.