Do Calculations with Units

Units are automatically converted during arithmetic operations.

    
Use Quantity to represent units:
Arithmetic operations also handle unit cancellation automatically:
Estimate the number of miles that can be traveled on a low tank of gas. IndependentUnit is used to represent an arbitrary unit with no relationship to other units within Quantity: