Unit Discovery

Mathematica's units system includes thousands of different quantities, including units, physical constants, and IndependentUnit expressions. Supported units include all those specified by NIST Special Publication 811.

Many quantities have multiple common names, which can make them difficult to find in a long list of possible units. Mathematica's built-in unit interpretation system allows you to specify units and physical constants using natural language input.

Use free-form linguistic inline input to make a Quantity expression.
In[1]:=
Click for copyable input
Out[1]//InputForm=
The electric constant is also commonly referred to as "vacuum permittivity" or "permittivity of free space".
In[2]:=
Click for copyable input
Out[2]=

You can use both WolframAlpha and Quantity to discover different units and physical constants using their various common names and abbreviations.

Wolfram|Alpha Integration

One method of unit discovery in Mathematica is the WolframAlpha function and the related free-form input methods it provides.

Use the WolframAlpha function with format to get the expression as output.
In[3]:=
Click for copyable input
Out[3]//InputForm=
The >> assumptions button allows you to disambiguate inputs that could have multiple interpretations.
In[4]:=
Click for copyable input
Use free-form linguistics inline to convert 0.9 times the speed of light into meters per second.
In[5]:=
Click for copyable input
Out[5]=
Get metabolic information about snorkeling as a Quantity expression from Wolfram|Alpha.
In[6]:=
Click for copyable input
In[7]:=
Click for copyable input
Out[7]//TableForm=
In[8]:=
Click for copyable input
Out[8]=

Quantity

Quantity will also automatically try and interpret unrecognized units. Once a unit has been interpreted, it will be cached so that subsequent evaluations will use the same result.

Interpret the unit and magnitude associated with Earth's gravity.
In[9]:=
Click for copyable input
Out[9]=
Use the cached result to convert Earth's gravity to its SI base units.
In[10]:=
Click for copyable input
Out[10]=

Unit interpretation requires internet connectivity, and can entail additional evaluation time. If speed is a concern, it is advisable to use the canonical unit specification, which can be found using InputForm.

In[11]:=
Click for copyable input
Out[11]=
In[12]:=
Click for copyable input
Out[12]//InputForm=
ClearSystemCache can be used to purge any cached Quantity expressions.
In[13]:=
Click for copyable input
Out[14]=
New to Mathematica? Find your learning path »
Have a question? Ask support »