Scientific Calculator with Auditable Calculation Receipts

Calculate it. Inspect it. Verify it. Publish it.

Evaluate a scientific expression, inspect exactly how it was interpreted, identify precedence and angle-mode risks, and generate a reproducible calculation receipt that can be linked, downloaded or embedded.

Updated August 14, 2026.

Trig mode:

Calculation Receipt

Evaluate an expression to see the steps.

Calculation Traps Lab

Six pairs that look alike but are interpreted differently. Results are computed by the same engine — load either side into the calculator.

-2^2 = -4
(-2)^2 = 4

−2^2 negates after the power (−(2²)); (−2)^2 squares the negative base.

1/2*pi = 1.57079632679
1/(2*pi) = 0.159154943092

÷ and × are left-associative: 1/2*pi = (1/2)·π. Group the denominator as 1/(2*pi).

sin(30) [DEG] = 0.5
sin(30) [RAD] = -0.988031624093

The same expression depends on the angle mode: sin(30) differs in DEG and RAD.

200+5% = 200.05
200*(1+5%) = 210

% only divides by 100, so 200+5% = 200.05. To add 5%, multiply by (1+5%).

2^3^2 = 512
(2^3)^2 = 64

^ is right-associative: 2^3^2 = 2^(3^2), not (2^3)^2.

2pi = 6.28318530718
2*pi = 6.28318530718

2pi and 2*pi agree, but implicit multiplication binds tighter than ÷ elsewhere.

Add an interactive worked calculation to your article

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: , 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.

Mathematical postfix percent vs. commercial percentage change. Because % only divides its operand, an additive expression is not a percentage increase: 200+5% = 200.05 (200 plus 0.05), and the calculator flags this with a notice. To increase 200 by 5% use 200*(1+5%) = 210; to decrease it, 200*(1-5%) = 190. 200+5%200.05  ·  200*(1+5%)210

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

ExpressionModeResultNote
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(9) DEG 3 Perfect square evaluated exactly
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.

Engine version
1.1.0
Receipt format
1.0.0
Deterministic reference vectors
57/57
Property-based invariant checks
1500/1500
Status
all suites passing
Precision model
IEEE 754 double precision (64-bit)

View calculation validation report · JSON data · CSV data

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.