UnitConvert
✖
UnitConvert

attempts to convert the specified quantity to the specified targetunit.
Details

- The targetunit can be a canonical unit or a Quantity expression.
- When targetunit is a Quantity, the resulting output will have the same unit as targetunit.
- A targetunit specification can also be one of the following unit systems: "SIBase", "SI", "Imperial", "Conventional" or "Metric".
- UnitConvert can separately convert temperatures and temperature differences. Temperatures are also converted into temperature differences by interpreting them as differences with respect to absolute zero.
- UnitConvert accepts TimeSeries, EventSeries, and TemporalData inputs and attempts to convert Quantity values to the specified targetunit.
- UnitConvert accepts Association inputs and attempts to convert Quantity values to the specified targetunit.
- An internet connection is required for conversion between currency units.
Examples
open allclose allBasic Examples (4)Summary of the most common use cases
Convert from miles to kilometers:

https://wolfram.com/xid/0en1uvxdw-crnaki

Convert a Quantity object to the appropriate SI base units:

https://wolfram.com/xid/0en1uvxdw-o2ibu8


https://wolfram.com/xid/0en1uvxdw-yhs2kv

Convert the speed of light to SI base units:

https://wolfram.com/xid/0en1uvxdw-hsddre

Convert to conventionally used units:

https://wolfram.com/xid/0en1uvxdw-nz6ze3


https://wolfram.com/xid/0en1uvxdw-g479qc


https://wolfram.com/xid/0en1uvxdw-8j7r4h

Scope (8)Survey of the scope of standard use cases
UnitConvert operates on lists of Quantity expressions:

https://wolfram.com/xid/0en1uvxdw-uppwpd


https://wolfram.com/xid/0en1uvxdw-8gai38

Convert Quantity expressions to their equivalent SI units:

https://wolfram.com/xid/0en1uvxdw-j2cgol


https://wolfram.com/xid/0en1uvxdw-wtvh8o

Get the SI unit value of a physical constant:

https://wolfram.com/xid/0en1uvxdw-3obxg0

Convert the values of a time series:

https://wolfram.com/xid/0en1uvxdw-xe3b82


https://wolfram.com/xid/0en1uvxdw-3giz9q


https://wolfram.com/xid/0en1uvxdw-hb4wdo


https://wolfram.com/xid/0en1uvxdw-fs0oqc

Convert the Quantity values of an association to SI base units:

https://wolfram.com/xid/0en1uvxdw-rdvcmk


https://wolfram.com/xid/0en1uvxdw-nj79uw

Convert the unit of a QuantityDistribution expression:

https://wolfram.com/xid/0en1uvxdw-ccvl1b


https://wolfram.com/xid/0en1uvxdw-huv8c

UnitConvert accepts structured arrays like QuantityArray or SymmetrizedArray objects:

https://wolfram.com/xid/0en1uvxdw-cz5c0r


https://wolfram.com/xid/0en1uvxdw-bvf6km

UnitConvert accepts Association specifications:

https://wolfram.com/xid/0en1uvxdw-jf7dmv

Applications (4)Sample problems that can be solved with this function
Use UnitConvert to examine the value of a unit in the "SIBase" unit system:

https://wolfram.com/xid/0en1uvxdw-mdvvxt


https://wolfram.com/xid/0en1uvxdw-bfqmk7


https://wolfram.com/xid/0en1uvxdw-flht76

Use UnitConvert to find the value of a unit derived from SI base units:

https://wolfram.com/xid/0en1uvxdw-wiiob


https://wolfram.com/xid/0en1uvxdw-2lide


https://wolfram.com/xid/0en1uvxdw-cha7mn

Find the range of masses in kilograms for different objects, from the universe to an electron:

https://wolfram.com/xid/0en1uvxdw-c9vepz

Compare the volume of different barrel units:

https://wolfram.com/xid/0en1uvxdw-cbp7lo


https://wolfram.com/xid/0en1uvxdw-nk4qz0

Properties & Relations (9)Properties of the function, and connections to other functions
The first argument of UnitConvert can be given as a unit string:

https://wolfram.com/xid/0en1uvxdw-jxh93n


https://wolfram.com/xid/0en1uvxdw-jz0o5

