loot.tools

Math Expression Evaluator

A calculator that reads a whole expression at once instead of one button at a time. Type something like 2 + 3 * (4 - 1) or sqrt(2) * 100 and get the result as you type. It understands the usual operators (+, -, *, /, %, ^ for powers), parentheses for grouping, functions like sqrt, sin, log, and fact, and named constants like pi and e. Nothing runs as code - the expression is parsed and evaluated safely in your browser, so there's no eval() and no server involved.
11
Try one

What you can type

Operators: + - * / % and ^ for powers. Use parentheses to group. × and ÷ work too.

Functions: sqrt, cbrt, abs, round, floor, ceil, exp, ln, log, log2, sin, cos, tan, asin, acos, atan, fact, pow, root, min, max, hypot. Trig works in radians.

Constants: pi, e, tau, phi.

What this tool does

It evaluates a full arithmetic expression in one go. Instead of pressing 2, then +, then 3, you type the whole thing - 2 + 3 * (4 - 1) - and read the answer. Operator precedence is handled the way you'd expect, so multiplication and division bind tighter than addition and subtraction, and you can use parentheses to force a different order.

Functions and constants

Beyond the basic operators you get powers with ^, a remainder with %, and a set of functions: sqrt, cbrt, abs, round, floor, ceil, exp, ln, log (base 10), log2, the trig functions sin/cos/tan and their inverses (all in radians), fact for factorials, and pow/root/min/max/hypot which take more than one value. Named constants pi, e, tau, and phi are recognised wherever you'd write a number.

It never runs your input as code

The expression is tokenized and parsed with a small grammar, then evaluated by walking that tree. There's no eval() and no Function() anywhere, so a stray bit of text can't execute - it just gets rejected with a message. Everything happens locally in your browser and nothing is sent anywhere.