Skip to content

Evaluate arithmetic and scientific math expressions with trigonometric, logarithmic, and power functions.

Loading tool

About Math evaluator

Evaluate math expressions line by line, with variables and functions you define carried over to later lines. It is built on math.js and supports trigonometry, logarithms, powers, roots, factorials, combinations, constants like pi, e and phi, complex numbers, matrices and unit conversions such as 5 cm + 2 inch in mm. You choose the number of significant digits, and each line's result or error is shown next to it.

Common uses

  • Run a quick multi-step calculation with named intermediate values
  • Convert between units inside a calculation
  • Evaluate trigonometric functions in degrees or radians
  • Check a formula before putting it into code

FAQ

Are trigonometric functions in degrees or radians?
Radians by default, as in most programming languages. Add the deg unit to use degrees, for example cos(60 deg) returns 0.5.
What is the difference between log and ln?
Here log(x) and ln(x) are both the natural logarithm (base e). Use log10(x) for base 10, log2(x) for base 2, or log(x, base) for any base.
Can I define my own variables and functions?
Yes. Write x = 2 or f(x) = x^2 on one line and use them on later lines. Lines starting with # are treated as comments.
What does 1 / 0 return?
It returns Infinity rather than an error, following IEEE 754 floating-point rules.