UTILS.
Private by default
√

Scientific Calculator

Evaluate math expressions with functions and constants like sin, ln, sqrt, pi and e.

Your files stay on this device

Files are processed in your browser, never uploaded. The site downloads code and assets to run the tools. No accounts or trackers.

Use Download to save this tool as one HTML file for offline use.

Privacy →
Supports + - * / ^ %, ( ), sin cos tan log ln sqrt abs, pi e

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.

Frequently asked questions

Which functions and constants are supported?
The functions sin, cos, tan, log (base 10), ln (natural log), sqrt and abs, plus the constants pi and e. Angles for trig functions are in radians.
Is it safe — does it use eval?
No. The expression is parsed with a custom tokenizer and shunting-yard evaluator, so no JavaScript code is executed and nothing leaves your browser.
What does the % operator do?
It returns the remainder after division, like the modulo operator in most programming languages, so 50 % 8 is 2 and -7 % 3 is -1. To find a percentage of a number, multiply by the percentage divided by 100, or use the Percentage Calculator.
Why is -2^2 equal to 4 and not -4?
The minus sign is applied to the 2 before the exponent, so the calculator evaluates (-2)^2. Many textbooks would read -2^2 as -(2^2) = -4. Add brackets, as in -(2^2), to make your intent explicit.

More tools