No upload, 100% local, no account

Scientific calculator

Type or tap an expression, functions, powers and constants, and see the result instantly, all in your browser.

How Scientific calculator works

The scientific calculator evaluates full mathematical expressions, not just one operation at a time. Type an expression such as 2 times sin(pi divided by 4) squared plus ln(e) and get the answer instantly, with correct operator precedence, parentheses, powers, trigonometry (sin, cos, tan and their inverses), logarithms (log base 10 and ln), square root, exp, abs, and the constants pi and e. A degree or radian toggle controls the trig functions.

The expression engine uses a shunting-yard parser built from scratch rather than JavaScript eval, so a stray bracket or unrecognised name returns a clear error instead of running arbitrary code. Your calculations stay entirely in your browser.

How to use Scientific calculator, step by step

  1. Type your expression in the input field using standard notation: numbers, operators (+, -, *, /), ^ for powers, and function names such as sin, cos, sqrt.
  2. Use parentheses to group sub-expressions as needed.
  3. Set the angle mode to Degrees or Radians before using trig functions.
  4. Press Enter or click the Calculate button to evaluate the expression.
  5. Read the result; if the expression is invalid, a descriptive error message appears instead.

Common use cases

  • Evaluating a multi-step physics formula like kinetic energy (0.5 times m times v squared) by typing it as a single expression.
  • Checking a trigonometry homework answer by entering the expression directly rather than breaking it into steps.
  • Converting between angle units by computing, for example, sin(30) in degree mode versus sin(pi divided by 6) in radian mode to confirm they agree.
  • Quickly verifying a logarithm result such as log(1000) = 3 or ln(e squared) = 2 during a study session.

Frequently asked questions

What operators and functions can I use?

Standard arithmetic: + - * / and ^ for powers. Trigonometry: sin, cos, tan, asin, acos, atan (in degrees or radians). Logarithms: log (base 10) and ln (natural). Other: sqrt (square root), exp (e to the power x), abs (absolute value). Constants: pi and e. Exponent notation such as 1e3 is also accepted.

How does the degree and radian mode work?

The toggle at the top controls how the trig functions interpret their argument. In degree mode, sin(90) equals 1 and cos(180) equals minus 1. In radian mode, sin(pi divided by 2) equals 1. The inverse functions return values in the same unit: asin(1) gives 90 in degree mode or pi divided by 2 in radian mode.

Does the calculator use JavaScript eval?

No. The expression is tokenised and evaluated by a shunting-yard parser implemented from scratch with no use of eval or Function. Only the recognised operators and functions listed above can produce a result; anything else returns a clear error. All computation runs in your browser tab.

What is a worked example of operator precedence?

Typing 2 + 3 * 4 gives 14, not 20, because multiplication binds more tightly than addition. To change this, wrap the addition in parentheses: (2 + 3) * 4 gives 20. Powers bind even more tightly: 2 ^ 3 * 4 gives 32 (8 times 4), while 2 ^ (3 * 4) gives 4096.

Can I use it offline?

Yes. Once the page has loaded, the calculator runs entirely on your device with no network needed. The parser is pure JavaScript arithmetic, which is why your expressions never leave your browser.

What happens if I enter an invalid expression?

The parser validates the token sequence before evaluating. Common errors include unmatched parentheses, an unknown function name, or a division by zero. Each case returns a descriptive message so you know exactly what to fix.