Scientific Calculator
A full scientific calculator with trig, logs, powers, roots and memory.
Related Tools
0 comments
How it works
Type an expression with the on-screen keypad or your keyboard. Rather than using JavaScript's unsafe eval, the calculator tokenizes your input and evaluates it with the shunting-yard algorithm, respecting operator precedence and parentheses. It supports + − × ÷, exponentiation, square root, factorial, sin/cos/tan and their inverses, natural and base-10 logs, and the constants π and e, with a degree/radian toggle for trig. Memory keys (M+, M−, MR, MC) store a running value. Everything computes locally in your browser.
sin(30°) = 0.5
log(1000) = 3
5! = 120
Common use cases
- Evaluating a trigonometry or physics expression with correct precedence.
- Computing logarithms and powers without a spreadsheet.
- Chaining a multi-step calculation using memory keys.
Frequently asked questions
Does it work in degrees or radians?
Both. A toggle switches trig functions between degrees and radians, so sin(30) gives 0.5 in degree mode and the radian result in radian mode.
Why not just use eval to compute the expression?
eval can execute arbitrary code and mishandles math edge cases. This calculator parses the expression with a shunting-yard evaluator, which is safe and gives correct operator precedence for + − × ÷ and powers.
Can I type with my keyboard?
Yes. Number keys, operators, parentheses, Enter to evaluate, and Backspace to delete are all bound, so you can use the calculator without clicking the on-screen keypad.