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.
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.
- Enter a number using the digit buttons or number keys on your keyboard.
- Select an operator — +, −, ×, or ÷. The active operator is highlighted so you always know what's pending.
- Enter the second number and press = (or Enter) to see the result.
- Chain calculations by pressing another operator immediately after a result — no need to press AC between steps.
- 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 + be.g. 0.1 + 0.2 = 0.3
Subtraction
a − be.g. 1 − 0.9 = 0.1
Multiplication
a × be.g. 0.1 × 3 = 0.3
Division
a ÷ be.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
Yes. This calculator uses Decimal.js, an arbitrary-precision library, to eliminate JavaScript floating-point errors. For example, 0.1 + 0.2 correctly returns 0.3, not 0.30000000000000004.
Yes. All number keys (0–9), operators (+, -, *, /), Enter or = for equals, Backspace to delete, Escape to clear, % for percent, and the decimal point (.) are fully supported via keyboard.
The % button divides the current displayed number by 100, converting it to its decimal equivalent (e.g., 75 becomes 0.75). This is useful for quickly computing percentages.
If you attempt to divide by zero, the calculator displays "Error". Press AC (All Clear) to reset and start a new calculation.
Yes. You can chain operations without pressing equals in between. For example: 5 + 3 × 2 will first evaluate 5 + 3 = 8, then 8 × 2 = 16. This calculator evaluates left to right in the order operations are entered.
Related Calculators
Interest Calculator
Calculate simple and compound interest with year-by-year breakdown.
Mortgage Calculator
Estimate your monthly mortgage payment and full amortization schedule.
Car Loan Calculator
Estimate your monthly auto loan payment with APR and amortization.