Supported phisical costants

This section lists all available units, prefixes, and physical constants. These can be used via the Unit object, or via math.eval().


Mathlion comes with the following built-in units.

Base Unit
Length meter (m), inch (in), foot (ft), yard (yd), mile (mi), link (li), rod (rd), chain (ch), angstrom, mil
Surface area m2, sqin, sqft, sqyd, sqmi, sqrd, sqch, sqmil, acre, hectare
Volume m3, litre (l, L, lt, liter), cc, cuin, cuft, cuyd, teaspoon, tablespoon
Liquid volume minim (min), fluiddram (fldr), fluidounce (floz), gill (gi), cup (cp), pint (pt), quart (qt), gallon (gal), beerbarrel (bbl), oilbarrel (obl), hogshead, drop (gtt)
Angles rad (radian), deg (degree), grad (gradian), cycle, arcsec (arcsecond), arcmin (arcminute)
Time second (s, secs, seconds), minute (mins, minutes), hour (h, hr, hrs, hours), day (days), week (weeks), month (months), year (years), decade (decades), century (centuries), millennium (millennia)
Frequency hertz (Hz)
Mass gram(g), tonne, ton, grain (gr), dram (dr), ounce (oz), poundmass (lbm, lb, lbs), hundredweight (cwt), stick, stone
Electric current ampere (A)
Temperature kelvin (K), celsius (degC), fahrenheit (degF), rankine (degR)
Amount of substance mole (mol)
Luminous intensity candela (cd)
Force newton (N), dyne (dyn), poundforce (lbf), kip
Energy joule (J), erg, Wh, BTU, electronvolt (eV)
Power watt (W), hp
Pressure Pa, psi, atm, torr, bar, mmHg, mmH2O, cmH2O
Electricity and magnetism ampere (A), coulomb (C), watt (W), volt (V), ohm, farad (F), weber (Wb), tesla (T), henry (H), siemens (S), electronvolt (eV)
Binary bit (b), byte (B)

Note: all time units are based on the Julian year, with one month being 1/12th of a Julian year, a year being one Julian year, a decade being 10 Julian years, a century being 100, and a millennium being 1000.

Note that all relevant units can also be written in plural form, for example 5 meters instead of 5 meter or 10 seconds instead of 10 second.

Surface and volume units can alternatively be expressed in terms of length units raised to a power, for example 100 in^2 instead of 100 sqin.


The following decimal prefixes are available.

Name Abbreviation Value
deca da 1e1
hecto h 1e2
kilo k 1e3
mega M 1e6
giga G 1e9
tera T 1e12
peta P 1e15
exa E 1e18
zetta Z 1e21
yotta Y 1e24
Name Abbreviation Value
deci d 1e-1
centi c 1e-2
milli m 1e-3
micro u 1e-6
nano n 1e-9
pico p 1e-12
femto f 1e-15
atto a 1e-18
zepto z 1e-21
yocto y 1e-24

The following binary prefixes are available. They can be used with units bit (b) and byte (B).

Name Abbreviation Value
kibi Ki 1024
mebi Mi 1024^2
gibi Gi 1024^3
tebi Ti 1024^4
pebi Pi 1024^5
exi Ei 1024^6
zebi Zi 1024^7
yobi Yi 1024^8
Name Abbreviation Value
kilo k 1e3
mega M 1e6
giga G 1e9
tera T 1e12
peta P 1e15
exa E 1e18
zetta Z 1e21
yotta Y 1e24

Physical Constants

Mathlion includes the following physical constants. See Wikipedia for more information.

Universal constants

Name Symbol Value Unit
speedOfLight c 299792458 m · s-1
gravitationConstant G 6.6738480e-11 m3 · kg-1 · s-2
planckConstant h 6.626069311e-34 J · s
reducedPlanckConstant h 1.05457172647e-34 J · s

Electromagnetic constants

Name Symbol Value Unit
magneticConstant μ0 1.2566370614e-6 N · A-2
electricConstant ε0 8.854187817e-12 F · m-1
vacuumImpedance Z0 376.730313461 Ω
coulomb κ 8.9875517873681764e9 N · m2 · C-2
elementaryCharge e 1.60217656535e-19 C
bohrMagneton μB 9.2740096820e-24 J · T-1
conductanceQuantum G0 7.748091734625e-5 S
inverseConductanceQuantum G0-1 12906.403721742 Ω
magneticFluxQuantum f0 2.06783375846e-15 Wb
nuclearMagneton μN 5.0507835311e-27 J · T-1
klitzing RK 25812.807443484 Ω

Atomic and nuclear constants

Name Symbol Value Unit
bohrRadius a0 5.291772109217e-11 m
classicalElectronRadius re 2.817940326727e-15 m
electronMass me 9.1093829140e-31 kg
fermiCoupling GF 1.1663645e-5 GeV-2
fineStructure α 7.297352569824e-3 -
hartreeEnergy Eh 4.3597443419e-18 J
protonMass mp 1.67262177774e-27 kg
deuteronMass md 3.3435830926e-27 kg
neutronMass mn 1.6749271613e-27 kg
quantumOfCirculation h / (2me) 3.636947552024e-4 m2 · s-1
rydberg R 10973731.56853955 m-1
thomsonCrossSection 6.65245873413e-29 m2
weakMixingAngle 0.222321 -
efimovFactor 22.7 -

Physico-chemical constants

Name Symbol Value Unit
atomicMass mu 1.66053892173e-27 kg
avogadro NA 6.0221412927e23 mol-1
boltzmann k 1.380648813e-23 J · K-1
faraday F 96485.336521 C · mol-1
firstRadiation c1 3.7417715317e-16 W · m2
loschmidt n0 2.686780524e25 m-3
gasConstant R 8.314462175 J · K-1 · mol-1
molarPlanckConstant NA · h 3.990312717628e-10 J · s · mol-1
molarVolume Vm 2.241396820e-10 m3 · mol-1
sackurTetrode -1.164870823 -
secondRadiation c2 1.438777013e-2 m · K
stefanBoltzmann σ 5.67037321e-8 W · m-2 · K-4
wienDisplacement b 2.897772126e-3 m · K

Note that the values of loschmidt and molarVolume are at T = 273.15 K and p = 101.325 kPa. The value of sackurTetrode is at T = 1 K and p = 101.325 kPa.

Adopted values

Name Symbol Value Unit
molarMass Mu 1e-3 kg · mol-1
molarMassC12 M(12C) 1.2e-2 kg · mol-1
gravity gn 9.80665 m · s-2
atm atm 101325 Pa

Natural units

Name Symbol Value Unit
planckLength lP 1.61619997e-35 m
planckMass mP 2.1765113e-8 kg
planckTime tP 5.3910632e-44 s
planckCharge qP 1.87554595641e-18 C
planckTemperature TP 1.41683385e+32 K