Basic Calculator

A simple four-function calculator for everyday addition, subtraction, multiplication, and division.

Calculator display

Formula used

The four basic operations:
  Addition:        a + b
  Subtraction:     a − b
  Multiplication:  a × b
  Division:        a ÷ b   (b ≠ 0)

Evaluated with standard operator precedence: × and ÷ before + and −.

Worked example

Expression: 12 + 8 × 3

Because multiplication is evaluated first: 8 × 3 = 24, then 12 + 24 = 36.

Result: 36

Frequently asked questions

How is the running display different from a plain input box?

As you press keys, the full expression you are building is shown, and a live preview of the result appears above it. You can see exactly what will be calculated before pressing equals, which makes mistakes easy to spot and fix with backspace.

Does this calculator follow order of operations?

Yes. Multiplication and division are evaluated before addition and subtraction, so an expression like 2 + 3 × 4 gives 14, not 20. For more control you can group terms on the Scientific Calculator, which adds parentheses.

What does the backspace key do?

The ⌫ key removes the last character you entered, so you can correct a single mistyped digit or operator without clearing the whole expression. The C key clears everything.

Is anything I type sent to a server?

No. The calculator runs entirely in your browser with plain JavaScript. Nothing you enter is uploaded, stored, or logged.