See the
UCUM Specification for full descriptions of grammar and syntax rules.
A UCUM
defined prefix can be applied to metric units, e.g. kg for
kilogram (where k is the prefix kilo and g is the base unit gram).
Simple units may be
raised to a power by appending an integer number to the end of the
unit term, e.g., m2 for a square meter. Negative exponents must be
preceded by a minus sign ('-'). Positive exponents may be preceded by
a plus sign ('+') although the sign may be omitted.
All units can be combined in an
algebraic term using the operators for multiplication (period '.')
and division (solidus '/'), e.g., 2.m.
No blanks are allowed within the unit expression.
Multiple terms in an expression must be separated by an arithmetic
operator - either the multiplication operator (.) or the division
operator (/), e.g., 2.m, not 2m.
The multiplication operator (.) must be explicity specified; it is never
assumed.
While the multiplication operator (.) must appear between two unit terms,
the division operator (/) may appear at the beginning of the expression,
indicating inversion of the following term. So /dL is a valid unit
indicating "per deciliter". However, the division
operator normally appears between two terms.
Terms are evaluated from left to right, with multiplication and
division having the same precedence.
Parentheses
may be used to override normal left-to-right evaluation
of an expreession. For example kg/m.s2 divides kg by m and multiplies
the result by s2. kg/(m.s2) divides kg by the result of multiplying
m by s2.
Disclaimer: Conversion results are for
demonstration purposes only. Before relying on the unit conversions
produced by this tool it is your obligation to perform your own tests
to verify that the results are sufficiently accurate for your purposes.
See the
UCUM Specification for full descriptions of grammar and syntax rules.
A UCUM
defined prefix can be applied to metric units, e.g. kg for
kilogram (where k is the prefix kilo and g is the base unit gram).
Simple units may be
raised to a power by appending an integer number to the end of the
unit term, e.g., m2 for a square meter. Negative exponents must be
preceded by a minus sign ('-'). Positive exponents may be preceded by
a plus sign ('+') although the sign may be omitted.
All units can be combined in an
algebraic term using the operators for multiplication (period '.')
and division (solidus '/'), e.g., 2.m.
No blanks are allowed within the unit expression.
Multiple terms in an expression must be separated by an arithmetic
operator - either the multiplication operator (.) or the division
operator (/), e.g., 2.m, not 2m.
The multiplication operator (.) must be explicity specified; it is never
assumed.
While the multiplication operator (.) must appear between two unit terms,
the division operator (/) may appear at the beginning of the expression,
indicating inversion of the following term. So /dL is a valid unit
indicating "per deciliter". However, the division
operator normally appears between two terms.
Terms are evaluated from left to right, with multiplication and
division having the same precedence.
Parentheses
may be used to override normal left-to-right evaluation
of an expreession. For example kg/m.s2 divides kg by m and multiplies
the result by s2. kg/(m.s2) divides kg by the result of multiplying
m by s2.
Validate all unit expressions in a CSV file
We can validate unit expressions in a comma separated
values file on your system.
Use the browse button below to select the file.
Your file must meet the following requirements:
a comma is used to separate values;
the first row must be column headers;
if the value in the cell contains commas, double quotes
or newlines characters, you will need to enclose the value in double
quotes and where you want to use double quotes, repeat them twice.
(Example: A cell value of Say "Hi" would become "Say ""Hi""".)
You will then be asked for the name of the column that contains
the expressions to be validated.
A copy of your file will be created that includes three
additional columns at the end, confirming what expression was
validated, the validation results, and any relevant notes.
You will be asked where you want the file saved. You may
change the name of the output file at that time.
Note that this will only validate unit expressions.
Although prefixes used with a unit code, e.g., "kL" (kiloliter),
are recognized as prefixes ("k" for kilo) modifying a unit code
("L" for liter), a prefix submitted by itself, e.g., "E" (exa)
will result in an "invalid unit code" return.
Name of the column that contains the expressions to be validated
About the UCUM-LHC Library
Here is a description of the UCUM-LHC
Software Library.
The ucum-essence.xml file has also been extended with commonly used
combinations of UCUM units found in LOINC,
and LOINC properties have been added to UCUM records.