Scientific Calculator
Supports trigonometric functions, logarithms, exponentials, factorials, and more
What is a Scientific Calculator?
A scientific calculator is a powerful online math calculation tool that supports basic arithmetic and advanced scientific function calculations. It provides trigonometric functions (sin, cos, tan and their inverses), logarithmic functions (log, ln), exponential functions, power operations, factorials, absolute values, and many other mathematical operations.
This calculator supports switching between Degree (DEG) and Radian (RAD) modes, includes built-in constants π (pi) and e (Euler's number), and offers memory storage functions (M+, M-, MR, MC) to meet various scientific calculation needs in daily learning and work. All calculations are performed locally in the browser to protect your data privacy.
How to Use
How to use
- Click number and operator buttons on the calculator panel to enter mathematical expressions
- Click scientific function buttons (like sin, cos, log) to insert functions, use parentheses to control operation priority
- Click the equals button or press Enter to calculate the result, the expression and result will be displayed at the top
- Use DEG/RAD button to switch between degree/radian mode, use M+/M-/MR/MC to manage memory
Calculation Tips
- Check DEG/RAD mode before using trigonometric functions; the same number can produce very different results in degree and radian mode.
- Use parentheses for multi-step expressions so operator precedence is explicit instead of relying on mental grouping.
Use Cases
Technical Principle
The calculator parses every expression with a shunting-yard pass over the input, converting infix syntax into a postfix queue that respects operator precedence and right-associativity for the power operator. Parentheses force grouping, the unary minus is folded into the operand, and implicit multiplication next to constants like pi or e is normalized before the postfix pass to avoid ambiguous tokens. Numerical evaluation runs entirely on IEEE 754 double precision, which gives roughly 15-17 significant decimal digits and a magnitude range of about plus or minus 1.7976931348623157e308. The classic float traps still apply: 0.1 + 0.2 evaluates to 0.30000000000000004 because neither operand has a finite binary representation, and intermediate results can lose precision on long chains of subtraction between near-equal values. Trigonometric, logarithmic, exponential, and root functions delegate to the JavaScript Math library. The DEG/RAD switch multiplies or divides angles by pi/180 before calling Math.sin, Math.cos, or Math.tan, while inverse functions reverse the conversion on the result. Factorials use an iterative product, so 170! sits near the double-precision ceiling at about 7.257e+306 and 171! overflows to Infinity.
- Shunting-yard parser: converts infix to postfix, respects precedence (^ right-associative, unary minus folded into operand)
- IEEE 754 double precision: about 15-17 significant digits, max about 1.79e+308, classic case 0.1 + 0.2 = 0.30000000000000004
- DEG/RAD conversion: angles scaled by pi/180 before Math.sin/cos/tan, inverse functions reverse the scaling on the result
- Factorial overflow boundary: 170! is about 7.257e+306, 171! returns Infinity in JavaScript's number type
- Built-in constants: Math.PI (3.141592653589793) and Math.E (2.718281828459045) are inserted as tokens, not re-parsed each time
- Transcendental functions: Math.log is natural log (ln), Math.log10 is base-10, Math.exp(x) computes e^x, Math.pow handles x^y
- Memory register: M+ / M- accumulate into a single number variable, MR pushes it back onto the input as a literal, MC zeroes it
Examples
Trigonometry in degrees vs radians
Mode: DEG
sin(30) = 0.5
cos(60) = 0.5
tan(45) = 1
Mode: RAD
sin(pi/4) = 0.70710678
cos(pi) = -1
tan(pi/3) = 1.73205081Logarithms, exponentials, e and pi
log(1000) = 3 (log base 10)
ln(e) = 1 (natural log)
exp(1) = 2.71828183
e^2 = 7.389056
2^10 = 1024
pi * 2 = 6.28318531Factorials and combinatorics
5! = 120
10! = 3628800
170! = 7.257e+306 (max before IEEE-754 overflow)
171! = Infinity
C(52,5) using 52!/(5!*47!) = 2598960 (poker hands)Memory keys: running total
Step 1: enter 125.50, press M+ -> memory = 125.50
Step 2: enter 89.99, press M+ -> memory = 215.49
Step 3: enter 12.00, press M- -> memory = 203.49
Step 4: press MR -> display = 203.49
Use: tallying receipts without re-typing subtotalsFAQ
Which functions are supported?
Standard arithmetic, parentheses, square root and roots, powers, logarithms (log = base 10, ln = natural), exponentials, trigonometric functions (sin/cos/tan and inverses), hyperbolic functions, factorials, modulo, absolute value, and constants π and e. Some builds also include statistical helpers (mean, standard deviation).
Are angles in radians or degrees?
There is a mode toggle, default is degrees. sin(30°) = 0.5 in degree mode, sin(30) ≈ −0.988 in radian mode. The current mode is shown on screen - check it before any trig calculation.
Why is 0.1 + 0.2 not exactly 0.3?
JavaScript uses IEEE 754 double-precision floats. 0.1 and 0.2 cannot be represented exactly in binary, so 0.1 + 0.2 = 0.30000000000000004. The calculator hides this by rounding the displayed result, but extreme decimal precision is not available for transcendental computations.
How do I evaluate a long expression?
Type the full expression - the parser respects operator precedence and parentheses. Use 2*(3+4)^2 rather than 2*3+4^2. Implicit multiplication next to functions (like 2sin(30)) may or may not work depending on the parser - inserting * is always safe.
Does it handle complex numbers or symbolic algebra?
No. This is a numeric scientific calculator. For complex numbers, symbolic differentiation, or equation solving, use Wolfram Alpha, GeoGebra, or a CAS like SymPy.
Are calculations done locally?
Yes. The expression is parsed and evaluated in your browser. Nothing is uploaded. History (if present) lives in localStorage and clears when you clear site data.
How precise are scientific functions?
Standard JavaScript Math functions provide about 15-17 decimal digits of precision. That is plenty for engineering work but not enough for high-precision symbolic math. For arbitrary precision use a library like decimal.js or a CAS.