Scientific Calculator

SCIENTIFIC TOOL

Expression & keypad

Calculated on this device
Type or tap keys. Supports +, −, *, /, %, ^, pi, e, ans, trig, log, ln, sqrt, cbrt, and fact().

RESULT (DEG)

4.5

Ans = 4.5

Parser Allowlisted recursive-descent evaluator (max 160 chars, 64 tokens, 20 nested groups; no eval).

HOW IT WORKS

Order of operations & angle modes

Expressions are parsed with a strict recursive-descent grammar in standard mathematical precedence without dynamic code evaluation.

01

Precedence & Associativity

Parentheses and function calls evaluate first, followed by right-associative exponents (^), unary signs, multiplication/division/modulo, and finally addition/subtraction.

2^3^2 = 2^(3^2) = 512
02

Degrees (DEG) vs. Radians (RAD)

In DEG mode, inputs to sin, cos, and tan are converted to radians before evaluation, and outputs of asin, acos, and atan are converted back to degrees.

radians = degrees × (π ÷ 180)
03

Ans & Memory Registers

Every successful calculation updates Ans, which you can reuse in the next expression. Use M+, M−, MR, and MC to accumulate or recall a stored value.

ans * 2 + 5

SCIENTIFIC CALCULATOR GUIDE

Angle modes, precedence, memory & supported functions

Degrees (DEG) vs. Radians (RAD) for trigonometry

Before evaluating sin, cos, tan, or their inverses (asin, acos, atan), check the DEG / RAD toggle. Use DEG for geometry, navigation, and surveying problems measured in 360-degree circles (for example, sin(30) = 0.5). Switch to RAD for calculus, physics, and wave equations where angles are expressed in multiples of pi (for example, sin(pi/6) = 0.5).

Order of operations (PEMDAS / BODMAS) & supported functions

Expressions follow standard algebraic precedence: parentheses and functions first, right-associative exponents (^) second, unary plus/minus third, multiplication/division/modulo (*, /, %) fourth, and addition/subtraction last. Key built-in functions include:

  • Trigonometric: sin, cos, tan and inverse functions asin, acos, atan.
  • Logarithms & exponentials: ln (natural log, base e), log (common log, base 10), exp(x), and 10^x.
  • Roots, powers & factorials: sqrt (square root), cbrt (cube root), ^ (power), abs (absolute value), and fact(n) for integer factorials from 0 to 170.

Using Ans and Memory (M+, M−, MR, MC)

Every valid evaluation stores its numeric result in Ans, which you can insert into the next expression by clicking Ans or typing ans. To hold a separate running total across multiple calculations, use M+ to add the current result to memory, M− to subtract it, MR to insert the stored memory value into your expression, and MC to clear memory back to zero.

For exact rational arithmetic, try our Fraction Calculator; for quick ratio-based comparisons, visit the Percentage Calculator; or explore dedicated power rules with the Exponent Calculator.

Frequently asked questions

Why did sin(30) return −0.988 instead of 0.5?

The calculator is in RAD mode, so it evaluated sin(30 radians). Switch the angle toggle to DEG to evaluate sin(30°) = 0.5.

What is the difference between ln and log on this calculator?

ln(x) computes the natural logarithm (base e ≈ 2.71828), while log(x) computes the common base-10 logarithm (so log(100) = 2).

How does 2^3^2 evaluate?

Exponents are right-associative, matching standard mathematical notation: first 3^2 = 9, then 2^9 = 512. Use parentheses like (2^3)^2 if you want left-to-right grouping (64).

Why does fact(171) or sqrt(-1) show an error?

171! exceeds IEEE 754 double-precision finite limits, and sqrt(-1) is not a real number. This calculator evaluates real-valued expressions only and reports domain or overflow limits inline.

Your expressions are evaluated in this browser and are not sent to a server.