Mathematica Stack Exchange is a question and answer site for users of Mathematica. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.


share|improve this question
what would you like the result to be, i.e. which units should it be with respect to? – chuy Aug 27 '14 at 15:19
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")] – Daniel Lichtblau Aug 27 '14 at 15:20
or In[647]:= UnitConvert[Quantity[1, "PlanckConstant"], "eV*s"] Out[647]= Quantity[4.135668*10^-15, "Electronvolts" "Seconds"] – chuy Aug 27 '14 at 15:22
up vote 19 down vote accepted

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:

share|improve this answer
you can also use QuantityMagnitude to get the value out. – chuy Aug 27 '14 at 15:29
@chuy, indeed, thank you! – Alexey Bobrick Aug 27 '14 at 15:31
Or just UnitConvert without the second argument, which assumes SI units. – Mark Adler Aug 28 '14 at 3:40
@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. – 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.

share|improve this answer
True, but note that PhysicalConstants package is obsolete and has been biult into Mathematica since version 9. – Alexey Bobrick Aug 27 '14 at 15:49

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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