Scientific Calculator Online with the Working Shown
Scientific Calculator Online
Type a whole expression and it shows you how it read it before it shows you the answer. That matters, because most arguments about what a calculator returned are really arguments about precedence.
14
Try one of the arguments
Your working, most recent first
| Expression | Read as | Result |
|---|
Type the whole expression
Brackets, functions and powers together. Nothing is sent anywhere.
Check how it was read
The grey line shows the bracketing the calculator applied.
Keep the working
Every line lands on the tape and downloads as a CSV.
Why minus two squared is minus four
A minus sign in front of a number binds more loosely than the power does, so the calculator squares the two first and negates the answer afterwards. Every algebra convention, every spreadsheet and every programming language agrees on this. If you meant the other thing, bracket it.
Powers stack from the top down
Two to the three to the two is not sixty four. Exponents group from the right, so the three and the two resolve first and two is raised to nine. Get this backwards and you are out by a factor of eight, which is the sort of error that survives a whole page of algebra unnoticed.
The cosine of ninety is not quite zero
Ninety degrees becomes pi over two in binary, and pi over two cannot be stored exactly. The cosine of a number a hair away from a right angle is a number a hair away from zero. The tidy setting rounds that noise off at twelve figures, and the raw value is always printed underneath so nothing is hidden from you.

