Advanced Scientific Calculator with Calculation Verification
Evaluate scientific expressions with a transparent calculation receipt showing interpretation, exact and decimal results, evaluation steps, mode warnings and reproducible sharing options. Everything runs locally in your browser.
Updated July 29, 2026.
Calculation Receipt
Evaluate an expression to see the steps.
How to use it
Type an expression in the input field or tap the keypad buttons — the cursor stays where you left it, so you can insert tokens mid-expression. Press Enter or = to evaluate, Escape or C to clear. Brackets nest freely; constants π and e behave like numbers.
Supported syntax
Numbers: integers, decimals (3.14), scientific notation (1e-13, 6.02e23). Operators: + - * / ^ mod. Postfix: ! (factorial), % (÷100). Functions: see list below. Constants: pi, π, e. Last result: Ans. Implicit multiplication: 2π, 3sin(30), (2+3)(4+5).
Operator precedence
Highest to lowest: postfix ! and % (50) › exponentiation ^ right-associative (40) › implicit multiply (25) › * / mod (20) › + - (10). Unary minus has a right-binding power of 35, so -2^2 = -(2^2) = −4, while (-2)^2 = 4 and 2^-2 = 0.25.
Degrees vs radians
The DEG/RAD toggle controls all six trig functions (sin, cos, tan, asin, acos, atan) simultaneously. In DEG mode sin(30) = 0.5; in RAD mode sin(pi/6) = 0.5. Inverse functions return a value in the selected mode: asin(0.5) returns 30 in DEG and ≈ 0.5236 in RAD. Hyperbolic functions (sinh, cosh, tanh) are always dimensionless.
Percentage (%)
The % postfix operator divides its operand by 100. It has higher precedence than multiplication, so 50% = 0.5 and 3 * 20% = 0.6. It does not interact with the modulo keyword mod.
Domains and errors
sqrt(x) and ln(x) / log(x) require x > 0 (x ≥ 0 for sqrt). asin(x) and acos(x) require x ∈ [−1, 1]. tan is undefined at 90° + n·180° (or π/2 + n·π). Factorial requires a non-negative integer; 171! overflows. nCr and nPr require non-negative integers with 0 ≤ r ≤ n. Division and modulo by zero produce an error. All errors are reported with a structured code — the result field never ambiguously shows "Error".
Precision and formatting
Results are computed in 64-bit IEEE 754 (JavaScript's native number). The display rounds to 12 significant figures to suppress floating-point noise: 0.1+0.2 shows 0.3, not 0.30000000000000004. Values with |x| < 10⁻⁹ or |x| ≥ 10¹² are shown in scientific notation; 1e-13 is never rounded to 0. Negative zero is normalised to 0.
Supported functions
Trigonometry (DEG/RAD): sin, cos, tan. Inverse trig: asin, acos, atan. Hyperbolic: sinh, cosh, tanh. Logarithms: log (base 10), ln (natural). Roots: sqrt, cbrt. Power: ^, exp. Combinatorics: nCr(n,r), nPr(n,r). Rounding: floor, ceil, round. Other: abs, mod, ! factorial, % percent. Constants: π, e.
Verified examples
| Expression | Mode | Result | Note | |
|---|---|---|---|---|
sin(30) |
DEG | 0.5 |
DEG mode: exact 1/2 | |
sin(pi/6) |
RAD | 0.5 |
RAD mode: exact 1/2 | |
-2^2 |
DEG | -4 |
−(2²), not (−2)² | |
(-2)^2 |
DEG | 4 |
(−2)² = 4 | |
1/(2*pi) |
DEG | 0.159154943092 |
Grouping matters | |
1/2*pi |
DEG | 1.5707963268 |
vs 1/(2π) | |
0.1+0.2 |
DEG | 0.3 |
Float noise suppressed | |
sqrt(8) |
DEG | √8 |
Exact form shown | |
nCr(10,3) |
DEG | 120 |
Combinations | |
50% |
DEG | 0.5 |
Percent postfix | |
1e-13 |
DEG | 1e-13 |
Scientific notation preserved |
Privacy — fully local
Every keystroke, evaluation and memory value stays in your browser. History is saved to localStorage under a key scoped to this calculator; it never leaves your device. Shared URLs encode only the expression and mode as query parameters — no server receives them.
How calculations are tested
The expression engine is validated by an automated test suite that runs 169 deterministic reference vectors plus additional assertion groups covering mathematical identities, inverse round-trips, precedence, associativity, domain boundaries, error codes and number formatting. Every test must pass before any code reaches this page.
View calculation validation report
Limits
Results are computed in IEEE 754 double precision. For engineering, finance or scientific publication, verify critical results with a dedicated tool — this calculator is designed for everyday convenience, not formal proofs.