Complete guide to using degree symbols in LaTeX documents for scientific and mathematical writing
Quick & Universal
Basic Scientific
Professional
Text Mode
$^\circ$
Produces: °
\degree
Requires: gensymb
\degreeCelsius
Requires: siunitx
The simplest method doesn't require any additional packages:
$25^\circ$C
Produces: 25°C
You can also use it in math mode for angles:
$\theta = 90^\circ$
Produces: θ = 90°
Note: This method works in any LaTeX document without additional packages, but it creates a superscript symbol that may not align perfectly with text.
The gensymb package provides a dedicated degree symbol command:
\usepackage{gensymb}
25\degree C
Produces: 25°C
This method provides a properly aligned degree symbol that works well in both text and math modes.
The siunitx package is the most comprehensive solution for scientific units:
\usepackage{siunitx}
\SI{25}{\degreeCelsius}
Produces: 25°C
It also provides commands for other units:
\SI{90}{\degree}
For angles: 90°
\SI{77}{\degreeFahrenheit}
For Fahrenheit: 77°F
This package also handles proper spacing, automatic unit formatting, and is the recommended approach for scientific documents.
The textcomp package provides additional text symbols:
\usepackage{textcomp}
25\textdegree C
Produces: 25°C
This works well in text mode and provides good typographic quality.
\documentclass{article}
\usepackage[utf8]{inputenc}
\begin{document}
\section{Temperature Conversion}
The temperature is $25^\circ$C.
Water boils at $100^\circ$C and freezes at $0^\circ$C.
\end{document}
\documentclass{article}
\usepackage{siunitx}
\begin{document}
\section{Experimental Results}
\begin{itemize}
\item Initial temperature: \SI{25.3}{\degreeCelsius}
\item Final temperature: \SI{98.6}{\degreeCelsius}
\item Angle of incidence: \SI{45}{\degree}
\item Angular velocity: \SI{90}{\degree\per\second}
\end{itemize}
\end{document}
\documentclass{article}
\usepackage{amsmath}
\usepackage{gensymb}
\begin{document}
\section{Trigonometry}
For a right triangle:
\begin{align}
\sin(30^\circ) &= \frac{1}{2} \\
\cos(60^\circ) &= \frac{1}{2} \\
\tan(45^\circ) &= 1
\end{align}
\end{document}
| Method | Package | Command | Best For |
|---|---|---|---|
| Superscript | None | $^\circ$ | Quick usage, no setup |
| gensymb | gensymb | \degree | Basic scientific documents |
| siunitx | siunitx | \SI{25}{\degreeCelsius} | Professional scientific work |
| textcomp | textcomp | \textdegree | Text mode usage |
If you get an "undefined control sequence" error, make sure you've included the required package in your preamble.
The superscript method may create awkward spacing. Use siunitx or gensymb for better typographic quality and automatic spacing.
Some fonts may not display the degree symbol correctly. Try different font packages or use XeLaTeX/LuaLaTeX with system fonts if needed.
Room temperature: $22^\circ$C Body temperature: $37^\circ$C Boiling point: $100^\circ$C Freezing point: $0^\circ$C
Output: Room temperature: 22°C, etc.
\SI{25.3}{\degreeCelsius}
\SI{98.6}{\degreeFahrenheit}
\SI{-40}{\degreeCelsius}
\SI{373.15}{\kelvin}
Professional formatting with siunitx
% Trigonometry
$\sin(30^\circ) = \frac{1}{2}$
$\cos(60^\circ) = \frac{1}{2}$
% Geometry
$\angle ABC = 90^\circ$
$\theta = 45^\circ$
% Vector notation
$\vec{v} = |v| \angle 30^\circ$
Common mathematical expressions using degree symbols
Enhanced math formatting, useful for complex mathematical expressions involving degrees.
Additional mathematical symbols, though not specifically for degrees.
Color support for highlighting temperature data and visualizations.
For creating diagrams involving angles and degree measurements.