back to the MetroloPy documentation home page


MetroloPy built-in units

Units can be referenced by both name and alias. If a unit name or alias contains a space, '*', or '/' character then the name must be enclosed in square brackets, e.g: '[light year]'. If a unit name or alias contains parentheses and the text inside the parentheses can be interpreted as a Unit then the name must also be enclosed in square brackets. Units can be combined into derived units: spaces or the character '*' represent multiplication, the character '/' represents division and the string '**' represents the power operator. An example of a derived unit reference is 'kg m**2/s' which is equivalent to 'kilogram*metre*metre*second**-1' and to '(kg/s)*m**2'.

Users can also define custom units by creating instances of the Unit class or a sub-class.

The search_units function can list all available units:

In [1]:
from metrolopy import search_units
search_units(fmt='html')
  • 1
  • acre, 1 acre = 10 ch2
  • acre-foot, 1 acre ft = 43560 ft3, aliases: acre-ft, acre ft
  • ampere (20 prefixes), symbol: A, alias: A
  • ampere 90 (20 prefixes), 1 A90 = 1 V9090, alias: A(90)
  • angstrom, 1 Å = 1 × 10-10 m, alias: Å
  • arcminute, 1' = 1/60°, aliases: arcmin, '
  • arcsecond, 1" = 1/60', aliases: arcsec, "
  • astronomical unit, 1 au = 1.495 978 707 × 1011 m, aliases: au, ua
  • bar (20 prefixes), 1 bar = 100 000 Pa
  • barn, 1 b = 1 × 10-28 m2, alias: b
  • barrel, 1 bbl = 31.5 gal, aliases: bbl, liquid barrel, liquid bbl
  • becquerel (20 prefixes), 1 Bq = 1 1/s, alias: Bq
  • bel (log base 10, multiplier = 1), 0 B = 1
  • bit (16 prefixes), symbol: bit, alias: shannon
  • board-foot, 1 board-foot = 1 ft2 in, alias: board-ft
  • bohr, 1 a0 = 5.291 772 106 8(12) × 10-11 m, aliases: a0, a(0)
  • bushel, 1 bu = 4 pk, alias: bu
  • byte (16 prefixes), 1 B = 8 bit, alias: B
  • cable, 1 cb = 120 ftm, alias: cb
  • calorie, 1 cal = 4.184 J, aliases: cal, calth, thermochemical calorie
  • candela (20 prefixes), symbol: cd, alias: cd
  • chain, 1 ch = 4 rd, alias: ch
  • coulomb (20 prefixes), 1 C = 1 s A, alias: C
  • coulomb 90 (20 prefixes), 1 C90 = 1 V90 s/Ω90, alias: C(90)
  • cubic foot, 1 cu ft = 1 ft3, aliases: cu-ft, cu ft
  • cubic inch, 1 cu in = 1 in3, aliases: cu-in, cu in
  • cubic yard, 1 cu yd = 1 yd3, aliases: cu-yd, cu yd
  • cup, 1 cp = 0.5 pt, alias: cp
  • dalton (20 prefixes), 1 Da = 1.660 539 040(20) × 10-27 kg, alias: Da
  • day, 1 d = 24 h, aliases: d, D
  • decibel (log base 10, multiplier = 10), 0 dB = 1, aliases: dB, dB power, dB-p
  • decibel femtowatt (log base 10, multiplier = 10), 0 dBf = 1 fW, aliases: dBf, dB(fW)
  • decibel field (log base 10, multiplier = 20), 0 dB = 1, aliases: dB-f, dB field, dB root-power
  • decibel hertz (log base 10, multiplier = 10), 0 dB-Hz = 1 Hz, aliases: dB-Hz, dB(Hz)
  • decibel joule (log base 10, multiplier = 10), 0 dBJ = 1 J, aliases: dBJ, dB(J)
  • decibel kelvin (log base 10, multiplier = 10), 0 dBK = 1 K, aliases: dBK, dB(K)
  • decibel kilowatt (log base 10, multiplier = 10), 0 dBk = 1 kW, aliases: dBk, dB(kW)
  • decibel microvolt (log base 10, multiplier = 20), 0 dBμV = 1 μV, aliases: dBuV, dB(uV), dBμV
  • decibel microvolt per metre (log base 10, multiplier = 20), 0 dBμ = 1 μV/m, aliases: dBμ, dB(uV/m), decibel microvolt per meter
  • decibel millivolt (log base 10, multiplier = 20), 0 dBmV = 1 mV, aliases: dBmV, dB(mV)
  • decibel milliwatt (log base 10, multiplier = 10), 0 dBm = 1 mW, aliases: dBm, dB(mW)
  • decibel reciprocal kelvin (log base 10, multiplier = 20), 0 dB(K-1) = 1 1/K, aliases: dB(K**-1), dB(K⁻¹)
  • decibel reciprocal metre (log base 10, multiplier = 10), 0 dB(m-1) = 1 1/m, aliases: dB(m**-1), dB(m⁻¹), decibel reciprocal meter
  • decibel sound intensity level (log base 10, multiplier = 10), 0 dB = 1.0 × 10-12 W/m2, alias: dB(SIL)
  • decibel sound power level (log base 10, multiplier = 10), 0 dB = 1.0 × 10-12 W, aliases: dB(SWL), dB(pW)
  • decibel sound pressure level (log base 10, multiplier = 20), 0 dB = 20 μPa, aliases: dB(SPL), dB(20uPa)
  • decibel square metre (log base 10, multiplier = 10), 0 dBsm = 1 m2, aliases: dBsm, dB(m**2), decibel square meter
  • decibel u (log base 10, multiplier = 20), 0 dBu = 0.774 596 669 241 V, alias: dBu
  • decibel volt (log base 10, multiplier = 20), 0 dBV = 1 V, aliases: dBV, dB(V)
  • decibel watt (log base 10, multiplier = 10), 0 dBW = 1 W, aliases: dBW, dB(W)
  • decibel Z (log base 10, multiplier = 10), 0 dBZ = 1 mm6/m3, aliases: dBZ, dB(Z)
  • decibel μPa (log base 10, multiplier = 20), 0 dB = 1 μPa, alias: dB(uPa)
  • degree, 1° = 0.017 453 292 519 943 295 rad, aliases: deg, °
  • degree Celsius (non-linear unit), 0 °C = 273.15 K, aliases: degC, deg C, degree C, °C
  • degree Fahrenheit (non-linear unit), 0 °F = 459.67 °R, aliases: degF, deg F, degree F, °F
  • degree Rankine, 1 °R = 5/9 K, aliases: degR, deg R, degree R, °R
  • dram, 1 dr = 1/16 oz, alias: dr
  • dry barrel, 1 bu = 7056 in3, alias: dry-bbl
  • dry gallon, 1 gal = 107521/400 in3, alias: dry-gal
  • dry pint, 1 pt = 0.5 qt, alias: dry-pt
  • dry quart, 1 qt = 0.25 gal, alias: dry-qt
  • dyne (20 prefixes), 1 dyn = 1 × 10-5 N, alias: dyn
  • Earth mass, 1 M = 5.972 37(28) × 1024 kg, aliases: M(E), M⊕
  • electon mass, 1 me = 9.109 383 56(11) × 10-31 kg, alias: m(e)
  • electronvolt (20 prefixes), 1 eV = 1.602 176 634 × 10-19 J, alias: eV
  • elementary charge, 1 e = 1.602 176 634 × 10-19 C, alias: e
  • erg (20 prefixes), 1 erg = 1 × 10-7 J
  • farad (20 prefixes), 1 F = 1 C/V, alias: F
  • farad 90 (20 prefixes), 1 F90 = 1 s/Ω90, alias: F(90)
  • fathom, 1 ftm = 2 yd, alias: ftm
  • fluid dram, 1 fl dr = 60 min, aliases: fl-dr, fl dr
  • fluid ounce, 1 fl oz = 0.25 gi, aliases: fl-oz, fl oz
  • foot, 1 ft = 12 in, alias: ft
  • foot-pound, 1 ft·lb = 1 ft lbf, aliases: ft-lb, ft-lbf, ft·lb, ft·lbf
  • furlong, 1 fur = 10 ch, alias: fur
  • galileo (20 prefixes), 1 Gal = 1 cm/s2, alias: Gal
  • gallon, 1 gal = 231 in3, aliases: gal, liquid gal, liquid gallon
  • gasoline gallon equivalent, 1 gasoline-gallon-equivalent = 33.7 kW h, alias: gasoline-gallon-equivalent
  • gauss (20 prefixes), 1 G = 1 × 10-4 T, alias: G
  • gill, 1 gi = 0.5 cp, alias: gi
  • grain, 1 gr = 1/7000 lb, alias: gr
  • gray (20 prefixes), 1 Gy = 1 J/kg, alias: Gy
  • hand, 1 hand = 4 in
  • hartley, 1 Hart = 3.321 928 094 89 bit, aliases: Hart, ban, dit
  • hartree, 1 Eh = 1 ℏ2/(a02me), aliases: E_h, Ha
  • hectare, 1 ha = 1 hm2, alias: ha
  • henry (20 prefixes), 1 H = 1 Wb/A, alias: H
  • henry 90 (20 prefixes), 1 H90 = 1 Ω90 s, alias: H(90)
  • hertz (20 prefixes), 1 Hz = 1 1/s, alias: Hz
  • hogshead, 1 hogshead = 65 gal
  • horsepower, 1 hp = 550 ft lbf/s, alias: hp
  • hour, 1 h = 60 min, alias: h
  • hundredweight, 1 cwt = 100 lb, alias: cwt
  • inch (1 prefix), 1 in = 0.0254 m, alias: in
  • international prototype kilogram, 1 m(𝒦) = 1.000 000 000(12) kg, aliases: m(K), IPK
  • IT British thermal unit, 1 BTU = 1055.055 852 62 J, aliases: BTU, Btu
  • jansky, 1 Jy = 1 × 10-26 W/(Hz m2), alias: Jy
  • joule (20 prefixes), 1 J = 1 N m, alias: J
  • Julian year (4 prefixes), 1 a = 365.25 d, aliases: a, annum, year, yr
  • Jupiter mass, 1 MJ = 1.898 580(88) × 1027 kg, aliases: M(J), M(Jup)
  • katal (20 prefixes), 1 kat = 1 mol/s, alias: kat
  • kelvin (20 prefixes), symbol: K, alias: K
  • kelvin 54 (20 prefixes), 1 K54 = 1.000 000 00(37) K, alias: K(54)
  • kilogram (20 prefixes), symbol: kg, alias: kg
  • knot, 1 kn = 1 M/h, alias: kn
  • large calorie, 1 Cal = 1000 cal, aliases: Cal, Calorie, dietary calorie, kcal, kilocalorie
  • league, 1 lea = 3 mi, alias: lea
  • light hour, 1 light-hour = 1 h c, alias: light-hour
  • light minute, 1 light-minute = 1 min c, alias: light-minute
  • light second, 1 light-second = 1 c s, alias: light-second
  • light year, 1 ly = 1 a c, alias: ly
  • link, 1 li = 0.66 ft, alias: li
  • litre (20 prefixes), 1 L = 1 dm3, aliases: L, liter
  • long hundredweight, 1 long cwt = 112 lb, alias: long cwt
  • long ton, 1 long ton = 2240 lb
  • lumen (20 prefixes), 1 lm = 1 sr cd, alias: lm
  • lux (20 prefixes), 1 lx = 1 lm/m2, alias: lx
  • maxwell (20 prefixes), 1 Mx = 1 × 10-8 Wb, alias: Mx
  • metre (20 prefixes), symbol: m, aliases: m, meter
  • mile, 1 mi = 1760 yd, alias: mi
  • millibel milliwatt (log base 10, multiplier = 1000), 0 mBm = 1 mW, aliases: mBm, mB(mW)
  • millimetre of mercury, 1 mmHg = 133.322 387 415 Pa, alias: mmHg
  • minim, 1 min = 0.125 tsp
  • minute, 1 min = 60 s, alias: min
  • mole (20 prefixes), symbol: mol, alias: mol
  • moment magnitude (log base 10, multiplier = 2/3), -10.7 MW = 1.0 dyn cm, aliases: M(W), MMS
  • monochromatic AB magnitude (log base 10, multiplier = -2.5), 0 mAB = 3631.0 Jy, alias: m(AB)
  • natural unit of action, 1 ℏ = 1.054 571 817 646 156 5 × 10-34 J s, aliases: h-bar, ℏ
  • natural unit of information, 1 nat = 1.442 695 040 89 bit, aliases: nat, nepit, nit
  • nautical mile, 1 M = 1852 m, aliases: M, Nm, NM, nmi
  • neper (log base e, multiplier = 1), 0 Np = 1.0, alias: Np
  • newton (20 prefixes), 1 N = 1 kg m/s2, alias: N
  • nibble, 1 nibble = 4 bit, aliases: nybble, nyble
  • oersted (20 prefixes), 1 Oe = 79.577 471 545 947 67 A/m, alias: Oe
  • ohm (20 prefixes), 1 Ω = 1 V/A, alias: Ω
  • ohm 90 (20 prefixes), 1 Ω90 = 1.000 000 017 793 668... Ω, aliases: ohm(90), Ω(90)
  • oil barrel, 1 bbl = 42 gal
  • ounce, 1 oz = 1/16 lb, aliases: oz, avdp oz, avoirdupois ounce
  • parsec (3 prefixes), 1 pc = 206 264.806 247 096 36 au, alias: pc
  • part per billion, 1 ppb = 1 × 10-9, alias: ppb
  • part per million, 1 ppm = 1 × 10-6, alias: ppm
  • part per quadrillion, 1 ppq = 1 × 10-15, alias: ppq
  • part per trillion, 1 ppt = 1 × 10-12, alias: ppt
  • pascal (20 prefixes), 1 Pa = 1 N/m2, alias: Pa
  • peck, 1 pk = 2 gal, alias: pk
  • pennyweight, 1 dwt = 24 gr, alias: dwt
  • percent, 1% = 0.01, alias: %
  • phot (20 prefixes), 1 ph = 1 sr cd/cm2, alias: ph
  • pica, 1 P/ = 1/6 in, alias: P/
  • pint, 1 pt = 0.5 qt, aliases: pt, liquid pint, liquid pt
  • Planck charge, 1 qP = 1.875 546 038 15(22) × 10-18 C, alias: q(P)
  • Planck length, 1 lP = 1.616 228(38) × 10-35 m, alias: l(P)
  • Planck mass, 1 mP = 2.176 470(51) × 10-8 kg, alias: m(P)
  • Planck temperature, 1 TP = 1.416 808(33) × 1032 K, alias: T(P)
  • Planck time, 1 tP = 5.391 16(13) × 10-44 s, alias: t(P)
  • point, 1 p = 1/12 P/, alias: p
  • poise (20 prefixes), 1 P = 1 dyn s/cm2, alias: P
  • pound (1 prefix), 1 lb = 0.453 592 37 kg, aliases: lb, avdp lb, avoirdupois pound, lbm, pound mass
  • pound force, 1 lbf = 9.806 65 lb m/s2, alias: lbf
  • pound per square inch, 1 psi = 1 lbf/in2, alias: psi
  • pound-foot, 1 lb·ft = 1 ft lbf, aliases: lb-ft, lbf-lft, lbf·ft, lb·ft
  • proton mass, 1 mp = 1.672 621 898(21) × 10-27 kg, alias: m(p)
  • quart, 1 qt = 0.25 gal, aliases: qt, liquid qt, liquid quart
  • rack unit, 1 U = 1.75 in
  • radian (20 prefixes), 1 rad = 1 m/m, alias: rad
  • reduced compton wavelength, 1 ƛC = 1 ℏ/(mec), aliases: lambda(C), ƛ(C)
  • rod, 1 rd = 25 ft, alias: rd
  • root hertz, 1 √Hz = 1 Hz1/2, aliases: sqrtHz, √Hz
  • second (20 prefixes), symbol: s, alias: s
  • section, 1 section = 640 acre
  • short ton, 1 tn = 2000 lb, alias: tn
  • shot, 1 jig = 3 Tbsp, alias: jig
  • siemens (20 prefixes), 1 S = 1 A/V, aliases: S, mho
  • sievert (20 prefixes), 1 Sv = 1 J/kg, alias: Sv
  • siriometer, 1 Sm = 1 000 000 au
  • slug, 1 slug = 1 lbf s2/ft
  • solar mass, 1 M = 1.988 475(92) × 1030 kg, aliases: M(solar), M(Sun), M☉
  • speed of light, 1 c = 2.997 924 58 × 108 m/s, alias: c
  • square, 1 square = 100 ft2
  • standard atmosphere, 1 atm = 101 325 Pa, alias: atm
  • steradian (20 prefixes), 1 sr = 1 m2/m2, alias: sr
  • stilb (20 prefixes), 1 sb = 1 cd/cm2, alias: sb
  • stokes (20 prefixes), 1 St = 1 cm2/s, alias: St
  • survey foot, 1 ft = 1200/3937 m
  • survey mile, 1 mi = 8 fur, alias: statute mile
  • survey township, 1 twp = 36 section, alias: twp
  • tablespoon, 1 Tbsp = 0.5 fl oz, alias: Tbsp
  • teaspoon, 1 tsp = 1/3 Tbsp, alias: tsp
  • tesla (20 prefixes), 1 T = 1 Wb/m2, alias: T
  • thousandth of an inch, 1 mil = 0.001 in, aliases: mil, thou, thousandth
  • tonne (12 prefixes), 1 t = 1000 kg, aliases: t, metric ton
  • tons of TNT equivalent (3 prefixes), 1 t(TNT) = 4.184 GJ, aliases: t(TNT), tons of tnt, tons of TNT
  • torr (1 prefix), 1 Torr = 20265/152 Pa, alias: Torr
  • troy ounce, 1 oz t = 20 dwt, aliases: oz-t, oz t
  • troy pound, 1 lb t = 12 oz t, aliases: lb-t, lb t
  • volt (20 prefixes), 1 V = 1 W/A, alias: V
  • volt 90 (20 prefixes), 1 V90 = 71207857995393/71207850400000 V, alias: V(90)
  • volt ampere (20 prefixes), 1 VA = 1 V A, alias: VA
  • volt ampere reactive (20 prefixes), 1 var = 1 V A, alias: var
  • watt (20 prefixes), 1 W = 1 J/s, alias: W
  • watt 90 (20 prefixes), 1 W90 = 1 A90 V90, alias: W(90)
  • wavenumber, alias for: 1/cm
  • weber (20 prefixes), 1 Wb = 1 V s, alias: Wb
  • yard, 1 yd = 3 ft, alias: yd