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^\circMath mode: a raised circle. Works everywhere, no package.
90^{\circ}\mathrm{C}Degrees Celsius in math mode.
\textdegreeText mode ° (textcomp, loaded by current LaTeX).
\degreeWorks in text and math with
\usepackage{gensymb}.- Text mode, no math preview
\ang{90}Angle with siunitx;
\ang{12;30;0}for degrees, minutes, seconds. - Text mode, no math preview
\qty{25}{\degreeCelsius}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.
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.
Angle
LaTeX\angle ABC = 90^\circTrigonometric value
LaTeX\sin 30^\circ = \frac{1}{2}Temperature
LaTeXT = 25\,^\circ\mathrm{C}Angle sum
LaTeX\alpha + \beta + \gamma = 180^\circDegrees to radians
LaTeX180^\circ = \pi \text{ rad}Degrees, minutes, seconds
LaTeX12^\circ 30' 15''
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.
\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;
\circis the ring used for degrees.Instead of90^oWrite90^\circ^and\circonly work in math mode; in text LaTeX stops with "Missing $ inserted".Instead ofThe angle is 90^\circ.WriteThe angle is $90^\circ$.Standard LaTeX has no
\degree; it comes from gensymb (MathJax accepts it without a package).Instead of\degree % without gensymbWrite\usepackage{gensymb}In math mode the C becomes an italic variable. Set the unit upright with
\mathrm.Instead of25^\circ CWrite25\,^\circ\mathrm{C}
In Overleaf, MathJax and Word
Overleaf and pdfLaTeX
^\circneeds nothing;\textdegreeworks in text in current TeX Live;\degreeneeds gensymb;\angand\qtyneed siunitx.MathJax and KaTeX
MathJax renders
^\circand also accepts\degree. KaTeX supports^\circand\degree. siunitx commands are not available on the web.Microsoft Word
In a Word equation,
\degreefollowed 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?
\degreecomes 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
^\circinstead.
Related LaTeX reference
- How to Write Percent in LaTeXWhy % hides the rest of the line, how to print it with \%, and how to format percentages with siunitx.
- Greek Letters in LaTeXEvery lowercase and uppercase Greek letter with its command, the var- forms, and bold or upright Greek.
- How to Write a Subscript in LaTeX_ for subscripts and ^ for superscripts, braces for more than one character, text indices, both at once and scripts in text mode.
- LaTeX equation editorSymbol panel, live preview, and PNG, SVG, MathML or Word export.
- All LaTeX reference pagesSymbols, math structures and text formatting in one list.
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