Scientific Calculator
A web calculator supporting the four basic operations, parentheses, square roots, squares, percentages, and pi. Use it by clicking buttons or typing on your keyboard.
About This Tool
This is a button-style calculator that runs right in your browser — no app installation required. In addition to basic arithmetic, it supports:
- Parentheses: freely combine operator precedence, e.g. (2 + 3) × 4 = 20.
- Square root (√): enter √9 to get 3, or use it inside expressions like √(2 + 7).
- Square (x²): square the current value with one click.
- Percentage (%): 50% means 0.5, e.g. 200 × 25% = 50.
- Pi (π): participates in calculations accurate to 15 significant digits.
- Keyboard support: number keys, + − * /, parentheses, Enter (=), and Backspace (⌫) all work directly.
The calculation engine is built on a recursive descent parser, supporting unary minus, correct operator precedence, and nested parentheses. Results are output with 12 significant digits, avoiding floating-point artifacts like 0.1 + 0.2 = 0.30000000000000004.
How to Use
- Enter an expression by clicking buttons, or type it directly on your keyboard (on desktop).
- Press "=" or Enter to calculate; press "C" to clear, or "⌫" to delete the last character.
- If the input is incomplete or the expression is invalid, an "Error" message is shown — you can keep editing and recalculate.
FAQ
Does it support trigonometric or logarithmic functions?
This calculator targets everyday use and currently supports the four basic operations, parentheses, square roots, squares, percentages, and pi. For advanced functions like sin, cos, or log, use the dedicated calculator built into your system.
How does the percentage work in calculations?
"%" means divide by 100. For example, 200 × 25% equals 200 × 0.25 = 50; entering 50% alone evaluates to 0.5.
What happens when dividing by 0?
Division by zero is mathematically undefined, and the calculator shows "Error". Check your expression and avoid a zero denominator.
How precise are the results?
Results are rounded to 12 significant digits. That covers everyday precision needs while avoiding binary floating-point display artifacts.
Can I use a keyboard on mobile?
Mobile devices have no physical keyboard — just tap the on-screen buttons. The interface is optimized for mobile, so you can input with one hand.