Scientific Calculator

Type the whole sum, brackets and all

It reads a full expression the way maths actually works — multiplication before addition, brackets first — instead of applying each button as you press it.

Advertisement

0

Type directly — the keyboard works Enter equals   Esc clear

Advertisement

How it works

Why the order of operations matters

Many simple online calculators apply each button the moment you press it. That gives the wrong answer for anything with mixed operators.

Precedence, properly

The whole expression is parsed before anything is worked out, so multiplication and division come before addition and subtraction, and powers before both.

2+3*4 is 14, not 20
2^3^2 is 512, right to left
-2^2 is −4, as in algebra

Keyboard first

Type the sum as you would write it. Digits, operators and brackets all work, Enter evaluates, Esc clears and backspace deletes. The on-screen keys are there for touch.

A running tape

Every result stays on screen with the expression that produced it. Tap any line to bring it back for editing, or use Ans to feed the last answer into a new calculation.

Degrees or radians

Switch with the chip on the display. Results at exact angles are cleaned up, so sin(180) reads 0 rather than the 0.0000000000000001 that raw floating point returns.

Errors that explain

Dividing by zero, the square root of a negative, or a factorial of a fraction each give a sentence saying what went wrong, instead of a silent NaN or a blocking pop-up.

Sensible rounding

Twelve significant digits are shown. That hides the artefacts of binary floating point — 0.1+0.2 reads 0.3 — without pretending to a precision the hardware does not have.

Questions

Frequently asked

Why does 2 + 3 × 4 give 14 and not 20?

Because multiplication is done before addition. 3 × 4 is 12, and adding 2 gives 14. A calculator that answers 20 is applying each operation as you press it, left to right, which is how cheap pocket calculators behave but not how the expression is written. Use brackets if you want the other reading: (2+3)*4.

How do I square a number?

Press after the number, or type ^2. For any other power use or type ^ followed by the exponent — so 2^10 gives 1024.

Why does sin(180) show exactly 0?

Mathematically it is 0, but binary floating point cannot represent π exactly, so the raw computation returns about 0.00000000000000012. Results within a whisker of a round number are snapped to it, which is what a physical scientific calculator does too.

What does Ans do?

It inserts the previous answer, so you can carry a result into the next sum without retyping it. Tapping a line in the tape above the display does the same thing for any earlier calculation.

Is there a limit on factorials?

170 is the ceiling, because 171! exceeds the largest number JavaScript can represent and would simply return infinity. Above about 18 the result also stops being exact, since it needs more digits than the format carries — that is a limit of the arithmetic, not of this page.

Is my calculation sent anywhere?

No. Everything is worked out inside your browser and nothing is transmitted. The tape is kept only in the page and disappears when you close it.