Is there a way to use the physical constants in calculations and have Mathematica 10 figure out the final unit and numerical magnitude? When I try

pcM = N[Quantity[1, "PlanckConstant"]]

I simply get 1. h without the numerical value of Planck constant. Subsequently, using this in all further steps, keeps the answer in h and does not work out units.

However, if I define the Planck constant by hand and use it in a calculation, everything works as expected. I am curious as to why the internally defined constants do not show up with numerical values.


  • $\begingroup$ what would you like the result to be, i.e. which units should it be with respect to? $\endgroup$ – chuy Aug 27 '14 at 15:19
  • 5
    $\begingroup$ I learned just a few days ago that one can (often) use UnitConvert for this sort of thing. In[199]:= UnitConvert[Quantity[1, "PlanckConstant"]] Out[199]= Quantity[6.626070*10^-34, ( "Kilograms" ("Meters")^2)/("Seconds")] $\endgroup$ – Daniel Lichtblau Aug 27 '14 at 15:20
  • 3
    $\begingroup$ or In[647]:= UnitConvert[Quantity[1, "PlanckConstant"], "eV*s"] Out[647]= Quantity[4.135668*10^-15, "Electronvolts" "Seconds"] $\endgroup$ – chuy Aug 27 '14 at 15:22

In physics, the Planck constant may be used as a natural unit.

If you want to switch to another unit system, use UnitConvert[].

For example, you can switch to standard SI units this way:

UnitConvert[Quantity[1, "PlanckConstant"], "SIBase"]

which will give you:

Quantity[6.626070*10^-34, ("Kilograms" ("Meters")^2)/("Seconds")]

This can be done at the end of calculation.

If you like to get rid of Quantity head, just do:


which outputs:

  • 1
    $\begingroup$ you can also use QuantityMagnitude to get the value out. $\endgroup$ – chuy Aug 27 '14 at 15:29
  • $\begingroup$ @chuy, indeed, thank you! $\endgroup$ – Alexey Bobrick Aug 27 '14 at 15:31
  • 3
    $\begingroup$ Or just UnitConvert without the second argument, which assumes SI units. $\endgroup$ – Mark Adler Aug 28 '14 at 3:40
  • $\begingroup$ @MarkAdler: definitely right! Though, of course, using the second argument is a bit more general. For example, in engeneering applications one unit measure can be used and in spectroscopy - something totally different. $\endgroup$ – Alexey Bobrick Aug 28 '14 at 8:04

You should use the Physical Constants Package by using

<< PhysicalConstants`

When you enter now


you directly get the Planck Constant. With

PlanckConstant/(Joule Second)

you get the Planck Constant without units.

  • 1
    $\begingroup$ True, but note that PhysicalConstants package is obsolete and has been biult into Mathematica since version 9. $\endgroup$ – Alexey Bobrick Aug 27 '14 at 15:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.