How to Write the Degree Celsius Symbol (℃) in LaTeX

In LaTeX, you can write the degree Celsius symbol (℃) using the \degree command combined with C, or using the \textcelsius command from the textcomp package.

The following examples show how to write the degree Celsius symbol in LaTeX.

How to Write the Degree Celsius Symbol in Text

We can use the \degree command combined with C, or the \textcelsius command to write the degree Celsius symbol in LaTeX document for text.

Suppose we want to write the degree Celsius symbol in the text.

We can use the following LaTeX code to do so:

\documentclass{article}
\usepackage{textcomp}
\begin{document}

This is an example of using the degree Celsius symbol \( 25^\circ\mathrm{C} \) in a sentence.

This is another example using the \textcelsius command: \( 25\,\textcelsius \).

\end{document}

Output: 👇️

This is an example of using the degree Celsius symbol 25°C in a sentence.

This is another example using the \textcelsius command: 25°C.

In this example, both the ^\circ\mathrm{C} and \textcelsius commands to display the degree Celsius symbol in the text.

How to Write the Degree Celsius Symbol in Mathematical Expressions

For mathematical expressions, We can use the ^\circ\mathrm{C} or \textcelsius commands to ensure proper formatting.

Suppose we would like to write mathematical expressions that contain the degree Celsius symbol.

We can use the following LaTeX code to do so:

\documentclass{article}
\usepackage{textcomp}
\begin{document}

An inline mathematical expression: \( 25^\circ\mathrm{C} \).

A displayed mathematical expression:
\[
25^\circ\mathrm{C}
\]


\end{document}

Output: 👇️

Degree Celsius Symbol

In this example, both the ^\circ\mathrm{C} and \textcelsius commands to denote the degree Celsius symbol in both inline and displayed mathematical expressions.

Conclusion

We can use the ^\circ\mathrm{C} command or the \textcelsius command from the textcomp package for both text and mathematical expressions.