Inline calculations and unit conversions

You can do inline calculations and unit conversions in Craft. Just select the text to see the result - clicking on it will swap the calculation to the result.

inline_calculations.jpeg

You can read below the exact feature set available.

 

Math calculations

"+", "-", "(", ")", "/", "*", "×", "÷", "^", "plus", "minus", "x", "sin", "pow", "ceil", "abs", "tan", "sqrt", "atan2", "round", "cos", "pi", "mod", "max", "asin", "min", "floor", "atan","acos"

 

For example:

1 + 2 plus 3 + sin(2) * 2 / 2 = 6,909

 

Unit conversions

Currency

Currency exchange rates are downloaded from https://www.ecb.europa.eu/stats/eurofxref/eurofxref-daily.xml

33 currencies available (and alternative symbols) - EUR (€), USD, JPY, BGN, CZK, DKK, GBP, HUF (Ft), PLN, RON, SEK, CHF, ISK, NOK, HRK, RUB, TRY, AUD, BRL, CAD, CNY, HKD, IDR, ILS, INR, KRW, MXN, MYR, NZD, PHP, SGD, THB, ZAR

 

For example

1 EUR to USD

 

Length

Metric

  • Meters ("meters", "metres", "meter", "metre", "m")
  • Kilometers ("km", "kilometer", "kms", "kilometers", "kilometre", "kilometres")
  • Decimeter ("dm", "decimeter", "dms", "decimeters", "decimetre", "decimetres")
  • Centimeters ("cm", "centimeter", "cms", "centimeters", "centimetre", "centimetres")
  • Millimeters ("mm", "millimeter", "millimeters", "cms", "millimetre", "millimetres")
  • Micrometers ("μm", "micrometer", "micrometers", "micrometre", "micrometres")
  • Nanometers ("nm", "nanometer", "nanometers", "nanometre", "nanometres")

Imperial

  • Inches ("inches", "inch", """, """)
  • Feet ("foots", "foot", "ft", "ft.", "feets", "feet")
  • Yards (yd "yard", "yards", "yd", "yd.")
  • Miles ("miles", "mile", "mi", "mi.")
  • Furlongs ("fur", "furlong", "furlongs")

Space & Sea

  • Nautical Miles ("NM", "nmi", "nautical mile", "nautical miles", "n.m.")

 

For example

500 ft in m

 

Temperature

  • Celsius (°C, ºC, C, degC, celsius)
  • Fahrenheit (°F, ºF, F, degF, fahrenheit)
  • Kelvin (K, Kelvin)

 

For example

5 K in celsius

 

Duration

  • Seconds ("s", "sec", "second", "seconds")
  • Minutes ("m", "minute", "minutes")
  • Hours ("h", "hour", "hours")
  • Days ("day", "days", "d")
  • Weeks ("week", "weeks", "w")
  • Months ("month", "months", "mon", "mon.", "monthes")
  • Years ("year", "y", "yr", "years")
  • Milliseconds ("ms", "milliseconds", "millisecond")

 

Speed

  • Meters per second (m/s)
  • Kilometers per hour (km/h)
  • Miles per hour (mph)
  • Knots (kn)

 

Mass

Metric

  • Grams ("g", "gram", "gramme", "grams", "grammes")
  • Kilogram ("kg", "kilogram", "kilogramm", "kilograms", "kilogrammes", "kgs")
  • Milligram ("mg")
  • Nanogram ("ng")
  • Metric Tons ("t")

Imperial

  • Ounces ("ounce", "ounces", "oz")
  • Pounds ("pound", "pounds", "lbm", "lbs", "lb")
  • Stones ("stone", "stones")