Temperature Units
Temperature versus Temperature Difference | Subtracting Temperatures |
Kelvin | Multiplying Temperatures |
Converting Temperatures | Dividing Temperatures |
Adding Temperatures |
Handling of temperatures requires special care because temperatures are typically expressed in scales, like Celsius or Fahrenheit, with an arbitrary choice of zero. Differences of temperatures are standard quantities with a well-defined zero value. Therefore, a distinction between temperatures and temperature differences is needed. The Wolfram Language quantity framework distinguishes "DegreesCelsius" as a unit of temperature from "DegreesCelsiusDifference" as a unit of temperature difference. Both have unit dimensions of "TemperatureUnit".
Temperature units represent the hotness of matter and are measured using a thermometer that uses a scale such as Fahrenheit, Celsius or Kelvin. Common instances of temperature may be measuring ambient temperature, the body temperature of a patient or the boiling point of a substance. Temperature scales have a zero value that may or may not correspond to absolute zero.
In[20]:=20

✖
https://wolfram.com/xid/0bexwfejg8hzmqec-evxma1
Out[20]=20

In[23]:=23

✖
https://wolfram.com/xid/0bexwfejg8hzmqec-7t7ha4
Out[23]=23

In[21]:=21

✖
https://wolfram.com/xid/0bexwfejg8hzmqec-50njvw
Out[21]=21

Temperature differences represent the relative distance between temperatures, also measured using a temperature scale. Temperature differences are typically used to indicate a change in temperature, or the difference between two temperatures, and thus do not typically directly reference absolute zero.
In[227]:=227

✖
https://wolfram.com/xid/0bexwfejg8hzmqec-u4j4ps
Out[227]=227

In[33]:=33

✖
https://wolfram.com/xid/0bexwfejg8hzmqec-l6s47f
Out[33]=33

Temperatures expressed in Kelvin are equivalent to differences with respect to absolute zero, and therefore there is no need to separate units of temperature and temperature difference in Kelvin.
In[228]:=228

✖
https://wolfram.com/xid/0bexwfejg8hzmqec-r154pp
Out[228]=228

In[229]:=229

✖
https://wolfram.com/xid/0bexwfejg8hzmqec-x7kuva
Out[229]=229

In[88]:=88

✖
https://wolfram.com/xid/0bexwfejg8hzmqec-j0jt7w
Out[88]=88

Find the temperature difference between the critical-point temperature for water and carbon dioxide:
In[89]:=89

✖
https://wolfram.com/xid/0bexwfejg8hzmqec-gnn3zm
Out[89]=89

Temperatures may be freely converted from one scale to another, such as converting from Fahrenheit to Celsius or Kelvins using UnitConvert:
In[90]:=90

✖
https://wolfram.com/xid/0bexwfejg8hzmqec-i41lee
Out[90]=90

In[91]:=91

✖
https://wolfram.com/xid/0bexwfejg8hzmqec-3hflhh
Out[91]=91

In[92]:=92

✖
https://wolfram.com/xid/0bexwfejg8hzmqec-6g731p
Out[92]=92

In[93]:=93

✖
https://wolfram.com/xid/0bexwfejg8hzmqec-9lu4ww
Out[93]=93

Exceptionally, temperatures may be converted into temperature differences, being interpreted as temperature differences from absolute zero.
A warning message will be emitted when a temperature in degrees Celsius or Fahrenheit is converted into a temperature difference:
In[94]:=94

✖
https://wolfram.com/xid/0bexwfejg8hzmqec-rzu9sq

Out[94]=94

That computation is equivalent to first converting to Kelvins and then converting into a temperature difference:
In[95]:=95

✖
https://wolfram.com/xid/0bexwfejg8hzmqec-lo9jvr
Out[95]=95

In[96]:=96

✖
https://wolfram.com/xid/0bexwfejg8hzmqec-uhpglq
Out[96]=96

Another way to understand conversion of temperatures into temperature differences is as a difference with absolute zero:
In[98]:=98

✖
https://wolfram.com/xid/0bexwfejg8hzmqec-3fe32o

Out[98]=98

In[99]:=99

✖
https://wolfram.com/xid/0bexwfejg8hzmqec-lqprj2
Out[99]=99

In[100]:=100

✖
https://wolfram.com/xid/0bexwfejg8hzmqec-p7udf9
Out[100]=100

In[230]:=230

✖
https://wolfram.com/xid/0bexwfejg8hzmqec-nw2e0w

Out[230]=230

In[97]:=97

✖
https://wolfram.com/xid/0bexwfejg8hzmqec-p3a7y8
Out[97]=97

