Units

Blockpad supports units intelligence to make calculations easier to make and review. Everything you need to know about units is covered on this page.

Units basics

Assign units to a number

To assign a unit to a number, type the unit text after it. For example, 2.3 ft, 57 kg, or 391 kPa

The unit text must match the built-in unit stored in the Blockpad library, but Blockpad will often auto correct to what's intended. The dropdown selection will also help.

Composite units

Composite units can be formed using built-in units and regular operators (*, /, and ^). For example, 1 ft/s, 12 kg*m/s^2, or 350 lbf*ft.

When custom units are used in composite units, the composite units must be wrapped in parentheses. For example, 6 (furlong/fortnight) or 160 (lb/Person).

Convert values

To convert a value to a different unit, the to keyword is used. In a formula, type in "to desired unit" after the value you wish to convert. For example, 12 kg*m/s^2 to lbf, 20 F to C, or 25000 lbf to kN.

This can be helpful to simplify the units for the results of some equations. For example, 5 joules divided by 2 seconds might give the answer in J/s, but you want the answer in Watt.

Arithmetic

When you do math with numbers and units, Blockpad formulas handle the work for you. Units are auto-converted, cancelled, and multiplied as they need to be.

For example, if you add or subtract numbers with two different length units, like feet and meters, Blockpad will auto-convert to the first unit and give the correct result.

Or if you multiply numbers with two different length units, Blockpad auto-converts and multiplies the units appropriately.

Dividing two length units gives you a unitless number.

Finally, if you try to add or subtract numbers and the units aren't compatibe, like force and length units, then Blockpad tells you there's something wrong.

Strip or add units

Sometimes numbers need to be unitless for calculations, like when an equation is derived through experimentation. In these cases, the units need to be stripped and added back in order to use units in the rest of the document.

Strip units

To strip units from a number value, divide the value by the number one with the unit the value is expected to be.

For example, if the variable length is expected in feet, length/1 ft gives the correct unitless number. It doesn't matter what units length has (as long as it's compatible with feet); Blockpad will autoconvert length first, and then the units will cancel out.

Add units

To assign units to a unitless number value, multiply that value by the number one with the unit you want it to be.

For example, say the value width is calculated in a way that gives a unitless result, e.g. width = 1 + 2/sqrt(3). To have width in centimeters, multiply that entire formula by 1 cm - width = (1 + 2/sqrt(3))*1 cm

All together

The effective seating width of a gasket is calculated with the equation b = 0.5*sqrt(b_0), where b_o is expected in inches and the result, b, is also in inches.

To handle this, b_o needs to be divided by 1 inch, and the final equation needs to be multiplied by 1 inch. This way, b_o can have any length unit and Blockpad will automatically convert it to inches, then strip the units. Also, b is now stored in inches, and can be converted to any other compatible unit.

There is one exception to this method: temperature units. To correctly do this for temperature units, you need to first convert to what you want, then divide (instead of just divide). E.g. T_2 = 0.5*((T1 to K)/1 K), not just T_2 = 0.5*(T1/1 K). See the temperature difference units section for more information.

Combination units

Foot-inch units (e.g. 5ft 8in or 10ft 2.5in) are an acceptable unit type in Blockpad, along with other units that take a similar form (like degree-minute-second or day-hour-minute).

To use these kinds of units, follow the basic layout of number unit number unit number unit, etc..

To convert to this kind of unit, type the units with a space between them after the "to" keyword, or in the specific case of deg-min-sec, type "to dms". For example, 10 m to ft in, 2.2 day to day hr min, or 32.34 deg to dms.

Note that this doesn't work for any and all combination of units. 5m 22cm 5mm doesn't work, and neither does 12kip 250lb. Only units that are specified in Blockpad as combination units work. Below is a list.

  • ft in
  • lb oz
  • day hr min
  • hr min
  • min sec
  • deg min sec (dms)

Custom units

You can create new custom units to use in your equations, either based off of existing units or as base units that stand alone.

Custom units from built-in

