Drunk Calculator: Your Fun Math Buddy

Result will appear here

What this actually does

This is a novelty calculator, not a real one — it deliberately gets arithmetic wrong. After computing the correct result for +, -, ×, or ÷, it adds random noise equal to up to ±10% of that result (calculated as (Math.random() - 0.5) × result × 0.2), then displays the corrupted number instead of the real answer.

Worked example

10 + 5 correctly equals 15. Run it through this calculator and the random offset can push the displayed answer anywhere roughly between 13.5 and 16.5 — for instance "≈ 14.62" or "≈ 15.87" on different clicks, never twice exactly the same. The true answer is always 15; the tool just won't tell you that.

Extra "drunk" behavior

About 30% of the time, the result is also displayed with a random number of decimal places (one to five) instead of the usual two, so you might see something like "≈ 14.6183" rather than "≈ 14.62". Dividing by zero is blocked with a message rather than producing Infinity or NaN.

Because the error is randomized on every click, running the identical inputs twice gives two different answers. That's the joke — and also why this isn't a substitute for an actual calculator.