Scientific Calculator
100% private — runs on your device, never uploaded. Works offline once loaded.
Type or tap a full expression — digits, brackets, powers, roots, logarithms and trig functions — and see the result update instantly. Everything is parsed and calculated on your device.
What this calculator can do
This scientific calculator goes well beyond the four basic operations. Alongside addition, subtraction, multiplication and division, it supports parentheses for grouping, exponents with the xʸ (^) button, square roots, the modulo operator (%), and the constants pi and e. It also includes the core scientific functions: sin, cos and tan for trigonometry, plus log (base 10) and ln (natural logarithm).
You can build a full expression such as sin(30) + 2^3 or sqrt(144) / (3 + 1) and see the answer immediately. The keypad inserts each token at your cursor, so you can edit any part of the expression rather than starting over, and the C and DEL keys clear everything or delete a single character.
How the answer is worked out
Rather than running your input through the browser's eval function — which would be unsafe — this tool uses a small, purpose-built maths parser. Your text is first broken into tokens (numbers, operators, functions and brackets), then converted into Reverse Polish Notation with the shunting-yard algorithm so that operator precedence and associativity are handled correctly.
That means powers bind tighter than multiplication, multiplication binds tighter than addition, and the ^ operator is right-associative, so 2^3^2 evaluates as 2^(3^2). Because only known numbers, operators and functions are accepted, anything unrecognised is reported as an error instead of being executed. This keeps the calculator both accurate and safe.
Degrees, radians and precedence tips
Trigonometric functions can be interpreted in degrees or radians, and the two give very different answers — sin(30) is 0.5 in degrees but roughly -0.988 in radians. Use the toggle to match how your problem is stated; degrees is the default because it is what most everyday calculations expect.
A few habits keep results predictable. Always close your brackets, wrap function arguments like sqrt(9) in parentheses, and remember that a leading minus is treated as negation, so -3^2 is -(3^2). When in doubt, add extra parentheses to make the intended order explicit.
- Powers: use ^, e.g. 5^2 = 25
- Roots: sqrt(x), e.g. sqrt(81) = 9
- Logs: log(x) is base 10, ln(x) is base e
- Constants: pi ≈ 3.14159, e ≈ 2.71828
Frequently asked questions
Which functions and constants are supported?
Sin, cos, tan, log (base 10), ln (natural log) and sqrt, plus the constants pi and e, the power operator ^, and the modulo operator %.
Why did I get 0.5 for sin(30)?
Because the calculator is in degrees mode, where sin(30°) = 0.5. Switch to radians if your problem uses radian angles.
How do I calculate a percentage?
The % key is the modulo (remainder) operator, so 10%3 gives 1. For a percentage of a value, multiply directly, for example 200*0.15 for 15% of 200.
What happens if I type an invalid expression?
The tool shows an Error message instead of a number. Common causes are unmatched brackets, a missing function argument, or an unrecognised symbol.
Can I edit the middle of an expression?
Yes. Click anywhere in the expression box to place your cursor, then type or use the keypad — new tokens are inserted at the cursor position.
Is anything stored or uploaded?
No. The entire calculation happens in your browser using a local maths parser, so your expressions never leave your device.
Advertisement