Degree Symbol in LaTeX

The quickest degree symbol is a superscript circle in math mode: $90^\circ$ gives 90°. In running text use \textdegree, and for units such as °C in scientific writing use the siunitx package: \qty{25}{\degreeCelsius}.

Ways to write the degree sign

  • 90^\circ
    90 ∘

    Math mode: a raised circle. Works everywhere, no package.

  • 90^{\circ}\mathrm{C}
    90 ∘ C

    Degrees Celsius in math mode.

  • \textdegree
    °

    Text mode ° (textcomp, loaded by current LaTeX).

  • \degree
    °

    Works in text and math with \usepackage{gensymb}.

  • \ang{90}
    Text mode, no math preview

    Angle with siunitx; \ang{12;30;0} for degrees, minutes, seconds.

  • \qty{25}{\degreeCelsius}
    Text mode, no math preview

    Temperature with siunitx (v3; older versions use \SI).

Try it live

Change the formula and the preview redraws as you type. Copy the LaTeX, download a PNG or SVG, copy it for Word, or use Edit here on any example below to load it.

Templates

Degree symbol examples

Each result below is drawn from the LaTeX under it. Copy the code, edit it on this page, or open it in the full editor.

Which method to choose

For an occasional angle in a formula, ^\circ is enough and works in every LaTeX setup, including MathJax. It is a superscript of the composition circle, so it sits a little higher and lighter than a font degree sign.

If the degree sign appears in text as well as formulas, gensymb gives one command, \degree, for both. For lab reports and papers with many measurements, siunitx is the most consistent: it sets the number, the spacing and the unit together and follows the style rules for °C.

LaTeX
\usepackage{siunitx}
...
The sample was heated to \qty{80}{\degreeCelsius} and rotated by \ang{45}.

Degrees Celsius and spacing

SI style puts a space between the number and °C (25 °C) but no space before a plain angle degree sign (45°). With ^\circ you add the space yourself with \,; siunitx does it for you.

Common mistakes

  • A superscript letter o is italic and the wrong shape; \circ is the ring used for degrees.

    Instead of
    90^o
    Write
    90^\circ
  • ^ and \circ only work in math mode; in text LaTeX stops with "Missing $ inserted".

    Instead of
    The angle is 90^\circ.
    Write
    The angle is $90^\circ$.
  • Standard LaTeX has no \degree; it comes from gensymb (MathJax accepts it without a package).

    Instead of
    \degree  % without gensymb
    Write
    \usepackage{gensymb}
  • In math mode the C becomes an italic variable. Set the unit upright with \mathrm.

    Instead of
    25^\circ C
    Write
    25\,^\circ\mathrm{C}

In Overleaf, MathJax and Word

  • Overleaf and pdfLaTeX

    ^\circ needs nothing; \textdegree works in text in current TeX Live; \degree needs gensymb; \ang and \qty need siunitx.

  • MathJax and KaTeX

    MathJax renders ^\circ and also accepts \degree. KaTeX supports ^\circ and \degree. siunitx commands are not available on the web.

  • Microsoft Word

    In a Word equation, \degree followed by Space gives the degree sign through Math AutoCorrect. In text, Insert › Symbol or Alt+0176 on Windows. Copy for Word from the editor here pastes angles as editable equations.

Degree symbol in LaTeX: questions

How do I write the degree symbol in LaTeX?
In math mode write ^\circ, for example $45^\circ$. In text use \textdegree.
How do I write degrees Celsius?
Use \qty{25}{\degreeCelsius} with siunitx, or $25\,^\circ\mathrm{C}$ without packages.
Why is \degree undefined?
\degree comes from the gensymb package. Add \usepackage{gensymb} or use ^\circ.
Can I type ° directly?
In text with UTF-8 input (the default in current LaTeX) ° prints the degree sign. Inside math mode, use ^\circ instead.

Have the formula as a picture?

Paste a screenshot or photo of the equation and get its LaTeX, ready to copy or open in the editor.

Convert an image to LaTeX