When I evaluate this expression:

UnitConvert[Quantity[1920*1080, "Bytes"]*Quantity[24, "1/Seconds"] + 
     Quantity[44, "Kilohertz"]*Quantity[16, "Bits"], 

I get an error message:

UnitConvert::unkunit: Unable to interpret unit specification 1MB/s. >>

But the units should be compatible. FWIW, the old Units package has no problems with the equivalent:

Convert[1920*1080 Byte*24/Second + 44 Kilo Hertz*16 Bit, Mega Byte/Hour]

The only workaround I've found was to unit-convert the subexpressions myself:

UnitConvert[Quantity[1920*1080, "Bytes"]*Quantity[24, "1/Seconds"] + 
    UnitConvert[Quantity[44, "Kilohertz"], 1/"Seconds"]*
    UnitConvert[Quantity[16, "Bits"], "Bytes"], 

Is this a bug or am I using it wrong?

  • 1
    $\begingroup$ I get 31159/625 MB/s on 9.0 for Mac OS X x86 (64-bit) (November 20, 2012) $\endgroup$
    – rm -rf
    Commented Nov 28, 2012 at 21:25
  • $\begingroup$ UnitConvert[Quantity[89,"USCents"]/ Quantity[2,"Liters"],"USCents"/"FluidOunces"]//N gives: 1.31602per fluid ounce no "cents" per fluid ounce. This worked okay in the Units package prior to Mathematica 9 Also it converts 1 kilobytes to 1000 bytes (not 1024) $\endgroup$
    – user5353
    Commented Jan 10, 2013 at 18:57
  • $\begingroup$ @Doug: I agree that that's probably a bug, but I'm not sure anyone from Wolfram Research will read about it here in a comment. You could ask in a new question if there's a workaround and you could mail the problem to Wolfram support directly. $\endgroup$ Commented Jan 11, 2013 at 7:53
  • $\begingroup$ @Doug, it uses kilo and his family as standard 1000^something. Use "Kibibytes", mebi, etc $\endgroup$
    – Rojo
    Commented May 12, 2013 at 15:27

1 Answer 1


That code should work and it does work on my machine. The problem could be the following. You have only one part that requires Wolfram|Alpha interpretation:

Quantity[24, "1/Seconds"]

It is not built in unit - so it goes to Wolfram|Alpha for interpretation (how cool is that? ;-) ). This works almost always - unless something is wrong with internet connection, or there is some sort of latency problem. It works for me at least. Now if you want this to be evaluated without rerouting to Wolfram|Alpha, use

Quantity[24, 1/"Seconds"]

with "Seconds" of course built in. Now try this whole thing - should work:

  Quantity[1920*1080, "Bytes"]*
  Quantity[24, 1/"Seconds"] +
  Quantity[44, "Kilohertz"]*
  Quantity[16, "Bits"],

Quantity[31159/625, ("Megabytes")/("Seconds")]

  • $\begingroup$ You're right. I've restarted the Kernel and now I get the expected result. Should I delete or close the question? $\endgroup$ Commented Nov 28, 2012 at 21:45
  • 4
    $\begingroup$ @nikie I think you should keep this - Wolfram|Alpha references and network latency - something that can happen to anyone and is useful to know. $\endgroup$ Commented Nov 28, 2012 at 21:50
  • 6
    $\begingroup$ Definitely don't delete. That's an interesting gotcha, well worth having a post about it on MSE. $\endgroup$ Commented Nov 28, 2012 at 22:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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