Basic Calculator

A free, accurate calculator for everyday arithmetic. Add, subtract, multiply, and divide with full decimal precision — no floating-point surprises. Keyboard shortcuts supported.

0

Keyboard supported · Esc to clear · / for ÷ · * for ×

How to Use This Calculator

This calculator works just like a standard handheld calculator. You can use either the on-screen buttons or your physical keyboard.

  1. Enter a number using the digit buttons or number keys on your keyboard.
  2. Select an operator — +, −, ×, or ÷. The active operator is highlighted so you always know what's pending.
  3. Enter the second number and press = (or Enter) to see the result.
  4. Chain calculations by pressing another operator immediately after a result — no need to press AC between steps.
  5. Use AC to clear everything, the backspace button to delete the last digit, or +/− to negate the current number.

Precision & How It Works

Standard JavaScript uses 64-bit floating-point numbers (IEEE 754), which can produce surprising results like 0.1 + 0.2 = 0.30000000000000004. This calculator avoids that entirely by using Decimal.js, an arbitrary-precision decimal library, for every single computation.

Addition

a + b

e.g. 0.1 + 0.2 = 0.3

Subtraction

a − b

e.g. 1 − 0.9 = 0.1

Multiplication

a × b

e.g. 0.1 × 3 = 0.3

Division

a ÷ b

e.g. 1 ÷ 3 = 0.333…

Results are displayed to up to 12 significant digits. Division by zero displays “Error” — press AC to reset.

Frequently Asked Questions

Related Calculators