GNU Units converts quantities expressed in various systems of measurement to their equivalents in other systems of measurement. Like many similar programs, it can handle multiplicative scale changes. It can also handle nonlinear conversions such as Fahrenheit to Celsius or wire gauge, and it can convert from and to sums of units, such as converting between meters and feet plus inches.
Beyond simple unit conversions, GNU Units can be used as a general-purpose scientific calculator that keeps track of units in its calculations. You can form arbitrary complex mathematical expressions of dimensions including sums, products, quotients, powers, and even roots of dimensions. Thus you can ensure accuracy and dimensional consistency when working with long expressions that involve many different units that may combine in complex ways.
The units are defined in an external data file. You can use the extensive data file that comes with this program, or you can provide your own data file to suit your needs. You can also use your own data file to supplement the standard data file.
Two simple conversion examples:
You have: mile You want: km * 1.609344 / 0.62137119 You have: furlongs per fortnight You want: m/s * 0.00016630986 / 6012.8727
A calculation involving roots of units:
You have: (400 W/m^2 / stefanboltzmann)^(1/4) You have: Definition: 289.80882 K
Temperature differences are converted using the syntax shown above with unit names like degC and degF. But conversion of absolute temperatures requires a different syntax:
You have: tempF(45) You want: tempC 7.2222222
Converting from a sum of units:
You have: 17 yards + 2 feet + 5 inches You want: meter * 16.2814 / 0.06141978Converting to a sum of units such as hours plus minutes or feet plus inches:
You have: 7 meters You want: ft;in 22 ft + 11.590551 inConverting a sixth of a (US) cup to common US measures:
You have: 1|6 cup You want: usvol 2 tbsp + 2 tsp
Units can be found on the main GNU ftp server: http://ftp.gnu.org/gnu/units/ (via HTTP) and ftp://ftp.gnu.org/gnu/units/ (via FTP). It can also be found on the GNU mirrors; please use a mirror if possible.
Documentation for Units is available online, as is documentation for most GNU software. You may also find more information about Units by running info units or man units, or by looking at /usr/share/doc/units/, /usr/local/doc/units/, or similar directories on your system. A brief summary is available by running units --help. The units definitions can generally be found in /usr/share/units/.
- Test releases
- Trying the latest test release (when available) is always appreciated. Test releases of Units can be found at http://alpha.gnu.org/gnu/units/ (via HTTP) and ftp://alpha.gnu.org/gnu/units/ (via FTP).
is currently being maintained by
All general bug reports, feature requests or thoughts should go to him.
- The Windows binary distribution is maintained by Jeff Conrad.
Units is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version.