How Do I Use Standard Physical Constants in Mathematica?

In order to make use of standard physical constants in Mathematica, it is useful to load the Miscellaneous`PhysicalConstants` package.

Needs["Miscellaneous`PhysicalConstants`"]

The constants in this package are defined using updated values from the following source:

Peter J. Mohr and Barry N. Taylor, "CODATA Recommended Values of the Fundamental Physical Constants: 1998" (CODATA 1998), http://physics.nist.gov/cuu/Constants.

Also published in Journal of Physical and Chemical Reference Data 28, no. 6 (1999) 1713-1852; Reviews of Modern Physics 72, no. 2 (2000) 351-495; and CRC Handbook of Chemistry and Physics, 80th ed. (HCAP 80), edited by David R. Lide (1999-2000).

As of CODATA 1998, some conventions used for the electron and muon g-factors and for the electron, muon, and neutron magnetic moments are different than before; they are all expressed as a negative number in CODATA 1998, and a factor of two that was previously divided out of the electron g-factor is present. For QuantizedHallConductance, HCAP 80 gives a value for e2/h, while CODATA 1998 gives a value for 2e2/h. The CODATA value was taken, and the factor of 2 was divided out to match the HCAP value and the previous use in this package.

When this package is loaded, a combination of 74 physical constants and SI units of measure are defined. All of the constants defined in this package are expressed in SI units. A complete list of symbols can be found below.

As with any symbol in Mathematica, you can obtain a description of the symbol by evaluating an expression such as the following.

?AccelerationDueToGravity

AccelerationDueToGravity is the acceleration of a body freely falling in a vacuum.

To see the value of any constant, simply evaluate the symbol name of the desired constant as follows.

CosmicBackgroundTemperature

2.726 Kelvin

Calculations can be carried out using any of the defined constants. In this example, the energy of a photon is calculated based on a specified wavelength.

energy[lambda_] := (PlanckConstant*SpeedOfLight)/lambda

energy[400*10^-9 Meter]

4.96611 × 10^-19 Joule

Here is a list of all of the symbols defined when the Miscellaneous`PhysicalConstants` package is loaded.

Flatten[Names/@{"Miscellaneous`PhysicalConstants`*",
        "Miscellaneous`SIUnits`*"}]

{AccelerationDueToGravity, AgeOfUniverse, AvogadroConstant, BohrRadius, BoltzmannConstant, ClassicalElectronRadius, CosmicBackgroundTemperature, DeuteronMagneticMoment, DeuteronMass, EarthMass, EarthRadius, ElectronCharge, ElectronComptonWavelength, ElectronGFactor, ElectronMagneticMoment, ElectronMass, FaradayConstant, FineStructureConstant, GalacticUnit, GravitationalConstant, HubbleConstant, IcePoint, MagneticFluxQuantum, MolarGasConstant, MolarVolume, MuonGFactor, MuonMagneticMoment, MuonMass, NeutronComptonWavelength, NeutronMagneticMoment, NeutronMass, PlanckConstant, PlanckConstantReduced, PlanckMass, ProtonComptonWavelength, ProtonMagneticMoment, ProtonMass, QuantizedHallConductance, RydbergConstant, SackurTetrodeConstant, SolarConstant, SolarLuminosity, SolarRadius, SolarSchwarzschildRadius, SpeedOfLight, SpeedOfSound, StefanConstant, ThomsonCrossSection, VacuumPermeability, VacuumPermittivity, WeakMixingAngle, Amp, Ampere, Becquerel, Candela, Coulomb, Farad, Gray, Henry, Hertz, Joule, Kelvin, Kilogram, Lumen, Lux, Meter, Mole, Ohm, Pascal, Siemens, Tesla, Volt, Watt, Weber}

For more information on physical constants and their use in Mathematica, refer to the Documentation Center.