← Back

Calculator

Basic arithmetic and percentages

You can type numbers and operators directly on your keyboard — Enter to calculate, Esc to clear

0

About Calculator

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.

How to use it

  1. Press the keys on screen, or type on your keyboard: digits, the decimal point, plus, minus, parentheses and percent. Typing * shows as the multiplication sign and / shows as the division sign.
  2. The whole expression appears on the dark display, which shows 0 when empty. Press the backspace key to remove the last character, or press C (or Esc / Delete on the keyboard) to clear everything.
  3. Press the wide equals key at the bottom, or Enter on the keyboard, to evaluate the entire expression. The result replaces the expression on the display, so you can keep typing to continue the calculation.
  4. Each time you press equals, the expression and its result are added to History, which holds the six most recent entries with the newest on top. History disappears when you reload the page.

Worked examples (computed with the page's own evaluation logic)

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.

Limits and known quirks

  • Only digits, +, -, multiply, divide, the decimal point, parentheses and percent are accepted. Other characters typed on the keyboard, such as letters or commas, are ignored.
  • Percent means 'divide by 100' (20% is 0.2). When it directly follows + or - and that term is just 'number%' (100-20%, 100+10%), it is taken as a percentage of the running result on its left, like on a typical pocket calculator. In multiplication and division it is only /100 (50 x 10% = 5). The percent sign is a postfix on a number or closing parenthesis; digits typed right after it, as in 5%3, produce Error.
  • Typing two multiplication signs (2 x x 3) or two division signs in a row shows Error.
  • Leading zeros on integers are ignored, so 007+1 gives 8.
  • Dividing by zero, unbalanced parentheses, a trailing operator (1-), or a number with two decimal points (12.5.3) all show Error, and the expression is cleared after you press equals.
  • Results keep up to 10 decimal places. Very large or small values appear in scientific notation, for example four factors of one million multiply to 1e+24. Ordinary floating-point precision limits still apply.
  • There is no memory key (M+ / MR), no undo and no 'previous answer' key. History is for reading only; clicking an entry does not bring it back to the display.

Why is 100-20% equal to 80 but 100 x 20% equal to 20?

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.

Can I use my keyboard?

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.

Why did my expression disappear after an Error?

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.

Is it accurate enough for money or very long numbers?

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.

Privacy and processing

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.