Which character you just copied
The degree sign is U+00B0. In HTML it is ° or °. In a spreadsheet formula it is CHAR(176) in Excel or CHAR(176) in Google Sheets.
It is used for three unrelated things, all of which happen to be called degrees: temperature on the Celsius and Fahrenheit scales, angles, and geographic coordinates. Kelvin is the exception — it takes a bare K and never a degree sign, because it was redefined in 1967 as an absolute unit rather than a scale of degrees.
The lookalikes
| Character | Code point | Name | Belongs in |
|---|---|---|---|
| ° | U+00B0 | Degree sign | Temperature, angles, coordinates |
| º | U+00BA | Masculine ordinal indicator | Spanish and Portuguese ordinals — 1º |
| ˚ | U+02DA | Ring above | A diacritical mark, as in Å |
| ∘ | U+2218 | Ring operator | Mathematics — function composition |
The ordinal indicator is the one that causes real trouble, because it is easy to reach on Spanish and Portuguese keyboards and sits at nearly the same height as the degree sign. Text containing a mixture will not search or sort consistently, and a screen reader announces the two differently.
Writing it correctly
- 20 °C — the international standard: space between number and unit, degree sign attached to the letter.
- 20°C — standard American practice. Also fine, as long as you are consistent.
- 20° C — incorrect under both conventions. The degree sign belongs to the C.
- 20° — correct when the scale is obvious from context.
- 293 K — no degree sign, and the space stays.
- 45° and 51°30′26″ N — angles and coordinates close the space up entirely.
If you need to type it rather than copy it
The shortcut for every platform, plus the lookalike traps in more detail, is in how to type the degree symbol. The short version: Option + Shift + 8 on a Mac, Alt + 0176 on Windows using the numeric keypad, and press and hold the zero on a phone's number keyboard.
If you use it dozens of times a day, a text replacement is worth setting up once — macOS and iOS share them through iCloud, and Android has the same idea in its personal dictionary.