For arithmetic operations like addition, the distinction between temperature and temperature difference units impacts the resulting quantity arithmetic. Temperature difference units may be added to a temperature to produce a temperature, temperature difference units may be added to produce a temperature difference or temperatures may be added to produce a temperature.
In[28]:=28

✖
https://wolfram.com/xid/0bexwfejg8hzmqec-yhea6c
Out[28]=28

In[29]:=29

✖
https://wolfram.com/xid/0bexwfejg8hzmqec-bzuhcj
Out[29]=29

In[30]:=30

✖
https://wolfram.com/xid/0bexwfejg8hzmqec-9kgx94
Out[30]=30

In[31]:=31

✖
https://wolfram.com/xid/0bexwfejg8hzmqec-1hk9vw
Out[31]=31

When adding two temperature quantities, the result will be the sum of the values including the difference from absolute zero. The result of summing two temperatures is equivalent to converting those temperatures to Kelvin and then summing, with results canonically given in Kelvin:
In[111]:=111

✖
https://wolfram.com/xid/0bexwfejg8hzmqec-lssil1
Out[111]=111

In[112]:=112

✖
https://wolfram.com/xid/0bexwfejg8hzmqec-u9irpe
Out[112]=112

In[117]:=117

✖
https://wolfram.com/xid/0bexwfejg8hzmqec-6rsz1y
Out[117]=117

In[118]:=118

✖
https://wolfram.com/xid/0bexwfejg8hzmqec-g9iafn
Out[118]=118

In[116]:=116

✖
https://wolfram.com/xid/0bexwfejg8hzmqec-pm1g4p
Out[116]=116

Temperature differences represent the distance between two temperatures, and thus the result of subtracting one temperature from another is a temperature difference. Temperature differences may also be subtracted from a temperature to produce another temperature. Subtracting a temperature from a temperature difference will also produce a temperature, one that is equivalent to the inverted sign of that temperature difference subtracted from the temperature.
In[37]:=37

✖
https://wolfram.com/xid/0bexwfejg8hzmqec-ei156k
Out[37]=37

In[38]:=38

✖
https://wolfram.com/xid/0bexwfejg8hzmqec-ccwomz
Out[38]=38

In[43]:=43

✖
https://wolfram.com/xid/0bexwfejg8hzmqec-ru12s7
Out[43]=43

In[44]:=44

✖
https://wolfram.com/xid/0bexwfejg8hzmqec-epndtn
Out[44]=44

In[45]:=45

✖
https://wolfram.com/xid/0bexwfejg8hzmqec-o7p4rd
Out[45]=45

In[46]:=46

✖
https://wolfram.com/xid/0bexwfejg8hzmqec-pmoknh
Out[46]=46

Multiplication of temperatures is equivalent to adding temperatures and is canonically given in Kelvin. Because some temperature scales' zero values do not represent absolute zero, multiplication by a negative number will not migrate the sign into the temperature quantity.
In[46]:=46

✖
https://wolfram.com/xid/0bexwfejg8hzmqec-2prbnh
Out[46]=46

In[125]:=125

✖
https://wolfram.com/xid/0bexwfejg8hzmqec-esvt42
Out[125]=125

In[130]:=130

✖
https://wolfram.com/xid/0bexwfejg8hzmqec-0vv88z
Out[130]=130

In[131]:=131

✖
https://wolfram.com/xid/0bexwfejg8hzmqec-e8vmef
Out[131]=131

In[132]:=132

✖
https://wolfram.com/xid/0bexwfejg8hzmqec-gvicda
Out[132]=132

Division by temperature units will produce a quantity equivalent to the temperature converted to Kelvin before division, with results canonically given in Kelvin. Division of one temperature by another will result in a numeric ratio given by the value of both temperatures in Kelvin.
In[49]:=49

✖
https://wolfram.com/xid/0bexwfejg8hzmqec-jtdgwu
Out[49]=49

In[50]:=50

✖
https://wolfram.com/xid/0bexwfejg8hzmqec-kilmok
Out[50]=50

In[67]:=67

✖
https://wolfram.com/xid/0bexwfejg8hzmqec-3h8lcv
Out[67]=67

In[51]:=51

✖
https://wolfram.com/xid/0bexwfejg8hzmqec-5c3ypo
Out[51]=51

In[74]:=74

✖
https://wolfram.com/xid/0bexwfejg8hzmqec-h1is6l

Out[74]=74

In[55]:=55

✖
https://wolfram.com/xid/0bexwfejg8hzmqec-dexa5h
Out[55]=55

In[56]:=56

✖
https://wolfram.com/xid/0bexwfejg8hzmqec-cntvlm
Out[56]=56
