Scientific Calculator
Full-featured scientific calculator with trigonometric functions, logarithms, memory, and DEG/RAD mode.
Scientific calculator
Type or click — full keyboard supportAbout this calculator
How it evaluates
Expressions follow standard mathematical order of operations — parentheses, exponents, multiplication and division (left-to-right), addition and subtraction (left-to-right). Exponentiation (^) is right-associative, so 2^3^2 = 2^(3^2) = 512.
Trigonometric functions use the current angle mode shown next to the display (DEG or RAD). In DEG mode, sin(30) = 0.5; in RAD, sin(pi/6) = 0.5.
% is interpreted as "divide by 100" — so 200 * 15% = 30, and 50% = 0.5.
sin → sin⁻¹) and flip x²/√ to x³/³√.
Functions & constants
| Token | Meaning |
|---|---|
| sin, cos, tan | Trig (obey DEG/RAD mode) |
| asin, acos, atan | Inverse trig (return DEG/RAD) |
| log(x) | Base-10 logarithm |
| ln(x) | Natural log (base e) |
| sqrt, cbrt | Square and cube root |
| abs(x) | Absolute value |
| x! | Factorial (integer ≥ 0, ≤ 170) |
| x ^ y | Power (right-associative) |
| ncr(n, r) | Combinations, "n choose r" |
| npr(n, r) | Permutations, "n pick r" |
| mod(a, b) | Remainder of a ÷ b |
| pi | 3.14159265358979… |
| e | 2.71828182845904… |
How It Works
This scientific calculator evaluates mathematical expressions using a Shunting-yard algorithm — a safe, structured parser that converts infix notation (like "2+3×4") into Reverse Polish Notation, then evaluates it while respecting operator precedence and parentheses. No JavaScript eval() is used.
Angle Mode: Toggle between DEG (degrees) and RAD (radians) for trigonometric functions. In DEG mode, sin(30) = 0.5. In RAD mode, sin(π/2) = 1. Inverse trig functions (sin⁻¹, cos⁻¹, tan⁻¹) also respect this setting.
Memory: Five memory buttons let you store and recall values across calculations. MS stores the current result, MR recalls it, M+ and M− add/subtract from memory, and MC clears it.
Supported operations: Basic arithmetic (+, −, ×, ÷), exponentiation (xʸ), square (x²), square root (√), cube root (∛), factorial (x!), absolute value (|x|), reciprocal (1/x), percentage (%), logarithm (log₁₀), natural log (ln), and constants π and e.
Tips & Best Practices
Frequently Asked Questions
How does the expression parser work?
The calculator uses the Shunting-yard algorithm to convert your expression into Reverse Polish Notation (RPN), then evaluates the RPN stack. This ensures correct operator precedence (multiplication before addition, exponents before multiplication) and proper handling of parentheses — all without using JavaScript's eval().
What is the difference between DEG and RAD mode?
DEG mode interprets angles in degrees (a full circle = 360°), which is the most common unit in everyday math. RAD mode uses radians (a full circle = 2π ≈ 6.283), which is the standard in calculus and physics. For example, sin(90) = 1 in DEG mode, but sin(π/2) = 1 in RAD mode.
How does the memory function work?
Memory stores a single number across calculations. MS (Memory Store) saves the current display value. MR (Memory Recall) inserts the stored value into your expression. M+ adds the current value to memory, M− subtracts from it, and MC clears memory to zero.