Calculate with Units
The Wolfram Language has sophisticated built-in functions for computing with, converting and analyzing quantities with units.
Put quantities with units into your Inputs
Enter quantities with units using either natural language input or Quantity. See Enter Quantities with Units for details:
Convert to different units if necessary
Use UnitConvert to convert to different units if necessary:
Extract quantities without units
- The second argument to QuantityMagnitude is optional, but it is safest to specify it explicitly if the first argument is a computation, since units may change in the course of a computation.
For large arrays of quantities with units, use QuantityArray for the best computational and representational efficiency:
Some computations whose inputs do not have units yield outputs with units:
Natural language queries often return quantities with units:
Many Wolfram Language functions work properly with inputs that have units:
In contrast to most units, dimensionless units behave like numbers in many situations: