javascript calculator

Results area, expressions can be entered here

This field is required

data and notes will be cleared on page exit

This field is required
  • help
    • use buttons like a calculator, or math expressions can be entered directly into the result area by clicking/tapping it and using a keyboard (the area has multiple lines for long expressions), then when ready press equals = button
    • hint: you can also enter your measurements or calculations into the temporary notes area and then copy and paste them into the result area. This is useful to keep track of, or reuse, your calculations
    • calculator uses mathjs.org library and can parse and evaluate expressions using many units and constants, eg. feet, inch, m, cm, mm, kg, lb, degF, degC, mean, std, pi, phi, sum, sqrt, ^, %, !, e, trigonometric, bin, hex, etc. For more information: mathjs.org units
    • order of operations:
      • parentheses
      • exponents
      • multiplication and division
      • addition and subtraction
      • same precedence (like * and /) are computed from left to right
    • usage examples include:
      • to calculate a sum use + or add or sum, eg. sum(first,second,third,...) with no final comma and a closing parenthesis;
      • find the longer 'golden ratio' length, enter: length/phi;
      • determine the hypotenuse of a right triangle enter sqrt(first^2+second^2) add closing parenthesis;
      • conversions use to or in, eg. convert feet/inches to mm enter #inch to mm or #feet +#inch to mm, or #kg in lb
      • lengths with different units can be added, eg. #inch + #mm
      • trigonometry, eg. cosine: cos(45 deg)
      • speed, eg. 90 km/h to m/s etc.
    • decimal calculations done in javascript sometimes produce results with many decimal places - these inaccuracies can be ignored, or results rounded manually