Hex Calculator
Hex arithmetic with decimal, binary and octal output.
Arithmetic on binary numbers, with every base shown.
Only 0 and 1.
Only 0 and 1.
| Measure | Value |
|---|
Binary Calculator performs the four basic operations on binary numbers and reports the answer in binary, decimal, hexadecimal and octal at once. The working panel shows the same sum in decimal, which is the quickest way to check a hand calculation: if the decimal arithmetic is right and the conversion is right, the binary answer follows.
Division is integer division, giving a quotient and a remainder rather than a binary fraction. That matches how a processor divides and how most programming languages behave for integers, and the exact decimal value is shown beside it so nothing is lost. Subtraction refuses a negative result, because plain unsigned binary cannot represent one -- that needs two's complement and a fixed register width, which is a different question.
Hexadecimal is shown because it is how binary is written down in practice. Each hex digit is exactly four bits, so 10110 becomes 0x16 and the mapping is mechanical. Anyone reading a memory dump, a colour code or a permissions mask is reading hex that stands for binary.
The page shows its working, not just its answer. Where there is a formula it is printed with your own numbers substituted in, so you can check the result rather than take it on trust -- which is the difference between a calculator you can use for something that matters and one you cannot.
Everything runs inside your browser. What you type is never uploaded, never logged and never stored, and the calculator keeps working if your connection drops after the page has loaded.
The binary calculator is used by writers, developers, students, marketers and anyone else who needs the job done once without installing software. Common cases include:
Not directly. Unsigned binary has no sign, so a negative result is refused. Use two's complement with a fixed width for signed arithmetic.
Because that is how integer division works in hardware and in most languages. The exact decimal value is listed in the table as well.
Up to 52 per number, which is the limit of exact integer arithmetic in JavaScript. Beyond that the result could be silently wrong, so it is refused.
0x marks hexadecimal and 0o marks octal, the conventional prefixes in most programming languages.
If the binary calculator is not quite what you need, these other free tools solve closely related problems, and there are 11 more in tech calculators.
Hex arithmetic with decimal, binary and octal output.
Bitwise operations with the bit patterns displayed.
Convert a number between binary, octal, decimal, hex and custom bases.
Bytes to KB, MB, GB and the KiB/MiB/GiB family.
Convert text to binary or hex byte values, and convert them back to text.
Checked and rebuilt on 2026-10-14. The method this calculator uses is described in the section above, and corrections go through the contact page.