Scientific Calculator

=
DEG

History

Press Enter to record a calculation.
Reference
Functions: sin cos tan asin acos atan sinh cosh tanh ln log log2 sqrt cbrt abs exp round floor ceil · two-argument: pow(a,b) root(a,b) log(a,b) min max mod · constants: pi e tau phi · postfix: ! factorial, % percent · ans reuses the last result.

A scientific calculator with trigonometry, logarithms, factorials and constants, that shows the expression you typed alongside the result and keeps a history you can scroll back through.

The reason a scientific calculator is not just a calculator with more buttons is operator precedence. −2^2 is −4, because exponentiation binds tighter than the minus sign, and a surprising number of calculators return 4. This one parses the whole expression before evaluating it, so precedence, unary minus and nested parentheses behave the way they do on paper.

Trigonometric functions read degrees or radians depending on the DEG/RAD switch — the single most common source of a wrong answer here — and the log keys are separated into base 10 and natural log rather than left to guesswork. History and memory persist in this browser, so a figure you worked out an hour ago is still there.

Floating point is the second source of answers that look wrong and are not. The page evaluates in the same IEEE 754 double precision that every browser, spreadsheet and most programming languages use, where 0.1 + 0.2 is 0.30000000000000004 because none of those three values has an exact binary representation. Results are rounded for display so the noise does not show, but the limit is real: about 15 significant decimal digits, after which extra digits are not information. Any calculation whose answer depends on the sixteenth digit needs a different kind of tool.

Degrees and radians deserve the switch they get. Trigonometric functions in nearly every programming language take radians, while nearly every geometry problem and every angle written on a drawing is in degrees, and the mismatch produces answers that are wrong without being obviously wrong — sin(30) is 0.5 in degrees and −0.988 in radians, and both are plausible-looking numbers. Checking the mode before trusting a trigonometric result is a habit worth having, which is why the indicator is where it is rather than tucked into a menu.

History and memory persist in this browser rather than on a server, which makes the page usable for the work it is actually used for: a figure worked out earlier in the afternoon is still there, and a running subtotal can be kept in memory across a series of separate calculations. Because the storage is local to the browser it does not follow you to another machine, and clearing site data clears it — a reasonable trade for a tool where the alternative would be asking you to sign in to keep a list of arithmetic.

Factorials reach the limit of double precision faster than anything else on the keypad. 170! is about 7.26 x 10^306 and still representable; 171! overflows the format entirely and evaluates to infinity, which is the correct IEEE 754 answer rather than a failure. Well before that, factorials stop being exact: above 22! the result no longer fits in the 53 bits of mantissa available, so the digits shown are a rounded approximation even though every one of them looks like an integer. Combinatorics that need exact large values want arbitrary-precision arithmetic, which is a different tool.

How to use Scientific Calculator

  1. Type an expression, or use the buttons.
  2. Read the live result as you type.
  3. Press equals to commit it to the history.
  4. Reuse an earlier line from the history.

Tips & gotchas

  • Check whether you are in degrees or radians before doing anything with trigonometry — it is the source of most wrong answers.
  • Parenthesise aggressively. Operator precedence is standard, but explicit brackets are easier to re-read.
  • The history is the fastest way to spot where a multi-step calculation went wrong.

Frequently asked questions

Does it work offline?

Yes, once the page has loaded. All evaluation happens in your browser with no network calls.

How precise is it?

It uses IEEE 754 double-precision floating point, like most calculators and programming languages. Expect around 15 significant digits, and the usual tiny rounding artefacts on values such as 0.1 + 0.2.

Are factorials of large numbers supported?

Factorials grow past the floating-point range quickly — beyond roughly 170! the result is infinity.