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

When define the temperature of a variable in Celsius, Mathematica 9.0 does not calculate the right answer when multiplying by boltzmann constant.


Temperature1 = Quantity[100, "Celsius"];

Temperature2 = Quantity[373.15, "Kelvins"];

Temperature1 * Quantity["BoltzmannConstant"]

Temperature2 * Quantity["BoltzmannConstant"]
Quantity[1.38065*10^-21, "Joules"] <-- WRONG Answer

Quantity[5.15189*10^-21, "Joules"] <-- CORRECT Answer

Mathematica should be able to manage this units conversion, or there is something I'm doing wrong?

share|improve this question
You can send a bug report to ¯\(°_o)/¯ – ssch Sep 19 '13 at 19:33
What version are you using, I have got different output on V9.010 – Kuba Sep 19 '13 at 19:34
I have the same version V9.010 – Pedro Sep 19 '13 at 20:07
For me it doesn't compute, I get Quantity[373.15,Times["BoltzmannConstant","Kelvins"]]. Am I supposed to do something more with this to get it in Joules? – C. E. Sep 19 '13 at 20:13

Ignoring the fact that I don't get the same results using Mathematica

From the tutorial on temperature units:

When working with absolute temperatures, it is imperative to first standardize the units, to allow for proper unit conversions.

In this case it appears that you have to standardise both your temperatures and $k_b$ to obtain the result that you expect, i.e.

UnitConvert[Temperature1, "Kelvins"] UnitConvert[Quantity["BoltzmannConstant"],"Joules"/"Kelvins"]

(* 5.15189*10^-21 J *)
share|improve this answer
Thank you. My bad, I thought that mathematica would handle everything on its own. This is very tricky when having multiple variables and functions with different units. – Pedro Sep 20 '13 at 16:05
@Pedro - I sympathise, although it is a useful feature in practice it is difficult to use correctly -- especially when absolute temperatures are present. PS An up-vote is usually considered thanks enough! – MikeLimaOscar Sep 20 '13 at 16:11
Ok. I received an answer from Wolfram Technical Support. They are stating that this is a bug and that they are sending and incident report to the developers. – Pedro Sep 20 '13 at 21:48
This is a better way to see the error: t1 = Quantity[100, "Celsius"]; t2 = Quantity[327.15, "Kelvins"]; kk = Quantity[1, "BoltzmannConstant"]; UnitSimplify[(t1*kk)] UnitSimplify[(t2*kk)] – Pedro Sep 24 '13 at 18:30

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.