Mathematics / Calcora

Scientific Calculator

Evaluate arithmetic, powers, roots, logs, and trigonometry safely.

Calculator

Scientific Calculator

The scientific calculator evaluates arithmetic expressions with parentheses, powers, square roots, logarithms, and trigonometric functions. A purpose-built parser processes tokens and operator precedence without using JavaScript eval().

How to use this calculator

Enter an expression using +, −, *, /, ^, parentheses, and supported functions: sqrt, sin, cos, tan, log, ln, and abs. Use the keypad or keyboard. Select degrees or radians before trigonometric calculations.

Formula & calculation method

Standard precedence: parentheses, functions and powers, multiplication/division, then addition/subtraction

A tokenizer and shunting-yard-style parser convert the expression into a safe evaluation sequence. The log function is base ten and ln is natural logarithm. In degree mode, angles are converted before trigonometric functions are applied.

Worked example

The expression sqrt(16) + 2^3 evaluates to 4 + 8 = 12. For sin(30), degree mode returns 0.5, while radian mode interprets 30 as radians and returns a different result.

Why this is useful

Support for nested parentheses and clear angle selection makes the tool useful for study and everyday technical calculations. Safe token validation also rejects unknown names instead of executing arbitrary code.

Limitations to keep in mind

Floating-point arithmetic can produce tiny representation errors, and very large values may overflow. The calculator is not a computer algebra system and does not solve symbolic equations or preserve exact symbolic roots.

Frequently asked questions

Is eval() used to calculate expressions?

No. The calculator tokenizes permitted numbers, operators, and functions, then evaluates them with its own parser.

What logarithm does log use?

log means base-ten logarithm. ln means natural logarithm with base e.

Why does sin(30) change with angle mode?

Degrees and radians are different angle units. Thirty degrees is 0.5 sine, while 30 radians is a different angle.