Basic Calculator

Four-function calculator with keyboard support.

0

Keyboard supported: numbers, +, −, ×, ÷, Enter (=), Escape (C), Backspace.

Advertisement

About this calculator

A straightforward four-function calculator supporting addition, subtraction, multiplication, and division. It also handles percentages and sign toggling. You can use your keyboard — number keys, operators, Enter for equals, and Escape to clear.

How to use it

  1. Click buttons or use your keyboard to enter a calculation.
  2. Press = or Enter to evaluate.
  3. Press C or Escape to clear everything. CE clears only the last entry.
  4. ± toggles the sign of the current number. % divides by 100.
Advertisement

FAQ

Does it support order of operations?
Yes. The expression is evaluated using standard JavaScript math rules, so multiplication and division are evaluated before addition and subtraction.
What does CE do vs C?
C clears the entire expression. CE removes only the last typed entry, similar to a backspace for the last number entered.
Can I use the keyboard?
Yes — number keys, +, -, *, /, Enter (for =), Escape (for C), and Backspace all work.