Unified Code for Units of Measure

The Unified Code for Units of Measure (UCUM) is a system of codes for unambiguously representing measurement units. Its primary purpose is machine-to-machine communication rather than communication between humans. UCUM is used by different organizations like IEEE, and standards like DICOM, LOINC, HL7, and ISO 11240:2012.

The code set includes all units defined in ISO 1000, ISO 2955-1983, ANSI X3.50-1986,  HL7 and ENV 12435, and explicitly and verifiably addresses the naming conflicts and ambiguities in those standards to resolve them. It provides for representations of units in 7 bit ASCII for machine-to-machine communication, with unambiguous mapping between case-sensitive and case-insensitive representations.

A reference open-source implementation is available as a Java applet. There is also an OSGi-based implementation at Eclipse Foundation.

Base units
Units are represented in UCUM with reference to a set of seven base units. The UCUM base units are the metre for measurement of length, the second for time, the gram for mass, the coulomb for charge, the kelvin for temperature, the candela for luminous intensity, and the radian for plane angle. The UCUM base units form a set of mutually independent dimensions as required by dimensional analysis.

Some of the UCUM base units are different from the SI base units. UCUM is compatible with, but not isomorphic with, SI. There are four differences between the two sets of base units:
 * 1) The gram is the base unit of mass instead of the kilogram, since in UCUM base units do not have prefixes.
 * 2) Electric charge is the base quantity for electromagnetic phenomena instead of electric current, since the elementary charge of electrons is more fundamental physically.
 * 3) The mole is dimensionless in UCUM, since it can be defined in terms of the Avogadro number,
 * 4) The radian is a distinct base unit for plane angle, to distinguish angular velocity from rotational frequency and to distinguish the radian from the steradian for solid angles.

Metric and non-metric units
Each unit represented in UCUM is identified as either "metric" or "non-metric". Metric units can accept metric prefixes as in SI. Non-metric units are not permitted to be used with prefixes. All of the base units are metric.

UCUM refers to units that are defined on non-ratio scales as "special units". Common examples include the bel and degree Celsius. While these are not considered metric units by UCUM, UCUM nevertheless allows metric prefixes to be used with them where this is common practice.

Binary prefixes are also supported.

Arbitrary units
UCUM recognizes units that are defined by a particular measurement procedure, and which cannot be related to the base units. These units are identified as "arbitrary units". Arbitrary units are not commensurable with any other unit; measurements in arbitrary units cannot be compared with or converted into measurements in any other units. Many of the recognized arbitrary units are used in biochemistry and medicine.

Derived units
Any metric unit in any common system of units can be expressed in terms of the UCUM base units.