The targetunit specification can be a product or quotient of strings:

https://wolfram.com/xid/0en1uvxdw-yxg0e


https://wolfram.com/xid/0en1uvxdw-dzhin8

An independent unit can only be converted to itself and multiples or submultiples of itself:

https://wolfram.com/xid/0en1uvxdw-i3z4c


https://wolfram.com/xid/0en1uvxdw-bebvo5

The second argument of UnitConvert can be a MixedUnit specification:

https://wolfram.com/xid/0en1uvxdw-oig215

The units given in a MixedUnit specification do not need to be ordered:

https://wolfram.com/xid/0en1uvxdw-imth8e

UnitConvert can convert mixed Quantity objects:

https://wolfram.com/xid/0en1uvxdw-dr36yl


https://wolfram.com/xid/0en1uvxdw-c7r0py

UnitConvert will automatically attempt to interpret an unknown unit string:

https://wolfram.com/xid/0en1uvxdw-cwfwdk


https://wolfram.com/xid/0en1uvxdw-fc2zru


https://wolfram.com/xid/0en1uvxdw-dqz7pb

When the target unit is specified as a Quantity object, its magnitude will be ignored:

https://wolfram.com/xid/0en1uvxdw-gms1m7


https://wolfram.com/xid/0en1uvxdw-pcii86

The "SIBase" unit for "InformationUnit" is "Bits":

https://wolfram.com/xid/0en1uvxdw-l0a8fi

The "SIBase" unit for "MoneyUnit" is "USDollars":

https://wolfram.com/xid/0en1uvxdw-6tdsf

UnitConvert threads over lists:

https://wolfram.com/xid/0en1uvxdw-h0w80s


https://wolfram.com/xid/0en1uvxdw-3xb9r

Possible Issues (4)Common pitfalls and unexpected behavior
UnitConvert will return $Failed for incompatible specifications, such as those between different unit dimensions:

https://wolfram.com/xid/0en1uvxdw-5l5uvw



https://wolfram.com/xid/0en1uvxdw-gzf25p


UnitConvert[q,"SIBase"] typically converts all units to their SI base units:

https://wolfram.com/xid/0en1uvxdw-8a3iyj

For special cases where no SI unit is standard for the dimension, non-SI units are permitted in SI base form:

https://wolfram.com/xid/0en1uvxdw-feywf7


https://wolfram.com/xid/0en1uvxdw-gehh7j


https://wolfram.com/xid/0en1uvxdw-0znju9

When converting from a temperature to a temperature difference, the result will be given as a temperature difference from absolute zero:

https://wolfram.com/xid/0en1uvxdw-9rz94t



https://wolfram.com/xid/0en1uvxdw-fe2zjz

Conversions from temperature differences to temperatures are not permitted:

https://wolfram.com/xid/0en1uvxdw-7tjo34


Wolfram Research (2012), UnitConvert, Wolfram Language function, https://reference.wolfram.com/language/ref/UnitConvert.html (updated 2024).
Text
Wolfram Research (2012), UnitConvert, Wolfram Language function, https://reference.wolfram.com/language/ref/UnitConvert.html (updated 2024).
Wolfram Research (2012), UnitConvert, Wolfram Language function, https://reference.wolfram.com/language/ref/UnitConvert.html (updated 2024).
CMS
Wolfram Language. 2012. "UnitConvert." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2024. https://reference.wolfram.com/language/ref/UnitConvert.html.
Wolfram Language. 2012. "UnitConvert." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2024. https://reference.wolfram.com/language/ref/UnitConvert.html.
APA
Wolfram Language. (2012). UnitConvert. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/UnitConvert.html
Wolfram Language. (2012). UnitConvert. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/UnitConvert.html
BibTeX
@misc{reference.wolfram_2025_unitconvert, author="Wolfram Research", title="{UnitConvert}", year="2024", howpublished="\url{https://reference.wolfram.com/language/ref/UnitConvert.html}", note=[Accessed: 30-March-2025
]}
BibLaTeX
@online{reference.wolfram_2025_unitconvert, organization={Wolfram Research}, title={UnitConvert}, year={2024}, url={https://reference.wolfram.com/language/ref/UnitConvert.html}, note=[Accessed: 30-March-2025
]}