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

It seems that there is a lot of interest in enhancing the use of units in Mathematica; various solutions in the name of brevity, correctness, and general utility have been demonstrated. I've begun treating unit conversions in a very simple manner as listed below. My question: what problems might I run into making conversions in this manner? (It saves a little typing and seems somewhat easier to read to me, at the expense of defining "in" and "to" aliases.) (Mathematica v.

in = Quantity; to = UnitConvert;

Express x "in" feet:  

x = 100.0~in~"Feet"

100. ft

Convert "to" yards:


33.3333 yd

Convert to SI units:

x // to

30.48 m

"One stop shop" conversion:

x = 1.0~in~"kg"~to~"lb"

2.20462 lb
share|improve this question
If you really want to use this kind of syntax it would be easier to convert things using Google, IMO... Try this. – Rod Jun 7 '13 at 0:31
Seems fine to me – Rojo Jun 7 '13 at 1:00

Your Answer


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

Browse other questions tagged or ask your own question.