Basic arithmetic and percentages
You can type numbers and operators directly on your keyboard — Enter to calculate, Esc to clear
This is a four-function calculator that runs in your browser. It has digit keys, add, subtract, multiply, divide, a decimal point, parentheses and a percent key. You can type a whole expression and evaluate it in one go, and the last six calculations are kept in a history list below the keypad. It is not a scientific calculator: there are no square root, trigonometry or power buttons, and no variables or units. The percent key behaves like a typical pocket calculator: after a plus or minus it means a percentage of the number on its left. The examples below show exactly how.
0.1+0.2 gives 0.3, because results are rounded to at most 10 decimals and you never see 0.30000000000000004. (3+5) x 2 / 4 gives 4. 8 / 3 gives 2.6666666667. 200 x 15% gives 30, and -5+2 gives -3. Now the percent key: 100-20% gives 80 (20 percent of 100 is taken off), 100+10% gives 110, and 200+10%+10% gives 242 (the second 10% is taken of the running total, 220). In multiplication and division % simply divides by 100: 50 x 10% gives 5 and 200 x 15% gives 30. A bare 20% gives 0.2, and 50%+10 gives 10.5 because the leading 50% is treated as 0.5. 100-20% x 2 gives 99.6, because that term is no longer a plain 'number%', so 20% counts as 0.2. A 20 percent discount can also be written 100 x 80% or 100 x 0.8.
After a minus (or plus), % means 'that percent of the number on the left': 100-20% is 100-(100 x 20%) = 80. In multiplication and division, % just divides by 100, so 100 x 20% = 100 x 0.2 = 20. If you prefer to be explicit, a 20 percent discount is 100 x 80% and a 20 percent increase is 100 x 120%; the results are the same.
Yes. The page listens for key presses: digits, the decimal point, +, -, *, /, parentheses and % are entered directly; Enter or = evaluates; Backspace deletes a character; Esc or Delete clears the display. The listener works across the whole page, so while you are on the calculator these keys will not go into other fields.
So that a broken expression does not sit on the display, pressing equals on something that cannot be evaluated clears it. A history line with the result Error is still added, so you can look back at what you typed. Just enter the expression again.
It uses the browser's standard double-precision floating point, which gives roughly 15 to 17 significant digits. That is fine for shopping, bills and splitting costs. For cent-exact accounting or very large integer arithmetic, use dedicated financial software and trust its output instead.
Expressions are evaluated only inside your browser. Before evaluation the tool checks that the text contains nothing but digits, operators, decimal points, parentheses and spaces, and rejects anything else. Nothing you type is uploaded, and the history lives only in the page's memory, so it is gone when you reload or close the tab.