(click anywhere to close help)
Preface
This is an inline calculator, each calculation will be calculated line by line.
You can store values in variables to use on other lines.
How to use it?
1 + 1
will return 2
Operator | Function |
---|---|
+ |
Add |
- |
Subtract |
* |
Multiply |
/ |
Divide |
^ |
Power |
sqrt(n) |
Square Root |
To see more possible operations, to go mathjs operators documentation.
Comments
If you want to create a comment, just use the #
sign, everything after the #
will be ignored.
Variables
You can assign variables to use later.
pizzas = 2
pizzaPrice = 30
people = 4
(pizzas * pizzaPrice) / people
will return 15
Function Variables
To store a function in a variable, just type:
myCustomFunction = f(x) = x * 2
The body of the function can be whatever you want.
To use a function, type:
myCustomFunction(4)
will return 8
Unit conversion
You can convert some units.
1cm to m
will return 0.01 m
Base | Unit |
---|---|
Length | meter (m), inch (in), foot (ft), yard (yd), mile (mi), link (li), rod (rd), chain (ch), angstrom, mil |
Surface area | m2, sqin, sqft, sqyd, sqmi, sqrd, sqch, sqmil, acre, hectare |
Volume | m3, litre (l, L, lt, liter), cc, cuin, cuft, cuyd, teaspoon, tablespoon |
Liquid volume | minim (min), fluiddram (fldr), fluidounce (floz), gill (gi), cup (cp), pint (pt), quart (qt), gallon (gal), beerbarrel (bbl), oilbarrel (obl), hogshead, drop (gtt) |
Angles | rad (radian), deg (degree), grad (gradian), cycle, arcsec (arcsecond), arcmin (arcminute) |
Time | second (s, secs, seconds), minute (mins, minutes), hour (h, hr, hrs, hours), day (days), week (weeks), month (months), year (years), decade (decades), century (centuries), millennium (millennia) |
Frequency | hertz (Hz) |
Mass | gram(g), tonne, ton, grain (gr), dram (dr), ounce (oz), poundmass (lbm, lb, lbs), hundredweight (cwt), stick, stone |
Electric current | ampere (A) |
Temperature | kelvin (K), celsius (degC), fahrenheit (degF), rankine (degR) |
Amount of substance | mole (mol) |
Luminous intensity | candela (cd) |
Force | newton (N), dyne (dyn), poundforce (lbf), kip |
Energy | joule (J), erg, Wh, BTU, electronvolt (eV) |
Power | watt (W), hp |
Pressure | Pa, psi, atm, torr, bar, mmHg, mmH2O, cmH2O |
Electricity and magnetism | ampere (A), coulomb (C), watt (W), volt (V), ohm, farad (F), weber (Wb), tesla (T), henry (H), siemens (S), electronvolt (eV) |
Binary | bits (b), bytes (B) |
To see more possible units, to go mathjs units documentation.