Scientific Calculator
Evaluate arithmetic, powers, roots, trig, logarithms and constants with a safe client-side parser.
🔒 Runs entirely in your browser — nothing is uploadedSafe scientific calculator parser
This calculator supports everyday scientific expressions without using JavaScript eval. The parser first tokenizes numbers, operators, parentheses, constants and function names. It then applies arithmetic precedence: parentheses first, functions and unary signs, powers, multiply and divide, then addition and subtraction. The core formula rules are the familiar ones: a + b, a − b, a × b, a ÷ b and a^b. Percent is a postfix shortcut that converts the preceding value to a fraction by dividing it by 100.
Functions include square root, sine, cosine, tangent, base-10 logarithm and natural logarithm. Trigonometric functions use degrees, so sin(30) returns 0.5. Constants can be entered as π, pi or e. Invalid expressions, division by zero, logarithms of non-positive values and square roots of negative values show an error instead of producing an unsafe or misleading result.
Examples and supported syntax
Try expressions such as sqrt(144), 2^8, sin(45)^2 + cos(45)^2, log(1000) or 50% * 200. Multiplication must be typed explicitly, so write 2*pi instead of 2pi. Parentheses can be nested to group parts of a longer calculation. The buttons insert plain text into the expression field, and you can also type directly with a keyboard.
Privacy and accuracy notes
All calculation happens in the browser using standard JavaScript numbers. That is appropriate for general math, school checks and quick engineering estimates, but not arbitrary-precision finance or symbolic algebra. The page does not upload expressions, does not store history and does not call a math API. Check important results, especially where rounding, angle units or domain restrictions matter.
For long expressions, build the calculation in smaller parts and use parentheses to make your intent explicit. That reduces mistakes and makes the displayed expression easier to audit before you rely on the result.
How to use
- Type or tap an expressionUse numbers, operators, parentheses, constants and functions such as sqrt, sin, cos, tan, log and ln.
- Evaluate safelyPress equals to run the built-in parser. The page never uses eval.
- Check the resultRead the result and the normalized expression line for quick verification.