Basic Calculator

0

Keyboard shortcuts work too: digits, + - * /, Enter for =,Backspace, Escape for AC.

This free online calculator handles everyday math, addition, subtraction, multiplication, division, percentages, and memory, the same way a physical calculator does. Type with the on-screen buttons or your keyboard. Nothing you enter is sent anywhere or stored.

How to Use It

  1. Type a number using the keypad or your keyboard.
  2. Press an operator (+, −, ×, ÷).
  3. Type the next number, then press = for the result.
  4. Use M+, M−, MR, and MC to store and recall a value in memory.

How It Works

This calculator evaluates operations immediately, in the order you press them, the same "chain" model every physical four-function calculator uses, rather than algebra's order of operations. Pressing = repeats the last operation and number if you press it again, so 5 + 3 = gives 8, and pressing = a second time gives 11 (8 + 3).

The % key is context-aware: with a number and operator already entered, it computes a percentage of that number (200 + 10% adds 10% of 200); on its own, it just divides by 100. Memory (M+, M−, MR, MC) is independent of the main calculation. Pressing AC clears the current calculation but never touches what's stored in memory.

A worked example of the chain model: entering 10 − 2 × 3 gives 24, not 4. The 10 − 2 resolves immediately to 8 the moment × is pressed, then 8 × 3 = 24 once = is pressed. The calculator never "looks ahead" to see that × normally has higher precedence than −, since it only ever evaluates the two most recent numbers and the one pending operator between them.

Everything runs client-side in your browser. No numbers you enter are sent anywhere or stored.

Frequently Asked Questions

Why does 2 + 3 × 4 give 20, not 14?

This calculator works the same way a physical calculator does: it evaluates left to right as you press keys, rather than following algebra's order of operations. 2 + 3 × 4 is evaluated as (2 + 3) × 4 = 20, since the + is calculated as soon as × is pressed. If you want 3 × 4 evaluated first, enter that part first.

How does the % key work?

It depends on what comes before it. With a pending operation, % computes a percentage of the other number: 200 + 10% gives 220, since it adds 10% of 200. On its own, with no pending operation, % simply divides the current number by 100.

Does this do scientific calculations like trig or logarithms?

No, this is a four-function calculator (add, subtract, multiply, divide) plus percent and memory, matching a standard everyday calculator. For trigonometric, logarithmic, and exponential functions, this site's Scientific Calculator covers those on top of everything this one already does.

What do M+, M−, MR, and MC actually do?

M+ adds the currently displayed number to memory, M− subtracts it from memory, MR recalls the stored memory value onto the display, and MC clears memory back to zero. Memory is completely separate from the current calculation, so pressing AC to clear the display never erases what you've stored in memory, useful for running a subtotal while doing other unrelated math.

Can I type on my keyboard instead of clicking the buttons?

Yes, number keys, +, -, *, /, Enter (for =), and Escape (for AC) all work the same as clicking the on-screen buttons, so you can drive the whole calculator without touching the mouse.

What happens if I divide by zero?

It shows a clear error rather than a nonsensical or crashed result, matching how physical calculators handle an undefined operation. Enter a new number afterward to start a fresh calculation.

What happens if I press an operator right after another operator?

The most recently pressed operator wins: pressing + then × before entering a number replaces the pending + with ×, the same forgiving behavior most physical calculators use, rather than either stacking both operators or throwing an error.