Skip to content
SmaftyTools

Scientific Calculator

A scientific calculator with trig, logarithm, exponent, factorial and root functions. Free online scientific calculator, works entirely in your browser.

About Scientific Calculator

The Scientific Calculator extends everyday arithmetic with the functions a basic calculator leaves out — trigonometry (sin, cos, tan and their inverses), logarithms (base-10 and natural log), square roots, exponents, factorials and the constants π and e. It's built for students working through trigonometry or calculus homework, engineers double-checking a quick formula, and anyone who needs more than +, −, × and ÷ but doesn't want to dig out a graphing calculator app or open a spreadsheet. Like every tool on this site, it runs entirely in your browser — no install, no signup, and results appear as you type.

Type an expression the same way you'd write it on paper: `sin(30)`, `sqrt(16) + pi`, `log(1000)`, or `5!` for factorial. A degrees/radians toggle switches how trig functions interpret their input and output, since sin(30°) and sin(30 rad) are very different numbers — a common source of wrong answers on calculators that don't make the mode obvious. The button grid below the expression field inserts function names and constants for you if you'd rather click than type long function names.

The evaluator is a hand-written recursive-descent parser — the same category of technique used inside real calculator engines and programming-language interpreters — so it respects standard operator precedence and parentheses nesting, evaluates `2^3^2` right-to-left as `2^(3^2) = 512` the way mathematical convention dictates, and rejects malformed input with a specific error message (missing parenthesis, unknown function name, factorial of a non-integer) instead of silently producing garbage. No `eval()` or `Function()` is used anywhere, so there's no code-injection risk from what you type.

Because everything happens client-side, the calculator keeps working offline once the page has loaded and never transmits what you calculate. It's free with no usage limits, works identically on phones, tablets and desktops, and is fast enough to recompute on every keystroke without any noticeable lag.

How to Use the Scientific Calculator

  1. Type an expression using digits, + − × ÷ % ^ ! and parentheses.
  2. Add functions like sin(), cos(), tan(), log(), ln(), sqrt(), exp() or abs() — click a button or type the name followed by parentheses.
  3. Toggle Deg/Rad to control how trig functions interpret angles.
  4. The result updates automatically as you type; fix the highlighted error if the expression is invalid.

Features

  • Trigonometric functions (sin, cos, tan, asin, acos, atan) with degree/radian toggle
  • Logarithms (log base 10, natural log), square root, exponent and absolute value
  • Factorial (!) and the π and e constants
  • Safe recursive-descent parser — no eval(), full parenthesis and precedence support

Examples

Trig in degree mode

Input

sin(30)

Output

0.5

Roots and constants

Input

sqrt(16) + pi

Output

≈ 7.14159265359

Factorial

Input

5!

Output

120

Frequently Asked Questions

How do I switch between degrees and radians?

Use the Deg/Rad switch above the expression field. It affects sin, cos, tan and their inverse functions — sin(30) is 0.5 in degree mode but a different value in radian mode, so check the toggle if a trig result looks wrong.

How does factorial work?

Type a number followed by !, e.g. 5! evaluates to 120. Factorial only accepts non-negative integers — 3.5! or (-2)! will show an error.

Does it support nested functions and parentheses?

Yes — expressions like sqrt(sin(30)^2 + cos(30)^2) work exactly as written, with standard order of operations and unlimited parenthesis nesting.

Is the Scientific Calculator free?

Yes, the Scientific Calculator is completely free with no usage limits. No signup, no account and no installation required.

Is my data safe?

Yes. All processing happens locally in your browser using JavaScript — nothing you type is uploaded or stored on our servers.