About this tool
Type a math expression and get the answer instantly. It supports + - * / ^ %, parentheses, the functions sin, cos, tan, log, ln, sqrt and abs, plus the constants pi and e. Expressions are parsed and evaluated with a safe tokenizer (no eval) entirely in your browser.
Operators follow the usual order: parentheses first, then ^, then * / and %, then + and -. Exponents group from the right, so 2^3^2 is 2^9 = 512. The % operator is the remainder (modulo), not a percentage: 50 % 8 is 2. Scientific notation such as 1.5e3 is accepted, function names can be typed in any case, and dividing by zero gives ∞.
There is no implicit multiplication, so write 2*pi rather than 2pi. A leading minus sign applies before the exponent, so -2^2 is 4; write -(2^2) to get −4. An expression the calculator cannot parse, such as unbalanced brackets or an unknown name, shows an invalid-expression message instead of a result.