Scientific Calculator
Evaluate complex math expressions with trigonometric functions, logarithms, powers, square roots, factorials, and constants like pi and e.
Examples
Trigonometry
sin(pi/4) is approximately 0.7071
- Expression
- sin(pi/4)
Embed this calculator
Copy a free iframe snippet for articles, learning pages, forums, wikis, newsletters, and internal docs.
How It Works
Formula
Variables, symbols and units
- A real-valued argument (radians for trig functions)
- A non-negative integer exponent or factorial argument
Calculation method explained
Enter any mathematical expression. The calculator parses it using a safe recursive-descent parser (no eval) and computes the result. Supported: arithmetic (+, -, *, /, ^, %), functions (sin, cos, tan, log, ln, sqrt, abs), factorial (!), and constants (pi, e).
The expression is tokenised and parsed with a safe recursive-descent grammar — no eval(). Operator precedence: ^ (right-associative) binds tighter than *, /, %, which bind tighter than +, -. Factorial ! is post-fix. Available functions: , , , , , , , , , . Constants: , . Trigonometric arguments are in radians.
Examples
Trigonometrysin(pi/4) → 0.7071067812 (unitless)
sin(pi/4) is approximately 0.7071
- Expression
- sin(pi/4)
- Result
- 0.7071067812 (unitless)
Logarithm and powerslog(1000) → 3 (unitless)
log(1000) = 3 (base 10)
- Expression
- log(1000)
- Result
- 3 (unitless)
Factorial5! → 120 (unitless)
5! = 120
- Expression
- 5!
- Result
- 120 (unitless)