Skip to main content

Number Units


Units specify the measurement or quantity of a number, adding context and meaning to calculations. They also simplify calculations by handling conversions automatically, eliminating the need for manual conversions.

These are the key concepts to understand units in Decipad:

  • Simple Units: Simple units are straightforward and represent a specific quantity. For example, $4 denotes 4 in dollars.
  • Complex Units: Complex units involve combinations of measurements, rates, or compound units. For instance, miles per hour represents the speed at which a distance is covered in one hour.
  • Built-in Units: Decipad already supports a list of several known units that you can reuse on your calculations. See list bellow.
  • Custom Units You can define your own units simply by adding them to your calculations and Decipad will automatically detect them. Example: 5 mugs or 5$ per mug. Alternatively you can use the add custom unit field on any formula block or column.

Converting Between Unitsโ€‹

Syntax

[Number] [Source Unit] in [Target Unit]

Decipad understands basic units and offers a conversion capability using the in keyword. To convert a value from one simple unit to another, use the following syntax:

Example

Convert 3 kilometers to miles: 3 kilometers in miles

Working with Formulas and Unitsโ€‹

Decipad provides additional formulas to help you manipulate numbers with units.

  • stripunit() removes the units from a calculation, allowing you to work with the numbers alone. Example: stripunit(5$ per mug) will return 5.
  • getunit() retrieves the units used in a calculation, providing you with the unit information associated with the value. Example: getunit(10$) will return $.

These formulas are particularly useful when you need to perform calculations or comparisons without considering the units or when you want to extract the units for further analysis.

Built-in Unitsโ€‹

Currencies Unitsโ€‹

  • ๐Ÿ‡บ๐Ÿ‡ธ United States dollar (USD): $
  • ๐Ÿ‡ช๐Ÿ‡บ Euro (EUR): โ‚ฌ
  • ๐Ÿ‡ฏ๐Ÿ‡ต Japanese yen (JPY): ยฅ
  • ๐Ÿ‡ฌ๐Ÿ‡ง Pound sterling (GBP): ยฃ
  • ๐Ÿ‡ฆ๐Ÿ‡บ Australian dollar (AUD): A$
  • ๐Ÿ‡จ๐Ÿ‡ฆ Canadian dollar (CAD): C$
  • ๐Ÿ‡จ๐Ÿ‡ญ Swiss franc (CHF): CHF
  • ๐Ÿ‡จ๐Ÿ‡ณ Renminbi (CNY): ยฅ
  • ๐Ÿ‡ญ๐Ÿ‡ฐ Hong Kong dollar (HKD): HK$
  • ๐Ÿ‡ณ๐Ÿ‡ฟ New Zealand dollar (NZD): NZ$
  • ๐Ÿ‡ธ๐Ÿ‡ช Swedish krona (SEK): skr
  • ๐Ÿ‡ฐ๐Ÿ‡ท South Korean won (KRW): โ‚ฉ
  • ๐Ÿ‡ธ๐Ÿ‡ฌ Singapore dollar (SGD): S$
  • ๐Ÿ‡ณ๐Ÿ‡ด Norwegian krone (NOK): nkr
  • ๐Ÿ‡ฒ๐Ÿ‡ฝ Mexican peso (MXN): $
  • ๐Ÿ‡ฎ๐Ÿ‡ณ Indian rupee (INR): โ‚น
  • ๐Ÿ‡ท๐Ÿ‡บ Russian ruble (RUB): โ‚ฝ
  • ๐Ÿ‡ฟ๐Ÿ‡ฆ South African rand (ZAR): R
  • ๐Ÿ‡น๐Ÿ‡ท Turkish lira (TRY): โ‚บ
  • ๐Ÿ‡ง๐Ÿ‡ท Brazilian real (BRL): R$
  • ๐Ÿ‡น๐Ÿ‡ผ New Taiwan dollar (TWD): NT$
  • ๐Ÿ‡ฉ๐Ÿ‡ฐ Danish krone (DKK): dkr
  • ๐Ÿ‡ต๐Ÿ‡ฑ Polish zล‚oty (PLN): zล‚
  • ๐Ÿ‡น๐Ÿ‡ญ Thai baht (THB): เธฟ
  • ๐Ÿ‡ฎ๐Ÿ‡ฉ Indonesian rupiah (IDR): Rp
  • ๐Ÿ‡ญ๐Ÿ‡บ Hungarian forint (HUF): Ft
  • ๐Ÿ‡จ๐Ÿ‡ฟ Czech koruna (CZK): Kฤ
  • ๐Ÿ‡ฎ๐Ÿ‡ฑ Israeli new shekel (ILS): โ‚ช
  • ๐Ÿ‡จ๐Ÿ‡ฑ Chilean peso (CLP): CLP$
  • ๐Ÿ‡ต๐Ÿ‡ญ Philippine peso (PHP): โ‚ฑ
  • ๐Ÿ‡ฆ๐Ÿ‡ช UAE dirham (AED): ุฏ.ุฅ
  • ๐Ÿ‡จ๐Ÿ‡ด Colombian peso (COP): COL$
  • ๐Ÿ‡ธ๐Ÿ‡ฆ Saudi riyal (SAR): ๏ทผ
  • ๐Ÿ‡ฒ๐Ÿ‡พ Malaysian ringgit (MYR): RM
  • ๐Ÿ‡ท๐Ÿ‡ด Romanian leu (RON): L
  • ๐Ÿ‡บ๐Ÿ‡ฆ Ukrainian hryvnia (UAH): โ‚ด

