units.constants
physical constants with their units, like the speed of light c and gravity’s G
Physical constants, with their units, so they work in calculations with quantities.
good to know
Section titled “good to know”Planck’s constant is h_planck, since h is hours, and the electron’s charge is e_charge, since e is 2.718…. Assigning to a name like c hides the constant for the rest of the session.
The constants’ values are from CODATA 2022.
Tags: science
syntax
Section titled “syntax”1# speed of light2c299792458 m/s3# gravitational constant4G6.6743e-11 m^3/kg/s^25# Planck constant6h_planck6.62607e-34 J*s7# reduced Planck constant8hbar1.05457e-34 J*s9# Boltzmann constant10k_B1.38065e-23 J/K11# Avogadro constant12N_A6.02214e23 1/mol13# gas constant14R8.31446 J/mol/K15# elementary charge16e_charge1.60218e-19 coulomb17# electron mass18m_e9.10938e-31 kg19# proton mass20m_p1.67262e-27 kg21# standard gravity22g09.80665 m/s^223# vacuum permittivity24eps08.85419e-12 farad/m25# vacuum permeability26mu00.00000125664 N/A^227# Stefan-Boltzmann constant28sigma5.67037e-8 W/m^2/K^429# fine-structure constant30alpha_fs0.0072973531# Bohr radius32a05.29177e-11 m33# Rydberg constant34R_inf10973732 1/m35# classical electron radius36r_e2.81794e-15 m37# Thomson cross section38sigma_T6.65246e-29 m^239# neutron mass40m_n1.67493e-27 kg41# muon mass42m_mu1.88353e-28 kg43# tau mass44m_tau3.16754e-27 kg45# deuteron mass46m_d3.34358e-27 kg47# alpha particle mass48m_alpha6.64466e-27 kg49# atomic mass unit50m_u1.66054e-27 kg51# W boson mass52m_W1.43271e-25 kg53# Z boson mass54m_Z1.62557e-25 kg55# Higgs boson mass56m_H2.23189e-25 kg57# Coulomb constant58k_e8987551786 N*m^2/C^259# Faraday constant60faraday96485.3 coulomb/mol61# impedance of free space62Z0376.73 Ω63# Bohr magneton64mu_B9.27401e-24 J/T65# nuclear magneton66mu_N5.05078e-27 J/T67# magnetic flux quantum68Phi02.06783e-15 Wb69# Josephson constant70K_J483597848416984 Hz/V71# von Klitzing constant72R_K25812.8 Ω73# conductance quantum74cond_quantum0.0000774809 S75# Wien displacement constant76b_wien0.00289777 m*K77# first radiation constant78c1_rad3.74177e-16 W*m^279# second radiation constant80c2_rad0.0143878 m*K81# molar volume of an ideal gas at 0 °C and 1 atm82V_m0.022414 m^3/mol83# Loschmidt constant84n02.68678e25 1/m^3Example outputCtrl+Enter to run
More examples
Section titled “More examples”constants
Section titled “constants”1# the energy in 1 kg of mass, E = mc²21 kg * c**2 to J8.98755e16 J3# how long sunlight takes to reach Earth41 au / c to min8.31675 min5# photon energy of green light6h_planck * c / 530 nm to eV2.33932 eV7# the weight of 70 kg870 kg * g0686.465 NExample outputCtrl+Enter to run
Example results generated on 2026-11-04. Ones using now, today or randomness will differ when you run them.