Scientific Calculator
Type or tap out a full expression with trig functions, logarithms, powers, roots and parentheses — evaluated with correct algebraic order of operations (PEMDAS), in degrees or radians, with a memory register.
Built by Suhaib Hassan. Our methodology.
A recursive-descent parser (not eval()) tokenizes and evaluates your expression respecting parentheses, exponents, then multiplication/division, then addition/subtraction — with right-associative powers.
Full expressions with real order of operations, not left-to-right button-press arithmetic — see every intermediate step.
Expression
—
Step-by-step working
—
Order of operations (PEMDAS)
Highest precedence first.
| Precedence | Operation | Associativity |
|---|---|---|
| 1 (highest) | Parentheses, functions | innermost first |
| 2 | Exponents (^) | right to left |
| 3 | Multiplication, division | left to right |
| 4 (lowest) | Addition, subtraction | left to right |
Available functions
sin cos tan asin acos atan (trig, respecting the DEG/RAD toggle), sqrt, log (base 10), ln (natural log), ^ for powers, ! for factorial, and the constants pi and e.
By Suhaib Hassan · Reviewed 29 September 2026 · How CalculatePilot verifies formulas →
Frequently asked questions
Why does 2 + 3 × 4 equal 14 here, not 20?
This calculator evaluates full algebraic expressions using standard order of operations (PEMDAS): multiplication before addition, so 3×4=12 is computed first, then 2+12=14. Our Basic Calculator instead applies operators immediately left to right, like a simple handheld calculator.
Why does 2^3^2 equal 512, not 64?
Exponentiation is right-associative: 2^3^2 means 2^(3^2) = 2^9 = 512, not (2^3)^2 = 64. This matches standard mathematical convention.
What's the difference between DEG and RAD mode?
It controls the units trig functions expect (and return, for inverse functions). sin(30) in degree mode is 0.5; in radian mode, 30 is interpreted as 30 radians instead, giving a very different result.
Is this safe — does it use eval()?
No. It uses a hand-written recursive-descent parser that only recognizes numbers, named functions and arithmetic operators — it cannot execute arbitrary code, unlike JavaScript's eval().
What does log vs. ln mean?
log is base-10 logarithm (log₁₀); ln is the natural logarithm (loge, base e ≈ 2.71828). Use our Log Calculator for any other base.
Related calculators
Continue with algebra.