What this calculator does
This is a simple two-operand arithmetic calculator. Enter a first number, pick an operation (add, subtract, multiply or divide), enter a second number, and you get the answer. Both operands accept integers, decimals, negative values and scientific notation such as -3.5e2 or 4.7E-9. You can optionally round the answer to a fixed number of decimal places or to the nearest ten, hundred or thousand.
How to use it
Type Operand 1, choose the Operator, type Operand 2, and select a Rounding option. Leave Rounding on "Do Not Round" to see the full-precision result. Division by zero is not allowed and returns an "undefined" message instead of infinity.
The formula explained
Let a = Operand 1 and b = Operand 2. The raw result is \(a + b\), \(a - b\), \(a \times b\), or \(a / b\) depending on the operator. If a rounding exponent d is chosen, the answer becomes $$\text{round}(\text{result} \times 10^{d}) / 10^{d}$$ using round-half-up. A positive d keeps that many decimal places; \(d = 0\) gives the nearest whole number; and negative values of d (\(-1\), \(-2\), \(-3\)) round to the nearest 10, 100 or 1000.
Worked example
Compute 45.678 multiplied by 3, rounded to 2 decimals. Raw result = 137.034. With \(d = 2\), factor = 100, so $$\text{round}(137.034 \times 100) / 100 = \text{round}(13703.4) / 100 = 13703 / 100 = \mathbf{137.03}$$
FAQ
Can I enter negative numbers? Yes, just include a leading minus sign, for example -12.5.
What about very large or very small numbers? Use scientific notation like 6.02e23 or 1.6E-19; both operands support it.
Why use rounding? Floating-point math can produce tiny representation errors (e.g. 0.1 + 0.2). Rounding to a fixed number of places cleans up the display.