Scientific calculator
Build an expression with buttons or the keyboard, then press equals or Enter. Supports trig, logs, powers, π, e, and parentheses—parsed locally without shipping your work to a server.
Expression
Quick tips
- Use parentheses for clarity: (-3)^2 versus -3^2.
- log is base 10; ln is natural log.
- Inverse trig outputs match your degree/radian toggle.
A scientific keypad that stays on your device
Most “scientific” pages either embed a heavyweight library or call eval on whatever you typed—convenient for the author, risky for the reader, and opaque when something breaks. This page takes a different route: your expression is tokenized into numbers, operators, parentheses, and function names, then evaluated with a small recursive-descent parser that understands the same precedence rules you were taught in algebra class (including the fact that exponentiation binds before a leading minus unless you add parentheses).
Trigonometry buttons accept arguments in radians by default because that is what the underlying JavaScript Math library uses internally. Checking “Trig in degrees” remaps inputs for sine, cosine, tangent, and their inverses so classroom-style degree measures behave as expected. Logarithms follow the usual split: common log base ten versus natural log base e, each refusing negative inputs because the real logarithm is not defined there.
When a full scientific keypad still earns its pixels
Students checking homework, hobbyists tuning antenna angles, and professionals sanity-checking a formula in a meeting all benefit from a keypad that goes beyond four-function arithmetic without opening a spreadsheet. This implementation will not replace a computer algebra system, graphing tool, or statistics package—but it will return a numeric value for a well-formed expression quickly, offline-friendly once the page is cached, and without asking you to trust opaque remote code execution every time you press equals.
Frequently asked questions
- How do I enter functions like sine or logarithm?
- Tap a function button to insert its name with an opening parenthesis, type the argument, then add the closing parenthesis. Example: sin(1.57) with radians mode, or sin(90) with degrees mode checked.
- Does this calculator use eval or send my expression to a server?
- No eval. A small tokenizer and recursive parser run locally in your browser. Nothing is transmitted for calculation unless your own extensions intercept the page.
- What is the difference between log and ln?
- log is base 10 (common logarithm). ln is the natural logarithm with base e. Both require a positive argument inside the parentheses.
- Why does -3^2 show -9 instead of 9?
- Exponentiation binds tighter than the leading unary minus, so the expression is interpreted as negating the square of three, which is negative nine. Use parentheses if you intend (-3)^2.
- Can I type on the keyboard as well as tap buttons?
- You can type directly into the expression field using digits, decimal points, operators + - * / ^, parentheses, and names like pi, e, sin(, cos(, and so on. Press Enter to evaluate.