liminfo

Scientific Calculator

Free web tool: Scientific Calculator

0

About Scientific Calculator

This scientific calculator provides full mathematical functionality in a clean, keyboard-friendly web interface. It supports all standard trigonometric functions (sin, cos, tan) and their inverses (asin, acos, atan), logarithmic functions (base-10 log and natural log ln), square root, absolute value, factorial up to 170!, and arbitrary exponentiation using the ^ operator. It also recognizes the mathematical constants π (pi) and e (Euler's number).

The calculator features a DEG/RAD angle mode toggle that affects how trigonometric and inverse trigonometric functions interpret and return angles. In DEG mode, sin(90) returns 1 and asin(1) returns 90. In RAD mode, values are treated as radians — sin(π/2) returns 1. The memory system (MC, MR, M+, M-) lets you store and accumulate intermediate values across multiple calculations.

All computation happens client-side using a safe expression evaluator. The tool preprocesses mathematical notation (×, ÷, π, e, ^) into JavaScript-compatible form, applies the registered function handlers for trig and log operations, then evaluates only expressions containing safe characters. Results are formatted to 12 significant figures with trailing zeros stripped. Full keyboard support allows you to type expressions and press Enter to evaluate, Escape to clear, and Backspace to delete.

Key Features

  • Trigonometric functions: sin, cos, tan with DEG/RAD mode toggle
  • Inverse trigonometric functions: asin, acos, atan returning correct angle units
  • Logarithmic functions: log (base 10) and ln (natural log base e)
  • Power operator ^ for arbitrary exponentiation (e.g., 2^10 = 1024)
  • Factorial function for integers up to 170 (fact button)
  • Mathematical constants π and e built into the keypad
  • Memory functions: MC (clear), MR (recall), M+ (add), M- (subtract)
  • Full keyboard support: numbers, operators, Enter, Escape, Backspace

Frequently Asked Questions

How do I switch between degrees and radians?

Click the DEG or RAD button at the top of the calculator. In DEG mode, trig functions use degrees: sin(90) = 1. In RAD mode, they use radians: sin(π/2) = 1. The currently active mode is shown with a filled button style.

What is the difference between log and ln?

log computes the base-10 logarithm (common logarithm), so log(1000) = 3. ln computes the natural logarithm (base e ≈ 2.71828), so ln(e) = 1. Both require a positive argument.

How do I calculate a factorial?

Enter the integer you want the factorial of, then press the fact button. For example, enter 10 then press fact to get 10! = 3628800. The calculator supports integers from 0 to 170; beyond 170 the result exceeds JavaScript's number range.

How do I use the memory functions?

M+ adds the current display value to memory. M- subtracts it. MR recalls the stored memory value back to the display. MC clears memory to zero. The memory indicator (M=value) appears next to the mode buttons when memory holds a non-zero value.

Can I type expressions directly with my keyboard?

Yes. Number keys, +, -, *, /, (, ), ^, and . all work directly. Press Enter to evaluate (same as the = button), Escape to clear, and Backspace to delete the last character. The * key is automatically displayed as × and / as ÷.

How are complex expressions like sin(cos(45)) handled?

The calculator recursively evaluates nested function calls. It scans for function patterns like sin(...), evaluates the inner expression first, then applies the outer function. This means sin(cos(45)) in DEG mode computes cos(45) ≈ 0.7071 first, then sin(0.7071°).

What happens if I enter an invalid expression?

The display shows "Error" if the expression cannot be evaluated — for example, sqrt(-1), log(0), or a syntax error like unmatched parentheses. The expression field is cleared on error so you can start fresh.

How many significant figures does the calculator use?

Results are formatted using 12 significant figures via JavaScript's toPrecision(12) method, with trailing zeros removed. For integer results, the full integer is shown without decimal point. This provides more precision than most physical scientific calculators.