A calculator shows "Error" when the operation you entered has no valid mathematical result. The most common trigger is dividing by zero, but unbalanced parentheses, a square root of a negative number, and a handful of other edge cases produce the same message. Clearing the display and correcting the expression is all it takes to move on.
The most common causes of a calculator error
Most Error messages come from one of these five situations:
- Division by zero — entering something like
8 ÷ 0has no defined answer in standard arithmetic. The calculator catches this and returns Error rather than an impossible result. - Square root of a negative number —
√(−9)has no real-number solution, so the calculator flags it. (The answer exists in the complex-number system, but a standard calculator only works with real numbers.) - Logarithm of zero or a negative number —
log(0)andlog(−5)are both undefined in real-number math. The calculator returns Error for either. - Unbalanced parentheses — if you open a parenthesis and never close it, the expression is incomplete. The calculator cannot evaluate it and signals the problem with Error.
- Factorial of a negative number —
n!is only defined for non-negative whole numbers. Entering(−3)!produces Error because negative factorials are undefined.
How this calculator handles errors internally
The calculator above evaluates your whole typed expression the moment you press equals. When the result comes back as NaN (Not a Number) or Infinity from the JavaScript engine, the calculator converts both into the single word Error on the display. This means both "impossible operation" and "infinite result" look the same to you — but the fix is the same in either case: clear the display and revise the expression.
Importantly, the Error state does not damage anything. There is no memory of the broken calculation that carries forward; pressing the clear button resets the display to zero and you can start fresh.
How to fix the error and get a valid answer
- Press C or clear the display — this always resets the error state completely.
- Check for a zero in the denominator — if you meant to divide by a very small number rather than zero, retype with the correct value.
- Count your parentheses — every opening
(needs a matching). A quick left-to-right scan usually spots a missing one. - Confirm the number under a square root is positive — if it is not, your formula may need to be reorganized before the root is taken.
- Check the sign before a log or factorial — both require non-negative input; if the value can be negative, consider whether a different function applies to your problem.
Try it: enter1 ÷ 0in the calculator above and press equals — the display shows Error. Press C to clear, retype1 ÷ 0.01, and the calculator returns 100. The operation is valid; only a denominator of exactly zero is off-limits.