# Physical (and other) constants

As Mathematica documentation likes to say, "As of Version 9.0, physical constant functionality is built into the Wolfram Language". After clicking on the ">>", one gets Units main help page. But there is no mention of physical (or any other for that matter) constants any more. What I would really like is a list of all available constants from various disciplines. The list that actually is only available is for the old PhysicalConstants package. Maybe there are some more but how am I supposed to find that out? Also Mathematica may probably understand "StefanBoltzmannConstant" but it actually is called "StefanConstant" in the engine and there is extra processing necessary to interpret these non-exact inputs.

Finally, is there any more pleasant way to get the value of the constant? The only way that I have found is UnitConvert[Quantity[1,"SpeedOfLight"],"SIBase"] and this is really ugly; what I am looking for is the old way of accessing the constants by just writing their name eg. SpeedOfLight.

• Quiet[<< PhysicalConstants] Commented Oct 31, 2016 at 19:43
• Must say I find it mighty annoying how the documentation pages for "obsolete" functions rarely give you a direct pointer to the relevant new functionality Commented Oct 31, 2016 at 19:48
• BTW your last expression can be somewhat more compact as simply UnitConvert[Quantity["SpeedOfLight"]], since '1' and 'SIBase' are default.. Commented Oct 31, 2016 at 20:01
• And can be made more compact still with UnitConvert@"SpeedOfLight", since it seems you only need to use the Quantity command within UnitConvert when you have quantities other than 1. Further, since you are only converting a single constant, you can use Prefix (@). For multiple constants and/or units, you would need Postfix (//) or square brackets. Commented Mar 26, 2017 at 20:33

You can look through all of the units for the ones that are physical constants:

Quantity@"m";
Sort@Keys@QuantityUnitsPrivate$UnitReplacementRules  (You need the initial run of Quantity on a fresh kernel to load the package for the QuantityUnits context to be available.) Below is my attempt at extracting the constants from that list. The one in the list is in fact StefanBoltzmannConstant, not StefanConstant. To get the values in SI units you would do something like UnitConvert@Quantity@"StefanBoltzmannConstant". Also in reference to a comment in another answer here, NIST in fact does call it the Standard Acceleration of Gravity. AlphaParticleMass AstronomicalUnit AtomicMassUnit AtomicMassUnitChemical AtomicMassUnitPhysical AvogadroConstant AvogadroConstantFoxHill AvogadroConstantNewSI AvogadroConstantValueFoxHill AvogadroNumber BohrMagneton BohrQuadrupoleMagnetons BohrRadius BoltzmannConstant BoltzmannConstantNewSI BoltzmannConstantTemperatureDifferenceUnit CeresMass CeresSolarMassRatio Cesium133HyperfineSplittingFrequency ChandrasekharLimit ClassicalElectronRadius ClassicalProtonRadius CMBElectromagneticEnergyDensity CosmologicalConstantValueDarkEnergyBased Critical1DDipoleMoment Critical3DDipoleMoment DeuteronMagneticMoment DeuteronMass EarthEquatorialRadius EarthMass EarthMeanRadius EarthMoonMassRatio EarthPolarRadius EarthRateUnits EarthVolume EinsteinConstantSpeedOfLightSquared EinsteinConstantSpeedOfLightToTheFourth ElectricBohrDipoleMoment ElectricBohrQuadrupoleMoment ElectricConstant ElectronAbsoluteMass ElectronComptonFrequency ElectronComptonWavelength ElectronGFactor ElectronMagneticMoment ElectronMass ElectronRelativeAtomicMass ElectronSchroedingerConstants ElectronSpinGFactor ElectronWaveMass ElementaryCharge ElementaryChargeNewSI ErisMass FaradayConstant FaradayConstantForConventionalElectricCurrent FermiCouplingConstant FineStructureConstant FineStructureConstantGradient FirstFowlerNordheimConstant FirstRadiationConstant FirstRadiationConstantSpectralRadianceValue FixedNucleusAtomSchroedingerConstants FreeElectronGyromagneticRatio GaussianGravitationalConstant GeocentricGravitationalConstantTCB GeocentricGravitationalConstantTDB GeocentricGravitationalConstantTT GravitationalConstant GravitationalConstantGradient GravitationalCouplingConstantElectronElectron GravitationalCouplingConstantElectronProton GravitationalCouplingConstantProtonProton HadronicHagedornTemperature HiggsBosonMass HubbleConstant HydrogenAtomSchroedingerConstants IdealGasMolarVolume JosephsonConstant JosephsonConstantConventional JovianSolarDays JupiterMass JupiterVolume LorenzNumber LoschmidtConstant MachSpeed MagneticConstant MagneticCouplingConstant MagneticFineStructureConstant MagneticFluxQuantum MarsMass MartianSolarDays MartianYears MeanEarthSunDistance MeanMoonEarthDistance MeanSolarConstant MeanSolarDays MeanSolarHours MercuryMass MolarGasConstant MolarMassOfCarbon12 MolarPlanckConstant MoonEarthMassRatio MoonGeopotential MoonVolume MuonComptonWavelength MuonGFactor MuonMagneticMoment MuonMass NeutronComptonWavelength NeutronGFactor NeutronMagneticMoment NeutronMass NonlinearQEDEffectsOnsetElectromagneticEnergyDensity NuclearMagnetons OortConstantA OortConstantB PallasMass PallasSolarMassRatio PlanckConstant PlanckConstantNewSI PlanckCurveMaximumWRTFrequency PlutoMass ProtonArea ProtonComptonWavelength ProtonElectronMassRatio ProtonGFactor ProtonMagneticMoment ProtonMass ProtonProtonElasticCrossSectionAtCenterOfMassEnergy10GeV ProtonProtonTotalCrossSectionAtCenterOfMassEnergy10GeV ProtonRadius QCDScale QEDVacuumImpedance QuantizedHallConductance QuantizedHallResistance RadiationConstant ReducedElectromagneticPlanckConstant ReducedInverseMechanicalEquivalentOfLight ReducedPlanckConstant RelativisticReducedPlanckMass RydbergConstant RydbergConstantHydrogen RydbergFrequency SackurTetrodeConstant SaturnMass SchottkyNordheimBarrierConstant SchottkyNordheimConstant SecondFowlerNordheimConstant SecondRadiationConstant SolarConstant SolarLuminosity SolarMass SolarMassParameterTCB SolarMassParameterTDB SolarRadius SolarSchwarzschildRadius SommerfeldNordheimConstant SpeedOfLight SpeedOfSound StandardAccelerationOfGravity StefanBoltzmannConstant StefanBoltzmannConstant1D StefanBoltzmannConstant2D StefanBoltzmannConstant4D StefanBoltzmannConstant5D StrongCouplingConstant SunEarthMassRatio SunErisMassRatio SunJupiterMassRatio SunLuminousFlux SunLuminousIntensity SunMarsMassRatio SunMercuryMassRatio SunNeptuneMassRatio SunPlutoMassRatio SunSaturnMassRatio SunUranusMassRatio SunVenusMassRatio SunVolume TauComptonWavelength TauMass TauonMagneticMoment ThompsonLampardCalculableCapacitorCapacitance ThomsonCrossSection UniverseAge UniverseMass UranusMass VacuumEnergyDensityInOurUniverseDarkEnergyBased VenusMass VestaMass VestaSolarMassRatio WeakMixingAngleConstant WienWavelengthDisplacementLawConstant  Here is that list in a form that you can copy and paste to get the list of strings: {"AlphaParticleMass", "AstronomicalUnit", "AtomicMassUnit", \ "AtomicMassUnitChemical", "AtomicMassUnitPhysical", \ "AvogadroConstant", "AvogadroConstantFoxHill", \ "AvogadroConstantNewSI", "AvogadroConstantValueFoxHill", \ "AvogadroNumber", "BohrMagneton", "BohrQuadrupoleMagnetons", \ "BohrRadius", "BoltzmannConstant", "BoltzmannConstantNewSI", \ "BoltzmannConstantTemperatureDifferenceUnit", "CeresMass", \ "CeresSolarMassRatio", "Cesium133HyperfineSplittingFrequency", \ "ChandrasekharLimit", "ClassicalElectronRadius", \ "ClassicalProtonRadius", "CMBElectromagneticEnergyDensity", \ "CosmologicalConstantValueDarkEnergyBased", "Critical1DDipoleMoment", \ "Critical3DDipoleMoment", "DeuteronMagneticMoment", "DeuteronMass", \ "EarthEquatorialRadius", "EarthMass", "EarthMeanRadius", \ "EarthMoonMassRatio", "EarthPolarRadius", "EarthRateUnits", \ "EarthVolume", "EinsteinConstantSpeedOfLightSquared", \ "EinsteinConstantSpeedOfLightToTheFourth", \ "ElectricBohrDipoleMoment", "ElectricBohrQuadrupoleMoment", \ "ElectricConstant", "ElectronAbsoluteMass", \ "ElectronComptonFrequency", "ElectronComptonWavelength", \ "ElectronGFactor", "ElectronMagneticMoment", "ElectronMass", \ "ElectronRelativeAtomicMass", "ElectronSchroedingerConstants", \ "ElectronSpinGFactor", "ElectronWaveMass", "ElementaryCharge", \ "ElementaryChargeNewSI", "ErisMass", "FaradayConstant", \ "FaradayConstantForConventionalElectricCurrent", \ "FermiCouplingConstant", "FineStructureConstant", \ "FineStructureConstantGradient", "FirstFowlerNordheimConstant", \ "FirstRadiationConstant", \ "FirstRadiationConstantSpectralRadianceValue", \ "FixedNucleusAtomSchroedingerConstants", \ "FreeElectronGyromagneticRatio", "GaussianGravitationalConstant", \ "GeocentricGravitationalConstantTCB", \ "GeocentricGravitationalConstantTDB", \ "GeocentricGravitationalConstantTT", "GravitationalConstant", \ "GravitationalConstantGradient", \ "GravitationalCouplingConstantElectronElectron", \ "GravitationalCouplingConstantElectronProton", \ "GravitationalCouplingConstantProtonProton", \ "HadronicHagedornTemperature", "HiggsBosonMass", "HubbleConstant", \ "HydrogenAtomSchroedingerConstants", "IdealGasMolarVolume", \ "JosephsonConstant", "JosephsonConstantConventional", \ "JovianSolarDays", "JupiterMass", "JupiterVolume", "LorenzNumber", \ "LoschmidtConstant", "MachSpeed", "MagneticConstant", \ "MagneticCouplingConstant", "MagneticFineStructureConstant", \ "MagneticFluxQuantum", "MarsMass", "MartianSolarDays", \ "MartianYears", "MeanEarthSunDistance", "MeanMoonEarthDistance", \ "MeanSolarConstant", "MeanSolarDays", "MeanSolarHours", \ "MercuryMass", "MolarGasConstant", "MolarMassOfCarbon12", \ "MolarPlanckConstant", "MoonEarthMassRatio", "MoonGeopotential", \ "MoonVolume", "MuonComptonWavelength", "MuonGFactor", \ "MuonMagneticMoment", "MuonMass", "NeutronComptonWavelength", \ "NeutronGFactor", "NeutronMagneticMoment", "NeutronMass", \ "NonlinearQEDEffectsOnsetElectromagneticEnergyDensity", \ "NuclearMagnetons", "OortConstantA", "OortConstantB", "PallasMass", \ "PallasSolarMassRatio", "PlanckConstant", "PlanckConstantNewSI", \ "PlanckCurveMaximumWRTFrequency", "PlutoMass", "ProtonArea", \ "ProtonComptonWavelength", "ProtonElectronMassRatio", \ "ProtonGFactor", "ProtonMagneticMoment", "ProtonMass", \ "ProtonProtonElasticCrossSectionAtCenterOfMassEnergy10GeV", \ "ProtonProtonTotalCrossSectionAtCenterOfMassEnergy10GeV", \ "ProtonRadius", "QCDScale", "QEDVacuumImpedance", \ "QuantizedHallConductance", "QuantizedHallResistance", \ "RadiationConstant", "ReducedElectromagneticPlanckConstant", \ "ReducedInverseMechanicalEquivalentOfLight", "ReducedPlanckConstant", \ "RelativisticReducedPlanckMass", "RydbergConstant", \ "RydbergConstantHydrogen", "RydbergFrequency", \ "SackurTetrodeConstant", "SaturnMass", \ "SchottkyNordheimBarrierConstant", "SchottkyNordheimConstant", \ "SecondFowlerNordheimConstant", "SecondRadiationConstant", \ "SolarConstant", "SolarLuminosity", "SolarMass", \ "SolarMassParameterTCB", "SolarMassParameterTDB", "SolarRadius", \ "SolarSchwarzschildRadius", "SommerfeldNordheimConstant", \ "SpeedOfLight", "SpeedOfSound", "StandardAccelerationOfGravity", \ "StefanBoltzmannConstant", "StefanBoltzmannConstant1D", \ "StefanBoltzmannConstant2D", "StefanBoltzmannConstant4D", \ "StefanBoltzmannConstant5D", "StrongCouplingConstant", \ "SunEarthMassRatio", "SunErisMassRatio", "SunJupiterMassRatio", \ "SunLuminousFlux", "SunLuminousIntensity", "SunMarsMassRatio", \ "SunMercuryMassRatio", "SunNeptuneMassRatio", "SunPlutoMassRatio", \ "SunSaturnMassRatio", "SunUranusMassRatio", "SunVenusMassRatio", \ "SunVolume", "TauComptonWavelength", "TauMass", \ "TauonMagneticMoment", \ "ThompsonLampardCalculableCapacitorCapacitance", \ "ThomsonCrossSection", "UniverseAge", "UniverseMass", "UranusMass", \ "VacuumEnergyDensityInOurUniverseDarkEnergyBased", "VenusMass", \ "VestaMass", "VestaSolarMassRatio", "WeakMixingAngleConstant", \ "WienWavelengthDisplacementLawConstant"}  Then if you want to make symbols out of all of them, you can do (where % assumes that you just evaluated that list): (Evaluate[Symbol[#]] = Quantity@#) & /@ %  or: (Evaluate[Symbol[#]] = UnitConvert@Quantity@#) & /@ %  I'd prefer the first one, so that the symbol SpeedOfLight shows 1 c. However you might like the second version better, for which SpeedOfLight shows as 299792458 m/s. Either way, you'll get the same answers when used in calculations if you apply the UnitConvert at the end. Update: Fixed in 12.0! EntityList["PhysicalConstant"]  • What version are you using? I have V11.0.0 and your code returns an error. Do I have to load something? Commented Oct 31, 2016 at 23:30 • You're right. I got an error with a fresh kernel. You need to do something like Quantity["SpeedOfLIght"] first, which apparently loads the quantities, and then it works. I am using 11.0.1, but this should work on 10. Commented Oct 31, 2016 at 23:39 • Yes, that works. Thanks. Commented Oct 31, 2016 at 23:40 • @MarkAdler Very nice! When I run your code Quantity@"m"; Sort@Keys@QuantityUnitsPrivate$UnitReplacementRules I get a combined list of all 4959 (units + physical constants). What code did you use to extract out the 193 physical constants you listed? I ask because I notice your list of physical constants, while convenient and useful (using your list as a starting point, I was able to make a nice table of those 193 physical constants and their values), is not comprehensive, e.g., it doesn't contain the 27 physical constants starting with "AUs...", e.g., "AUsCapacitance", "AUsConductance", etc... Commented Mar 27, 2017 at 2:51
• As noted: "Below is my attempt at extracting the constants from that list." I simply manually pulled out what I thought were potentially useful physical constants. Commented Mar 27, 2017 at 5:04
Quiet[<< PhysicalConstants]
Names["PhysicalConstants*"]


{"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"}

then do Quantity /@ % you will see only a handful are not recognized.

Interestingly Quantity["AccelerationDueToGravity"] fails..( Quantity wants "StandardAccelerationOfGravity"` , which is technically incorrect )

• But this makes use of the obsolete package and thus the whole list is just the list of the constant from the obsolete package? What makes sure that the constants in the obsolete package are the same as those implemented in new versions, plus what if they have different names (and thus their interpretation is slower)? Commented Oct 31, 2016 at 21:21
• It would be a simple exercise to see if any of the values are different. Commented Nov 1, 2016 at 0:22