How to use this tool
Type the whole thing in one go rather than pressing keys one at a time. Brackets, functions and powers can all sit in the same line, and the answer updates as you type. Press enter or the equals key when you want the line kept on the tape.
The grey line under the input is the part worth reading. It shows the expression with every bracket the calculator applied, so before you trust a number you can see whether the machine understood the question the way you meant it. If that line does not match your intention, the answer is right and your typing was wrong, which is a much easier problem to fix.
Set the angle mode before any trig. Degrees is the default because it is what most people want, but the sine of thirty is one half in degrees and about minus zero point nine nine in radians, and nothing on the screen will warn you which one you asked for except the label in the corner of the input panel.
Why the calculator shows you its bracketing
Almost every argument about what a calculator returned is really an argument about precedence, not arithmetic. Two people put the same characters into two different tools, get two different numbers, and conclude one of the tools is broken. Usually neither is. They are applying the same rules to a string that was ambiguous to begin with.
The convention everything serious agrees on is that brackets bind first, then functions, then powers from the right, then unary minus, then multiplication and division from the left, then addition and subtraction from the left. That ordering is not arbitrary. It is chosen so that polynomials written on paper mean the same thing typed into a machine.
Rather than assume you know all that, this tool prints what it did. Type six divided by two times one plus two and it will tell you it read that as six over two, then multiplied by three, giving nine. If you wanted six over the whole of two times three, you now know exactly where the bracket goes.
The three that catch everyone
Minus two squared. The answer is minus four. The unary minus sits below the power in precedence, so the two is squared and then the result is negated. Spreadsheets are the famous exception: put minus two squared into Excel and you get four, because Excel deliberately breaks with the mathematical convention for that one case. If you need the negative inside, bracket it.
Stacked powers. Two to the three to the two is five hundred and twelve, not sixty four. Exponents associate to the right, so the top of the tower resolves first and you are raising two to the ninth. The left grouping would give eight squared. The difference is a factor of eight and it is very easy to carry through a page of work without noticing.
The cosine of ninety. In degree mode the honest floating point answer is about six times ten to the minus seventeen, not zero. Ninety degrees has to be converted to pi over two, pi over two cannot be represented exactly in binary, and the cosine of something a hair off a right angle is something a hair off zero. The tidy setting rounds that away at twelve significant figures. The raw value is always printed under the result, so you can see what was rounded and decide whether you care.
A worked check you can repeat on paper
Take two plus three times four. Multiplication binds tighter than addition, so the three and the four go together first, giving twelve, and then the two is added for fourteen. The tool prints its reading as two plus the quantity three times four, which is the same statement written so it cannot be misread.
Now five factorial. Five times four times three times two times one is one hundred and twenty. Worth knowing that zero factorial is one rather than zero, which looks wrong until you notice that factorial counts the number of ways to arrange a set, and there is exactly one way to arrange nothing.
Then one third. The tool shows the decimal, and next to it the fraction one over three, recovered from the decimal using continued fractions. Ask it for the square root of two and the fraction card says it is not a simple fraction, because it genuinely is not one. A tool that offered you a fraction for the square root of two would be lying to you, so this one declines.
Finally nought point one plus nought point two. The raw answer is nought point three zero zero zero zero zero zero zero zero zero zero zero zero zero zero four, because neither tenth is exactly storable in binary. With tidying on you get nought point three. Turn tidying off in the controls and the full value appears. This is the single most reported bug in the history of programming and it is not a bug in anything.
Mistakes that catch people out
Leaving the angle mode on the wrong setting. The most common source of a plausible but completely wrong trig answer. If a result is not what you expected, check the corner of the input panel first.
Assuming log means natural log. Here log is base ten and ln is natural, which is the convention in engineering and on almost every physical calculator. In most programming languages and in a lot of pure mathematics, log means natural log. Both usages are defensible and the only safe move is to check which one you are holding.
Using percent as though it were a modifier. Percent here divides by a hundred, full stop. So two hundred times ten percent is twenty, because ten percent is nought point one. Some calculators treat the percent key as context sensitive, giving different answers depending on the operator before it. That is convenient once and confusing forever, so this one does the simple thing.
Expecting a negative modulo to come back negative. Minus seven mod three returns two here, not minus one. This is the floored convention, which keeps the result in the same sign as the divisor and is what you want for wrapping a value into a range. Many programming languages return minus one instead. Neither is wrong, they answer different questions.
Reading too many digits. The full precision line shows seventeen significant figures because that is what a double holds, not because the answer is that accurate. If your inputs came from a measurement, the answer is only as good as the worst of them, and quoting all seventeen is claiming precision you do not have.
How this was checked
The parser was written twice, once as a plain reference script and once as the browser tool, and the two were run against the same thirty six expressions. Precedence anchors: two plus three times four gives fourteen, two to the three to the two gives five hundred and twelve, minus two squared gives minus four while the bracketed form gives four. Trig anchors: the sine of thirty is one half in degrees, the sine of one hundred is one in gradians, the sine of pi over two is one in radians.
The fraction converter was tested on values it should solve and values it should refuse. It recovers a third, seven thirds and three quarters exactly, and correctly returns nothing for the square root of two and for pi rather than inventing an approximation. Factorial was checked at zero, at five, and at three and a half, where it falls back to the gamma function and returns about eleven point six three.
Eight malformed inputs were fed in deliberately, including an unclosed bracket, a trailing operator and an unknown function name, to confirm each one produces a readable message rather than a silent zero. Division by zero reports infinity and the square root of a negative reports not a number, both of which are the honest answers rather than an error.
Expressions worth trying
Each link opens the calculator with that expression loaded and the reading shown underneath it. They are picked because they are the ones people disagree about.
-2^2 · (-2)^2 · 2^3^2 · 6/2*(1+2) · 0.1+0.2 · cos(90) · 5! · 0! · sin(30) · tan(45) · sqrt(2) · 1/3 · ln(e) · log(1000) · 7mod3 · -7mod3 · 200*10% · 2e3+1 · (3+4)*(5-2) · 3.5!
The same kind of thing in radians instead of degrees: sin(1) · cos(pi) · tan(pi/4) · asin(1).
Related Calculators and Reference
- Standard deviation and variance calculator when you have a column of numbers rather than a single expression.
- Mean, median and mode calculator for the centre of a dataset, and which of the three averages actually answers your question.
- Significant figures and rounding calculator the full precision line here shows seventeen digits, and this tells you how many of them you are entitled to keep.
- Scientific and engineering notation converter for turning the exponent form above into SI prefixes and back.
- Fraction calculator for working in exact fractions throughout rather than recovering one from a decimal at the end.
- Angle converter for moving between degrees, radians, gradians and mils before the trig rather than after it.
- Prime factorisation calculator factors, greatest common divisor and lowest common multiple.
- Quadratic Formula Calculator: roots of ax² + bx + c = 0 with the steps.
- Square Root Calculator: square, cube and nth roots in simplest radical form.
- Log Calculator: logs to any base with the change of base working.
- Permutation and Combination Calculator: nPr and nCr with exact factorials.
- Matrix Calculator: determinants and inverses with exact fractions.
- Half Life Calculator: exponential decay solved for any unknown.
- ISO 80000-2 sets out the standard notation for mathematical signs and symbols, including the operator ordering this calculator follows.
