Scientific calculator — online, with a simple mode and full working
A calculator you can type into as well as tap. It reads a whole expression at once, so 2+3×4 comes out as 14 and brackets do what you expect. Switch between a plain keypad and the scientific one, choose degrees or radians before you touch a trig key, and get a sentence rather than "NaN" whenever an answer does not exist. Nothing you type is uploaded or saved.
- Nothing you type is uploaded or saved
- Works offline
Type an expression, or tap the keys. Enter works out the answer; Escape clears.
This session
Every line you work out lands here. Click one to put it back in the field and change a number. The list is held in this tab only — it is not saved, and closing the tab clears it.
Keyboard shortcuts
These work anywhere on the page — you do not have to click into the field first.
- 0–9 . ( )
- Type numbers, a decimal point and brackets
- + − * /
- Add, subtract, multiply, divide
- ^
- Raise to a power — 2^10 is 1024
- %
- Percent, meaning divide by 100
- !
- Factorial — 5! is 120
- a–z
- Function and constant names: sin, cos, tan, log, ln, sqrt, pi, e
- Enter or =
- Work out the answer and keep it as Ans
- Backspace
- Delete the last character
- Esc or Delete
- Clear the whole expression
How it works
- 1
Type it or tap it — both work
The display is a real text field, so on a laptop you can type 12*(3+4)^2 straight in and press Enter. On a phone the keypad does the same job, and tapping inserts at the cursor rather than always at the end, so you can go back and fix a digit in the middle. Backspace deletes one character, Escape clears everything, and the answer updates as you type — you do not have to press equals to see where an expression is heading.
- 2
Start simple, switch to scientific when you need it
Simple mode shows digits, the four operators, brackets, percent and memory — the keys most visits actually use. Scientific mode adds the second block: sine, cosine and tangent with their inverses, square root, powers, factorial, log and ln, the exponential keys, and the constants π and e. It is one page and one calculator either way; the toggle only decides how much of the keypad is on screen, so an expression you started in simple mode keeps working when you switch.
- 3
Set DEG or RAD before any trig
The angle mode sits next to the answer, in capitals, on every screen size, and it is the first thing to check when a trig result looks wrong. In DEG, sin(30) is exactly 0.5. In RAD, sin(30) is −0.988, because 30 radians is nearly five full turns. Neither is a bug and neither mode is more correct — school geometry and surveying work in degrees, while calculus, physics and every programming language work in radians. The badge means you never have to guess which one you are in.
- 4
Reuse the answer instead of retyping it
Every evaluation drops into the history list, and clicking one puts that expression back in the field so you can adjust a number and run it again. The Ans key inserts the last answer at full precision, which matters over a chain of steps — retyping a rounded 0.333 loses what the calculator was still holding. The four memory keys work the way they do on a desk calculator: M+ adds the current answer to the store, M− takes it off, MR pastes it in and MC empties it. The history lives in this tab only and disappears when you close it.
What each key does, with the answer it gives
Type any line from the first column into the calculator above and you will get the figure in the third — these answers are worked out by the same parser the tool uses, not typed out by hand, so the table cannot drift away from what the calculator actually does. Every row assumes DEG for the trig keys and an empty memory.
| Type this | What it means | Answer |
|---|---|---|
| 2+3*4 | Multiplication runs before addition | 14 |
| (2+3)*4 | Brackets are the only way to override that | 20 |
| -3^2 | The power binds tighter than the minus sign | -9 |
| (-3)^2 | Brackets put the minus inside the square | 9 |
| 2^10 | x^y — the power key | 1,024 |
| 2^0.5 | A fractional power is a root | 1.41421356237 |
| sqrt(144) | √ — square root | 12 |
| 5! | Factorial: 5 × 4 × 3 × 2 × 1 | 120 |
| 15% | Percent simply divides by 100 | 0.15 |
| 200*15% | Fifteen percent of two hundred | 30 |
| sin(30) | Sine, in DEG — exactly a half | 0.5 |
| asin(0.5) | Inverse sine, back to degrees | 30 |
| log(1000) | log means base 10 | 3 |
| ln(e) | ln means base e | 1 |
| pi | π, shown to 12 significant digits | 3.14159265359 |
| 2pi | A number beside π multiplies | 6.28318530718 |
| exp(1) | e^x — the exponential key | 2.71828182846 |
| 1/3 | Precision is kept, not cut to two places | 0.333333333333 |
Frequently asked questions
Why is 2 + 3 × 4 equal to 14 and not 20?
Because multiplication is done before addition. This calculator reads the whole expression and applies the standard order of operations — brackets first, then powers, then multiplication and division from left to right, then addition and subtraction from left to right. So 3 × 4 is worked out first, giving 12, and 2 is added to it for 14. A basic four-function calculator, the kind on a desk, gives 20 instead, because it acts on each key as you press it and has already added 2 and 3 before it sees the ×. Neither machine is broken; they are answering different questions. If you want the 20, type (2 + 3) × 4 — brackets are the only way to override the order, and they are worth using even when they are not strictly needed, because an expression that reads unambiguously is one you can check tomorrow.
What is the difference between −3² and (−3)²?
They are −9 and 9, and the difference is which operation happens first. A power binds tighter than a minus sign, so −3² means "take 3 squared, then negate it": 3² is 9, and the minus makes it −9. Writing (−3)² puts the minus inside the brackets, so the whole of −3 is squared, and a negative times a negative is positive, giving 9. This calculator follows the textbook rule, which is also the rule Python, JavaScript and every algebra course use. It is worth knowing that Excel does the opposite — =-3^2 in a spreadsheet returns 9 — which is why a figure copied out of a spreadsheet formula sometimes disagrees with the same formula typed here. Type the brackets and the ambiguity disappears.
How do I tell whether I am in degrees or radians?
The mode is printed next to the answer as DEG or RAD, and there is a two-button switch above the trig keys. A hidden angle mode is the most common reason a trigonometry answer comes out wrong, so it is never more than a glance away here. The quick test: in degrees, sin(30) is exactly 0.5 and sin(90) is exactly 1. In radians, sin(30) is about −0.988 and sin(90) is about 0.894. As a rule, use degrees for geometry, navigation, surveying and anything with a protractor; use radians for calculus, physics, and for checking work against a programming language, because Math.sin in every mainstream language takes radians. The inverse keys follow the same setting, so asin(1) gives 90 in DEG and 1.57079632679 — that is π/2 — in RAD.
What does log mean here, and what is the difference from ln?
log with no base written means base 10: log(1000) is 3, because 10 to the power 3 is 1000. ln means the natural logarithm, base e, where e is about 2.71828: ln(e) is 1, and ln(1000) is about 6.9078. The convention is not universal, which is exactly why the question keeps being asked — most calculators and most engineering and chemistry writing use log for base 10, while most pure mathematics papers and many programming libraries use log for the natural logarithm. This page follows the calculator convention. If you need a logarithm in some other base, divide: log base 2 of 64 is log(64) ÷ log(2), which is 6, and the same trick works with ln on both halves. Logs of zero and of negative numbers are refused with an explanation rather than returned as an error code, because no real power of 10 or of e ever produces them.
Why does 0.1 + 0.2 come out as 0.3 here when programmers say it is 0.30000000000000004?
Both are true, and the difference is rounding for display. Computers store numbers in binary, and one tenth cannot be written exactly in binary any more than one third can be written exactly in decimal — 0.3333… never terminates. So 0.1 and 0.2 are each stored as the nearest value the machine can hold, and adding those two near-misses lands a hair above three tenths. This calculator rounds every answer to 12 significant digits before showing it, which is far enough in to hide the binary dust and far enough out to keep real precision: 1 ÷ 3 still shows as 0.333333333333, not as 0.33. The full unrounded value is what gets stored in Ans and in memory, so chaining a long calculation does not lose accuracy at every step — only the display is rounded, never the arithmetic.
What does the % key do?
It divides the number in front of it by 100, and nothing else. So 15% is 0.15, 200 × 15% is 30, and 50% + 50% is 1. This is the mathematical reading of the symbol and it composes properly with everything else on the keypad. It is not the "percent key" behaviour of a supermarket desk calculator, where 200 + 15% silently means "add fifteen percent of 200" and returns 230; here 200 + 15% is 200.15, because 15% really is 0.15. To add fifteen percent, type 200 × 1.15, or 200 + 200 × 15%. The desk-calculator shortcut guesses what you meant based on which operator came before, and a calculator that guesses is a calculator that is occasionally confidently wrong.
Which keyboard keys work?
All the digits, a full stop for the decimal point, + − * / ^ ( ) % and !, and the letters that spell a function name — typing s-i-n-( is exactly the same as tapping the sin key. Enter or = evaluates and adds the line to the history. Backspace deletes one character. Escape clears the expression, and so does Delete when the field is not focused. You can paste an expression in from somewhere else, and thousands separators inside a number are understood, so 1,250 + 4 gives 1,254. A stray comma that is not a thousands separator is reported as an error rather than quietly ignored, because ignoring it would turn 1,250 into 250 without telling you.
Why does it say something is undefined instead of showing NaN or Infinity?
Because "NaN" tells you nothing you did not already know. Every dead end here gets a sentence naming what went wrong and, where there is one place to point at, the position in the expression. Dividing by zero, taking the square root of a negative, taking a log of zero or of a negative, a factorial of a fraction or of a negative number, tan(90°), an inverse sine of anything outside −1 to 1, unbalanced brackets, and an expression that simply ends too early are each reported in their own words. Two are worth knowing about in advance: 171! overflows past the largest number a browser can hold, so 170! is the biggest factorial available; and tan(90°) is refused exactly in degrees, while in radians π/2 cannot be typed exactly, so that one comes out as an enormous number rather than an error — the message says so when it happens.
Is anything I type sent anywhere, or kept?
No. The parser and the arithmetic are JavaScript running in this tab; there is no server involved at any point, and the page works with the connection switched off once it has loaded. Nothing is written to your browser storage either — the history list, the memory register and the last answer live in the page, and closing or reloading the tab clears all three. That is deliberate: a calculation is finished in one sitting, so saving it buys almost nothing and would downgrade what this page can honestly promise. Like every page on this site, it does serve ads, which is explained on the privacy page.