Time Unitsโ€‹

  • Second (second, sec, s).
  • Year (year, y) = 12 months
  • Month (month, m) = 1/12 year
  • Week (day, day) = 7 days
  • Day (day, day) = 24 h
  • Hour (hour, h) = 60 minutes
  • Minutes (minute, m) = 60 s

Length Unitsโ€‹

  • Mile (mile, mi) = 1609.344 m = 1,760 yards
  • Yard (yard, yd) = 3 ft
  • Foot (foot, ft) = 12 inches
  • Inch (inch, in) = 0.0254 meters
  • Rope (rope) = 6.096 meters
  • Hand (hand) = 4 inches
  • Smoot (smoot) = 1,702 meters
  • Marathon (marathon) = 42195 meters
  • League (league, lea) = 4828 meters

Area Unitsโ€‹

  • Square Meter (squaremeter, m2, mยฒ).
  • Square Kilometer (squarekilometre, km2, kmยฒ) = 10e6 m2
  • Square Mile (squaremile, sqmi) = 2,589,988.110336 m2 = 3,097,600 sqyd
  • Square Yard (squareyard, sqyd) = 9 sqft
  • Square Foot (squarefoot, sqft) = 144 sqin
  • Square Inch (squareinch, sqin) = 0.00064516 m2
  • Barn (barn, b) = 10eโˆ’28 m2
  • Hectare (hectare, ha) = 10,000 m2
  • Are (are, a) = 100 m2
  • Acre (acre, ac) = 4840 sqyd
  • Barony (barony) = 4000 ac

Mass Unitsโ€‹

  • Gram (g, gr)
  • Tonne (tonne) = 1000 kg
  • Ton (ton) = 2240 lbav
  • Pound (Imperial) (lbav) = 0.45359237 kg
  • Ounce (Imperial) (ozav) = 1โ„16 lbav
  • Ounce (US food nutrition labelling) (oz) = 28 g

Temperature Unitsโ€‹

  • Kelvin (kelvin, K).
  • Celsius (celsius, ยฐc) = [K] โ‰ก [ยฐC] + 273.15
  • Fahrenheit (fahrenheit, ยฐf) = [K] โ‰ก ([ยฐF] + 459.67) ร— 5โ„9

Cooking Unitsโ€‹

  • Cup (Metric) (cup) = 250ร—10eโˆ’6 m3
  • Tea Spoon (Metric) (teaspoon, tsp) = 5ร—10eโˆ’6 m3
  • Table Spoon (Metric) (tablespoon, tbsp) = 3 tsp
  • Pinch (Metric) (pinch) = 1/16 tsp
  • Dash (Metric) (dash) = 1/2 pinch

