Written and maintained by CASRAI Editorial Board
Published · Last updated
On this page
Who this is for: researchers writing papers, theses or reports in LaTeX who need a degree sign (°) for an angle, a temperature or a coordinate, and want the right command for the context. After reading you can pick one command, load the package it needs, and know what it prints.
Short answer: in running text use \textdegree (a textcomp/TS1 command); \degree from gensymb works in both text and math mode; for angles and units use siunitx, \ang{30} for an angle and \qty{25}{\degreeCelsius} for a temperature.
What it is used for in research
The degree sign appears in angles (a 30° incidence angle), temperatures (25 °C), latitude and longitude, and rotation or orientation parameters. LaTeX has no single built-in “degree” key; the right command depends on whether the sign sits in text, in a formula, or inside a quantity with a unit. The table below maps each task to the command documented in the Comprehensive LaTeX Symbol List, the gensymb package page and the siunitx manual.
| Task | Command | Needs | Source |
|---|---|---|---|
| Degree sign in running text | \textdegree |
textcomp (TS1) symbol; part of the LaTeX distribution | Symbol List; CTAN textcomp |
| Degree sign in text or math with one command | \degree |
\usepackage{gensymb} |
CTAN gensymb; Symbol List |
| Degree sign inside a formula | ^\circ (or \ensuremath{^\circ}) |
standard math mode | Symbol List |
| Angle with a number | \ang{30}, \ang{1;2;3} |
\usepackage{siunitx} |
siunitx manual, section 3.2 |
| Temperature with a unit | \qty{25}{\degreeCelsius}, \qtyrange{2}{4}{\degreeCelsius} |
\usepackage{siunitx} |
siunitx manual |
| Celsius symbol as one glyph | \textcelsius or \celsius |
textcomp / gensymb | Symbol List; CTAN gensymb |
Install or access
All the packages above are free and distributed through CTAN, the Comprehensive TeX Archive Network. Per its CTAN page, textcomp “has been adopted as part of the LaTeX distribution”, so TS1 symbols such as \textdegree need no separate installation. Package pages: gensymb, textcomp, siunitx.
Step-by-step: how to write a degree in LaTeX
How to write a degree in LaTeX?
- Decide the context. Plain prose:
\textdegree. A number with an angle:\ang{}. A temperature or other quantity with a unit:\qty{}{}with\degreeCelsius. Inside an equation:^\circ. - Load the package if the command needs one. In the preamble:
\usepackage{gensymb}for\degreeand\celsius, or\usepackage{siunitx}for\angand\qty. - Type the command. Examples:
The beam hits the surface at 30\textdegree. Rotate by $90^\circ$. \ang{12.3} \ang{1;2;3} \qty{25}{\degreeCelsius} \qtyrange{2}{4}{\degreeCelsius} - Compile and check the output (see below).
Output and how to read it
The siunitx manual (v3.6.7, last revised 2026-11-06, read 2026-11-07) states that \ang takes the angle “either as a decimal number or as a semi-colon separated list of degrees, minutes and seconds, which is called arc format”. So \ang{12.3} prints 12.3° and \ang{1;2;3} prints 1° 2′ 3″. The manual’s example \qtyrange{2}{4}{\degreeCelsius} prints “2 °C to 4 °C”.
The Symbol List adds a note for formulas: if you prefer a larger degree symbol you might define one as \ensuremath{^\circ}. The gensymb page says its commands “work in both text and math mode” and that the package falls back to faking the symbol or taking it from a symbol font if it is absent (version 1.0.2).
Troubleshooting
\degreeis undefined. It comes from gensymb; add\usepackage{gensymb}to the preamble.\angor\qtyis undefined. They come from siunitx; load it in the preamble.\textdegreefails in an old setup. textcomp is now part of the LaTeX distribution according to its CTAN page, so updating the distribution is the cleaner fix.- Wrong command for the mode.
\textdegreeis a text-mode command; in a formula use^\circor\degree.
Free alternatives: which route to use
| Route | Suited to | Mode |
|---|---|---|
\textdegree (textcomp/TS1) |
A degree sign in prose | Text |
\degree (gensymb) |
One command for text and math, plus \celsius |
Text and math |
^\circ |
Angles inside equations | Math |
\ang, \qty (siunitx) |
Numbers with units, degree-minute-second angles | Text and math |
For the surrounding unit conventions see SI units in scientific writing.
FAQ
How to write a degree in LaTeX?
Use \textdegree in text, ^\circ in math, \degree with gensymb for either, or \ang{30} with siunitx when the degree belongs to a number.
How to write int in LaTeX?
The integral sign is \int, a standard math operator listed with \iint, \iiint and \oint in the Symbol List’s variable-sized operator tables. Example: $\int_0^1 f(x)\,dx$. For limits and multiple integrals see integration in LaTeX.
What is ALT 248?
It is a keyboard code entry, not a LaTeX command, so it is not what you put in a .tex file. The degree sign itself is Unicode U+00B0 (hex B0, decimal 176, as listed in the Symbol List’s encoding table). In LaTeX, produce it with the commands above.
How to type real numbers in LaTeX?
The set of real numbers ℝ is written with blackboard-bold R, \mathbb{R}; the Symbol List shows \mathbb among its math alphabets. Package requirements are covered in LaTeX mathbb. For Greek letters and other symbols see Greek symbols in LaTeX.
Sources
- siunitx manual, v3.6.7 (last revised 2026-11-06), CTAN: siunitx.pdf, section 3.2 Angles. Read 2026-11-07.
- Scott Pakin, The Comprehensive LaTeX Symbol List, CTAN: ctan.org/pkg/comprehensive (PDF dated 12 April 2026). Read 2026-11-07.
- gensymb on CTAN: ctan.org/pkg/gensymb. Read 2026-11-07.
- textcomp on CTAN: ctan.org/pkg/textcomp. Read 2026-11-07.







