Calculator
Add, subtract, multiply and divide in your browser, by tapping the keys or typing on your keyboard. It works left to right like a pocket calculator, so 2 + 3 × 4 gives 20.
Calculator
Features
- Add, subtract, multiply and divide, with decimals
- Works left to right like a pocket calculator: 2 + 3 × 4 gives 20, not 14. For 14, enter 3 × 4 first, then + 2
- Shows up to 15 significant digits and whole numbers up to 9,007,199,254,740,991 exactly
- Keyboard support: digits, + - * /, Enter, Backspace and Esc
- Clear and backspace keys
How to use the calculator
- Click the keys or type on your keyboard. Enter or = shows the result, Backspace removes the last digit and Esc clears everything.
- Each operator works on the running total, from left to right. Press + after 7 × 6 and the screen shows 42 before you type the next number.
- After a result, press an operator to keep going from it, or type a digit to start a new sum.
- If the screen shows an error, press any key to clear it. To write a result in words for a cheque, use Amount in Words.
Frequently asked questions
Why does 2 + 3 × 4 give 20 and not 14?
Because this calculator works left to right, like a basic pocket calculator. It applies each operator to the total so far: 2 + 3 = 5, then 5 × 4 = 20. Scientific calculators and spreadsheets follow the order of operations and give 14. To get 14 here, enter 3 × 4 first, then + 2.
Why does 0.1 + 0.2 show 0.3 here when some apps show 0.30000000000000004?
Results are rounded to 15 significant digits before they are shown. Computers store decimals in binary, so 0.1 + 0.2 really is 0.30000000000000004 inside the machine, and the rounding hides that noise. Whole numbers up to 9,007,199,254,740,991 are shown exactly.
Sources: MDN Web Docs, Number.MAX_SAFE_INTEGER
Can it do percentages, square roots or brackets?
No. It has the four basic operations, decimals, clear and backspace. For a percentage, multiply by it as a decimal: 15% of 2,400 is 2400 × 0.15 = 360.
What happens if I divide by zero?
The screen shows Cannot divide by zero and the sum is cleared. Press any key to carry on; a digit starts a new number straight away.
Which keyboard keys work?
Digits, a dot or comma for decimals, + and -, * or x to multiply, / to divide, Enter or = for the result, Backspace to delete a digit, and Esc, Delete or C to clear. Keys are ignored while you are typing in another field on the page, and shortcuts that use Ctrl, Alt or Cmd are left to your browser.
What if I press two operators in a row?
The second one replaces the first. Typing 5, then +, then ×, then 2 multiplies, so the answer is 10.