Volume Unitsโ€‹

  • Cubic Meter (cubicmeter, m3, mยณ).
  • Liter (liter, l) = 0.001 m3
  • Cubic Mile (cumi) โ‰ก 4168181825.440579584 m3
  • Cubic Inch (in3, inยณ, cuin) = 16.387064ร—10eโˆ’6 m3
  • Cubic Yard (yd3, ydยณ,cuyd) = 27 ft3
  • Cubic Foot (ft3, ftยณ, cuft) = 1,728 sqin
  • Acre Foot (acrefoot, acft) = 1 ac x 1 ft
  • Ton (ton_displacement) = 0.99108963072 m3
  • Gallon (Imperial) (gallon, gal) = 4.54609 liters
  • Barrel (Imperial) (barrel, bl) = 36 gal
  • Bushel (Imperial) (bushel, bu) = 8 gallons
  • Bucket (Imperial) (bucket, bkt) = 4 gallons
  • Pint (Imperial) (pint) = โ‰ก 1/8 gal
  • Ounce (Imperial) (floz) = 28.4130625ร—10eโˆ’6 m3

Typography & Displays Unitsโ€‹

  • Point (American, English) (point, pt) = 1/72.272 inches
  • Twip (twip) = 1/1440 inches
  • Pica (pica) = 12 points

Natural Science Unitsโ€‹

  • ร…ngstrรถm (angstrom, ร…) = 0.1 nm
  • Attometre (attometre, am) = 1ร—10eโˆ’18 m
  • Fermi (fermi, fm) = 0.000001 nm
  • Bohr (bohr, a0, aโ‚€) = 5.29177210903e-11 m

Nautical Unitsโ€‹

  • Nautical Mile (nauticalmile, nmi) = 1852 m
  • Nautical League (nauticalleague, nl) = 3 nmi
  • Fathom (fathom, ftm) = 6 ft

Surveyor Unitsโ€‹

  • Furlong (furlong, fur) = 220 yd
  • Chain (chain, ch) = 66 ft
  • Rod (rod, rd) = 0.25 chain
  • Link (link, lnk) = 7.92 inches

Astronomy Unitsโ€‹

  • Astronomical unit (austronomicalunit, au) = 1.495978707ร—10e11 m
  • Light Year (lightyear, ly) = 9.4607304725808ร—10e15 m
  • Light Day (lightday, ld) = 24 lh
  • Light Hour (lighthour, lh) = 60 lm
  • Light Minutes (lightminute) = 60 ls
  • Light Second (lightsecond, ls) = 299792458 m
  • Parsec (parsec, pc) = 30856775814913700 m

Speed Unitsโ€‹

  • Kimoleter per hour (kilometer/hour)
  • Meter per second (meter/second)
  • Mile per hour (mph)
  • Knot (knot) = 1 nmi/hour = 1.852 kilometer/hour

Pressure Unitsโ€‹

  • Atmosphere (atmosphere, atm).
  • Pascal (pascal, pa) = 1/101325 atm
  • Bar (bar, ba) = 105 Pa
  • Torr (torr, mmHg) = 1/760 atm
  • Pound per square inch(*) (psi) =

Energy Unitsโ€‹

  • Joule (Joule, J)
  • Calorie (calorie, cal) = 4.1868 J
  • Watt hour (Wh) = 3600 J

Force Unitsโ€‹

  • Newton (newton, N).

Frequency Unitsโ€‹

  • Newton (hertz, Hz).

Information Unitsโ€‹

  • Bit (bit)
  • Byte (byte)

Chemistry Unitsโ€‹

  • Mole (mole, mol).

Electrical Unitsโ€‹

  • Watt (watt, W).
  • Current (ampere, A)
  • Coulomb (coulomb, C)
  • Farad (farad, F)
  • Omh (omh, ฮฉ)
  • Siemens (siemens)
  • Volt (volt, V)

Luminosity Unitsโ€‹

  • Candela (candela, cd)
  • Lumen (lumen, lm)

Solid Angleโ€‹

  • Lumen (steraradian, sr)

Angles Unitsโ€‹

  • Radians (radian, rad)
  • Degrees (degree, ยฐ)