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)
Result
0.7071067812 (unitless)

Embed this calculator

Copy a free iframe snippet for articles, learning pages, forums, wikis, newsletters, and internal docs.

How It Works

Formula

sin(x),  cos(x),  tan(x),  log(x),  ln(x),  x,  xn,  n!\sin(x),\; \cos(x),\; \tan(x),\; \log(x),\; \ln(x),\; \sqrt{x},\; x^{n},\; n!

Variables, symbols and units

xx

A real-valued argument (radians for trig functions)

nn

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: sin\sin, cos\cos, tan\tan, arcsin\arcsin, arccos\arccos, arctan\arctan, log10\log_{10}, ln\ln, \sqrt{\,}, |\cdot|. Constants: π\pi, ee. 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)

Frequently Asked Questions

What functions are supported?
sin, cos, tan, asin, acos, atan, log (base 10), ln (natural log), sqrt, abs, and factorial (!). Constants pi and e are also available.
Are angles in radians or degrees?
All trigonometric functions use radians. To convert degrees to radians, multiply by pi/180.
How do I write powers?
Use the ^ operator. For example, 2^10 = 1024.
What is the difference between log and ln?
log is base-10 logarithm (log10), while ln is the natural logarithm (base e).
Can I use parentheses for grouping?
Yes. Parentheses work as expected for grouping operations, e.g. (2+3)*4 = 20.

Related Calculators

All calculators