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

Three characters that are nearly indistinguishable at text size and are not interchangeable.
CharacterCode pointNameBelongs in
°U+00B0Degree signTemperature, angles, coordinates
ºU+00BAMasculine ordinal indicatorSpanish and Portuguese ordinals — 1º
˚U+02DARing aboveA diacritical mark, as in Å
U+2218Ring operatorMathematics — 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

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.