Scientific Calculator

A full scientific calculator that works the way you think: type the whole expression — 2*sin(30)+sqrt(16) — and see the result live as you type. Trig functions, inverse trig, logarithms, powers, roots, factorials, and constants, with a degree/radian toggle. Everything runs locally in your browser.

How it works

This is an expression calculator: you type the whole formula and the result previews underneath in green as you go. Press = or Enter to commit — the result replaces the expression so you can keep calculating with it. The keypad inserts at your cursor position, so you can mix clicking and typing freely. Esc or C clears everything.

Degrees vs radians

The DEG/RAD button switches how trig functions interpret angles. In DEG mode, sin(30) is 0.5 and atan(1) is 45; switch to RAD for calculus-style math where sin(pi/2) is 1. Inverse functions (asin, acos, atan) return their answers in the matching unit. The current mode shows on the button itself.

Operators and shortcuts

  • ^ raises to a power (2^10 = 1024), x² is shorthand for ^2
  • ! is factorial — whole numbers from 0 to 170 (6! = 720)
  • % turns the number before it into a fraction (50% = 0.5, so 200*50% = 100)
  • ln is natural log, log is base-10, √ is square root
  • Constants π and e can be typed directly — 2pi works without a *
  • A real parser, written in-house

    Most embeddable calculators just hand your input to JavaScript’s eval(). This one doesn’t. It uses an expression parser built from scratch for this site — a tokenizer, the classic shunting-yard algorithm, and a stack-based evaluator, honoring real math conventions: ^ is right-associative (2^3^2 = 512), -3^2 is −9, and multiplication binds tighter than addition. Results are rounded to 12 significant digits, so 0.1+0.2 is a clean 0.3. No third-party widgets, no tracking, no network requests.