Scientific Calculator
A full scientific calculator that shows its working — type an expression and see the answer update live.
How to use
Type an expression and the answer appears as you go — there is no need to press equals to see it. Equals is for keeping a line: it files the expression in the history and stores the answer in ans, which you can use in the next calculation. Click any history line to bring it back.
Multiplication can be left implied, the way it is written on paper: 2(3+4), 3π and 2sin(45) all work. The keypad and the keyboard do the same thing, so use whichever is faster.
Functions available
sin cos tan and their inverses asin acos atan, the hyperbolics sinh cosh tanh, ln (natural log), log (base 10), log2, sqrt, cbrt, abs, exp, round, floor, ceil. Constants pi (or π) and e. Operators + − × ÷ ^, mod for remainder, ! for factorial and % for percent.
Switch between DEG and RAD before using a trigonometric function — it changes both what goes in and what comes out, so sin(30) is 0.5 in degrees and 0.9880… in radians.
What % means here
% divides by a hundred, so 50 + 10% is 50.1. Phone calculators often read that as "50 plus 10 percent of 50" and answer 55 — a convenient shortcut, but it makes % mean different things in different places. For the "add 10% to this" question, the percentage calculator is the right tool. Use mod when you want a remainder.
About the accuracy
Results are rounded to twelve significant digits, which is why 0.1 + 0.2 gives a clean 0.3 here rather than the 0.30000000000000004 that raw binary floating point produces. Trigonometric results are rounded a little further, so sin(180) in degrees comes out as an exact 0 instead of a speck of rounding dust. tan(90) reports that it is undefined rather than returning the enormous number the hardware would give.
Expressions are parsed properly — tokenised and run through the shunting-yard algorithm — rather than handed to the browser's eval. That is what makes -2^2 correctly equal -4 and 2^3^2 equal 512, and it means nothing you type is ever executed as code.