To create a new custom unit, start a dynamic equation, then type in XXX NewUnit = YYY ExistingUnit, where XXX/YYY is the conversion factor for the units. For example, 1 furlong = 220 yd, 100 centigram = 1 g, or 1 fortnight = 2 week.

Then, use the custom unit just like a regular unit in your equations.

You can also use custom units to define new custom units.

Base custom units

To create a new base custom unit, start a dynamic equation, then type in 1 NewUnit = BaseUnit(). For example, 1 person = BaseUnit() or 1 egg = BaseUnit().

Just like with other custom units, use them the same as built-in units, including for creating new custom units.

Using custom units

In general, you can use custom units the same way you would regular units, including for conversion and stripping and adding units.

Also just like with regular Blockpad units, the name and case need to match exactly, or the formula won't work.

There is one case where custom units must be handled differently than built-in units. If custom units are used in a composite units, you must put parentheses around them. (To be more specific, the error only occurs if a custom unit is not the first unit in the composite unit).

One more important thing - unlike regular values, custom units always apply to the entire file, not just the frame they are in. Once a custom unit is defined in the file, it can't be redefined anywhere else.

Custom currency exchange rates

Blockpad has a few built-in currency units, like usd, cad, and eur. (When you use $, it's treated as usd. E.g. $1 = 1 usd.)

By default, these currencies are incompatible, so you cannot convert from one to the other.

However, you can define custom exchange rates for different currency units, and the respective units will become compatible. So you will be able to convert to and from the different currencies whose relations you define.

The syntax is similar to creating a custom unit: X currency1 = Y currency2. For example, 1 usd = .94 eur or 1.37 cad = 1 usd.

Special cases

Temperature difference units

Because conventional temperature scales have different starting points (0 C ≠ 0 F), there is a fundamental difference between temperature values (e.g. 30 C = 303.15 K) and temperature difference values (e.g. (40 C - 10 C) = 30 K).

Blockpad handles this by having "temperature difference units", ΔF and ΔC.

If you subtract two values in F or C, the result will be in ΔF or ΔC. When ΔF or ΔC are added or subtracted from F or C units, the result will be in F or C. ALso, ΔF or ΔC can be directly applied to values when appropriate.

Note that the ΔF and ΔC are basically the same as absolute temperature units. Because of this 1 ΔF = 1 R and 1 ΔC = 1 K.

Strictly speaking, you should only divide values with temperature difference units or absolute temperature units. So, if Blockpad sees that you are trying to divide using F or C, it will interpret those values as ΔF or ΔC, to try to give you the correct answer.

In the example below, either temperature difference or absolute temperature units should be used as part of the composite unit with Watts. However, if a relative temperature unit (F or C) is used, Blockpad will treat it as a temperature difference unit.

Also, if you try to convert directly from F or C to ΔF or ΔC, Blockpad will give you a one-to-one interpretation. It will not convert the F or C value to absolute temperature.

Note that while this adaptation makes temperature units easier to work with, it can potentially cause interpretation problems. This is because you can use Blockpad conversions to turn 1 C into 1 K, even though that is not correct.

This becomes a problem specifically if you are trying to strip units from temperature values. To account for this, any value that you explicity want to be in K or R should be directly converted with the to keyword inside of the equation, before "stripping" the units.

Psi, psia, and psig

Blockpad includes psia and psig units (absolute and gauge pressure, respectively). When converting between the two, Blockpad adds 14.69595 to the psig value (or subtracts from the psia value), approximately the atmospheric pressure at sea level.

When you use the regular psi unit, Blockpad treats it as psia.

When adding and subtracting with psig, Blockpad uses Δpsig, which is similar to temperature difference units.

Radians and unitless numbers

In the SI system, radian values are actually unitless. However, in practice in can be easier to follow equations if radians are labeled and treated as an angular unit.

Blockpad allows for both interpretations, but tends to prefer labeling radians as such. For example, Sin(1.571 rad) and Sin(1.571) will both return the value 1 in Blockpad, but the result for Asin(1) is returned with radians as units.

Note that even though radians are labeled, they are still basically treated as unitless numbers (except in some cases with rpm and Hz units).

So if you test equality with a boolean operation, Blockpad will say unitless 5 and 5 rad are the same. You can also convert radians directly to unitless values with the to keyword, using the word null as the "unit". (In Blockpad a value with "null" units is unitless).

Note that this also means numbers in degrees can be converted to unitless numbers. Blockpad will first convert them to be radians, then unitless.

Hz and rpm

There is an inherent challenge with interpreting Hz and rpm units.

This is because there are two possible interpretations for each of them:

  • angular velocity
    • 1 rpm = 1 rev/min = 2pi rad/min
    • 1 Hz = 1 rev/s = 2pi rad/s
  • frequency
    • 1 rpm = 1/min
    • 1 Hz = 1/s

(Yes, the technical SI definition for Hz is s^-1, but many calculations call for the 2pi rad/s definition.)

Blockpad allows for both of these interpretations, and which one the program actually uses depends on the context.

By default, Blockpad will use the interpretation that matches the units that Hz or rpm are converting to, whether directly or as part of an autoconversion. (There is also an option to fix rpm and Hz to a user-specified definition, covered below.)

For example, if using the to keyword on the value 1 rpm, Blockpad will give materially different results depending on if you use to rad/min or to 1/min.

Note that these conversion results are meaningfullly different, since radians are actually unitless numbers. If you test these two results with a boolean operator, they will not be equal, as shown in the example above.

This context-dependent conversion can also happen as part of the autoconversion process that Blockpad does when adding values.

The trickiest occasion this conversion happens is when Blockpad cancels out units.

For example, the equation Power = Torque * RPM is used to calculate mechanical power. In this form, it depends on rpm being interpreted as angular velocity (1 rpm = 1 rev/min = 2pi rad/min).

However, if you do exactly this in Blockpad and convert the final result to kW, the cancellations would end up using the frequency definition of rpm (1 rpm = 1 min^-1) because of how kW are defined. Blockpad would not automatically know to treat rpm as angular velocity, and would give the wrong result.

You have three options to fix this:

  1. Use the to keyword to "force" rpm into the angular velocity interpretation inside of the equation.
  2. Continue to treat rpm as 1/min and multiply a corrective factor (2pi).
  3. "Hard code" the definition of rpm as rev/min, as described below.
    • (This option is not shown in the image)

When Blockpad an ambiguous unit like rpm or Hz is converted in Blockpad, the equation will be marked with a blue tag warning.

If you click on that equation, Blockpad will tell you which interpretation it's using and prompt you to confirm that it's correct. When marked correct, the blue tag goes away unless the formula changes.

It can sometimes be helpful to show units conversions steps when working with rpm and Hz, so you can see how Blockpad is handling the unit conversions.

Note that only direct conversions using the to keyword are shown, not autoconversions.

Fixed Hz and rpm

As covered above, Hz and rpm can have different interpretations, and Blockpad uses both depending on context. In Blockpad, these are considered "ambiguous units", and you have the option to "hard code" your desired interpretation of these built-in ambiguous units.

This way, you know for certain what interpretation Blockpad is using in the equations in your file.

Also, when you hard code the definitions for these units, the blue warning tags no longer appear because the conversions are no longer ambiguous.

To hard code an ambiguous unit, treat it like you are defining a custom unit with that name.

So for rpm, start a dynamic equation and type in 1 rpm = 1 rev/min to hard code the angular velocity definition, or 1 rpm = 1 min^-1 to hard code the frequency definition.

Because rpm and Hz are both ambiguous and can be converted between each other, it's often best practice to hard code them both. See the examples below.

"Angular velocity" definition for both Hz and rpm.

"Frequency" definition for both Hz and rpm.

"Angular velocity" for rpm, but "Frequency" for Hz.

Hz and rpm not hardcoded, for comparison.

Pounds - lb, lbf, and lbm

The simple pounds unit (lb) is flexible with conversions to mass or force units. 1 lb to kg gives 0.454 kg as the result, and 1 lb to N returns 4.448 N.

Pounds force (lbf) and pounds mass (lbm) are not flexible. Pounds force is only compatible with force units and pounds mass is only compatible with mass units. 1 lbf to kg will give an error.

Functions for units

Compatible()

The compatible function checks if two numbers have compatible units. In a sense, it checks if two numbers with units can be added together or if the units of one number could be converted to the units of the other. You can also think of it as checking if the fundamental dimensions are the same (length, mass/length^3, etc).

Compatible function

The Unit() function

The Unit() function tells you what units a value has. It is mostly useful for descriptive labels, where the Compatible() function is mostly useful for logic formulas.

The Unit() function can be used on multiple values or a range of cells, but if they don't all have the same unit it will give an error.

BaseUnit()

The BaseUnit() function is used to define a custom unit that has no relationship to any built-in units. See the custom unit section above for how to use it.

Units formatting

Show unit conversion steps

In the Show Steps property for equations, you have the option to show unit conversions.

When this is turned on, Blockpad will show the unit cancellation process it uses any time the to keyword is used.

This can be a good way to see what's going on "behind the scenes" with Blockpad, and in some tricky cases like rpm and Hz, it can help you ensure Blockpad is doing the calculation like you're expecting it to.

Priority units

You can set priority units for equations and cells so that calculations auto-convert to those units if they are compatible.

Set priority units for an equation:
  1. Select the equation.
  2. Select Value Format in the toolbar.
  3. Under Priority Units click Add.
  4. Specify the desired units.
  5. Click Ok.
  6. Repeat steps 3-5 for all units desired.
  7. Click Ok to exit Value Format
Set priority units for all equations in a file:
  1. In the toolbar, select Styles>Manage Styles.
  2. Click Add to add another style rule.
  3. For Container select Frame Document.
  4. For Object Type select Dynamic Equation.
  5. Under Properties select Value Format.
  6. In the new window, select Number on the left.
  7. Repeat steps 3-5 from above for all units desired.
  8. Click Ok to exit Value Format
  9. Close out of the Styles window.
Hiding units

You can make units hidden for value cells and equation results. The values still keep their units for the purpose of calculations, but they aren't displayed.

Hiding units is useful for making large tables of values look cleaner, and it can be used in conjuction with the Unit() function to show what units are used in another cell.

Hide units for a range of cells:
  1. Select the cell(s).
  2. Select Value Format in the toolbar.
  3. In the Number tab, scroll down and check the "Hide units" box.
  4. Click Ok to exit Value Format

Built-in Units

Jump to:
Customary Units
ft foot
in inch
ft in foot-inch
yd yard
mile mile
nautical mile nautical mile
sf square foot (ft^2)
sy square yard (yd^2)
acre acre (4840 yd^2)
cf cubic foot (ft^3)
cy cubic yard (yd^3)
gal US gallon (231 in^3)
quart quart (1/4 gal)
pint pint (1/2 quart)
cup cup (1/4 quart)
fl oz fluid ounce (1/8 cup)
fl oz FDA FDA fluid ounce (30 mL)
Tbsp tablespoon (1/2 fl oz)
tsp teaspoon (1/6 fl oz)
bbl Barrel (42 gal)
mph mile per hour
knot knots (1 nautical mile/hr)
cfs cubic foot per second (ft^3/s)
cfm cubic foot per minute (ft^3/min)
gpm US gallon per minute
lb pound (general use)
lbf pound force
lbm pound mass
slug slug mass unit (1 lbf*s^2/ft)
kip kip (1000 lbf)
oz ounce (1/16 lb)
lb oz pound-ounce
ton US customary ton (2000 lbf)
plf pound per linear foot (lbf/ft)
klf kip per linear foot (kip/ft)
psi pound per square inch (lbf/in^2)
psia absolute pound per square inch (pressure)
psig gauge pound per square inch (pressure)
Δpsig difference gauge pound per square inch
ksi kip per square inch (kip/in^2)
psf pound per square foot (lbf/ft^2)
ksf kip per square foot (kip/ft^2)
in Hg inches mercury (pressure)
in H2O inches water (pressure)
pcf pound per cubic foot (lbf/ft^3)
kcf kip per cubic foot (kip/ft^3)
F degree Fahrenheit
ΔF difference Fahrenheit
R Rankine
Btu British thermal unit (thermochemical definition, 1054.3503 J)
TR Ton, cooling (12000 Btu/hr)
hp mechanical horsepower (550 ft*lbf/s)
rpm rotation per minute (1/min or rev/min)
lbmol pound-mol (453.59237 mol)
SI Units
m meter
km kilometer
cm centimeter
mm millimeter
nm nanometer
L Liter
cL centiliter
mL milliliter
kg kilogram
g gram
mg milligram
μg microgram
ng nanogram
N Newton
kN kilonewton
Pa Pascal
kPa kilopascal
MPa megapascal
GPa gigapascal
J Joule
kJ kilojoule
W Watt
GW Gigawatt
MW Megawatt
kW kilowatt
K Kelvin
C degree Celsius
ΔC difference Celsius
coulomb Coulomb (electric charge)
V Volt
A Ampere/Amp
Ω Ohm
ohm Ohm (same as Ω)
H Henry (inductance)
μH microhenry
farad Farad (capacitance)
nF nanofarad
pF picofarad
mF millifarad
μF microfarad
T Tesla (magnetic induction)
Wb Weber (magnetic flux)
cd candela (luminance)
Hz Hertz (1/s or rev/s)
GHz gigahertz
MHz megahertz
kHz kilohertz
mol mole (6.02214076*10^23 elementary entities)
kmol kilomole
mmol millimole
Metric Units (Non-SI)
cc cubic centimeter (cm^3)
kgf kilogram-force (1 kg*g0)
tonne metric ton (1000 kgf)
metric ton metric ton (1000 kgf)
bar bar (100,000 Pa)
mbar millibar
mm Hg millimeters mercury (pressure)
atm atmosphere (pressure)
g0 gravity/ "g's" (1 g0 = 9.807 m/s^2)
gravity gravity/ "g's" (1 gravity = 9.807 m/s^2)
P Poise (dynamic viscosity, 1 g/cm/s)
cP centipoise
dyn dyne (force, 1 g*cm/s^2)
Mx Maxwell (magnetic flux, 1E-08 Wb)
cal "small" calorie (4.184 J)
kcal "large" calorie (1000 cal or 4184 J)
ppm parts per million
ppb parts per billion
gmol gram-mole (1 mol)
Time Units
s second
min minute
hr hour
day day
week week
mo month
year year
day hr min sec day-hour-minute-second
day hr min day-hour-minute
hr min sec hour-minute-second
hr min hour-minute
min sec minute-second
ms millisecond
ns nanosecond
μs microsecond
Angle Units
deg degree
deg min sec degree-minute-second
dms degree-minute-second
rad radians
rev One revolution (rpm*min)
Screen Units
pc pica (1/6 inch)
pt point (1/72 inch)
px virtual pixel (1/96 inch)
dpi dots per inch
dpcm dots per centimeter
dppx dots per virtual pixel
Bit Units
bit binary digit (information/computing)
byte byte (8 bit)
kiB kilobytes (1024 byte)
MiB megabytes (1024 kiB)
GiB gigabytes (1024 MiB)
TiB terabytes (1024 GiB)
Complex Numbers

Note that terms i and j for complex number are inputed like units, as shown, but they define an imaginary number, rather than a literal number with a unit.

i the imaginary unit
j the imaginary unit (same as i)
Currency Units

Note that conversion between currencies is not supported right now.

$ United States Dollar. Placed in front of the number. Same as usd.
usd United States Dollar
cad Canadian Dollar
eur Euro
jpy Japanese Yen
gbp Pound sterling
aud Australian Dollar
chf Swiss Franc
cny Chinese Yuan
sek Swedish Krona
nzd New Zealand Dollar
mxn Mexican Peso
See also:
Anything missing?

Please, let us know if there are units you would like to see in Blockpad.