Math & Basic

Basic Calculator

Quick and simple arithmetic.

0
What is the Basic Calculator?

A quick arithmetic tool for addition, subtraction, multiplication and division, usable from the on-screen keypad or your physical keyboard. It parses expressions directly in the browser (no server, no external library) and supports chained calculations, letting you continue from a previous result.

How to use it

Tap numbers and operators, then press = to compute. C clears everything, ← deletes the last character, and % converts the current number to its percentage value (÷100). Keyboard shortcuts: digits and + - * /, . for the decimal point, Enter to compute, Backspace/Esc to delete, and % for percent.

Operator precedence

There are no parentheses buttons; instead, standard math rules apply — multiplication and division first, then addition and subtraction left to right. For example, 2 + 3 × 4 evaluates 3×4=12 first, then adds 2, giving 14 (not 20).

Sample inputs and results
InputOrderResult
2 + 3 × 43×4=12 → 2+1214
10 − 4 ÷ 24÷2=2 → 10−28
50 %50 ÷ 1000.5
7 ÷ 0Division by zeroError
The "6÷2(1+2)" debate and how the percent button differs

Expressions like 6 ÷ 2(1+2) famously produce two different answers, 1 or 9, depending on whether the implicit multiplication before the parenthesis is treated as higher priority than division (giving 6÷6=1) or as equal priority evaluated left to right (giving 3×3=9). This ambiguity comes from notation, not from either answer being wrong.

This calculator doesn't accept parentheses or implicit multiplication, so the ambiguity never arises: multiplication and division share the same precedence and are evaluated strictly left to right using a standard Shunting-yard approach.

The percent button also behaves differently across calculators. Some interpret 100 + 10 % as "add 10% of 100," giving 110. This calculator's % simply divides the currently entered number by 100, so 100 + 10 % converts 10 to 0.1 and adds it to 100, giving 100.1 — not 110.

Is multiplication/division calculated before addition/subtraction?
Yes. This calculator follows the standard mathematical operator precedence: multiplication (×) and division (÷) are computed first, then addition (+) and subtraction (−) left to right. For example, 2 + 3 × 4 evaluates to 14, not 20.
How does the percent (%) button work?
Pressing % converts the currently entered number by dividing it by 100 (a percentage value), not a modulo operation. For example, entering 50 and pressing % gives 0.5.
Can rounding errors occur in results?
Ordinary arithmetic produces no error. However, due to floating-point behavior, repeated calculations with very complex decimals can introduce tiny errors, so results are trimmed to at most 10 significant digits to reduce this.
Why do calculators disagree on "6÷2(1+2)"?
It's a notation ambiguity: treating the implicit multiplication before the parenthesis as higher priority than division gives 1, while treating multiplication and division as equal priority evaluated left to right gives 9. This calculator doesn't accept parentheses or implicit multiplication, so the ambiguity doesn't occur here.
Does "100 + 10 %" give 110 or 100.1?
On this calculator it gives 100.1. The % button only divides the currently entered number by 100, converting 10 to 0.1 before adding it to 100. Some calculators instead interpret it as "add 10% of the base," yielding 110, so check how your calculator's % button behaves.