Every device, in one place

Ways to enter the degree sign, U+00B0. On Windows the Alt code needs the numeric keypad, not the number row.
WhereWhat to press
Mac, anywhereOption + Shift + 8
Windows, anywhereAlt + 0176 (numeric keypad)
iPhone and iPadNumber keyboard, press and hold 0
AndroidSymbol keyboard, press and hold 0
WordType 00B0 then Alt + X
Google DocsInsert → Special characters, search "degree"
ExcelAlt + 0176, or CHAR(176) in a formula
LinuxCtrl + Shift + U, then 00b0, then Enter
HTML° or °
Any browserCopy it from the tool linked below

Mac

Option + Shift + 8 produces ° in every application, on every Mac keyboard layout that ships in the US and UK.

Two things worth knowing. Option + K gives you ˚, the ring above — a different character that looks almost the same and is not the degree sign. And press-and-hold on the 0 key does nothing on macOS; that trick is iOS only.

If you use it constantly, System Settings → Keyboard → Text Replacements will map something like degg to ° and sync it to your iPhone.

Windows

Alt + 0176, with Alt held down while you type the four digits on the numeric keypad. The number row along the top does not work — this is the single most common reason the shortcut appears to fail, and on a laptop without a keypad it means the Alt code is simply unavailable.

On those laptops, use one of these instead:

iPhone and Android

Both platforms hide it behind the zero.

  1. Tap 123 to switch to the number keyboard.
  2. Press and hold the 0.
  3. A small popup appears above the key with °.
  4. Slide your finger onto it and release.

On iOS the popup on 0 offers only the degree sign. Some Android keyboards put both ° and º in the same popup, which is where mixed-up characters often come from — take the one that sits higher on the line.

For repeat use, iOS Settings → General → Keyboard → Text Replacement is worth the thirty seconds. Android has the same idea under the personal dictionary.

The three characters that look identical

This is the part that causes real problems, because the damage is invisible until something sorts or searches wrongly.

Three characters that render almost identically at text size and are not interchangeable.
CharacterUnicodeNameCorrect use
°U+00B0Degree signTemperature, angles, coordinates
ºU+00BAMasculine ordinal indicatorSpanish and Portuguese ordinals: 1º
˚U+02DARing aboveA diacritic, as in Å

The ordinal indicator is the one that slips through most often, because on a Spanish or Portuguese keyboard it is easier to reach than the degree sign. A spreadsheet full of º will not match a search for °, and a screen reader announces it as an ordinal rather than a degree.

How to check which one you have

Paste the character into a search box and search your own document for °. If your text does not match, you have a lookalike. In a spreadsheet, UNICODE() in Excel or Google Sheets returns 176 for the correct character.

Writing temperatures properly

Once you can type the symbol, the remaining question is where the space goes.

For angles and coordinates the space always closes up: 45°, or 51°30′26″ N. The minute and second marks there are prime and double prime, not apostrophes and quotation marks — another pair of lookalikes with the same problem as the degree sign.

If you would rather not type it at all, the degree symbol tool puts °, °C, °F and K on your clipboard in one tap.