Binary calculator
Convert between binary, decimal, hex and octal, or add, subtract, multiply and divide binary.
About this calculator
This binary calculator converts numbers between binary, decimal, hexadecimal and octal, and does arithmetic on binary numbers.
It's handy for programming, networking and computer science homework, and works exactly even with very long numbers.
How it works
Each digit is worth a power of its base: in binary 1011 = 8 + 0 + 2 + 1 = 11. Numbers are converted through whole-number arithmetic, so even very long values stay exact.
Last reviewed:
Worked example
- Work out: Convert a number
- Number is in: Decimal
- Number: 2026
Binary: 11111101010
Common questions
How do I convert decimal to binary?
Divide by 2 repeatedly and write down the remainders from last to first. 13 gives remainders 1, 0, 1, 1, so 13 is 1101 in binary.
What is hexadecimal used for?
Hex, base 16, writes long binary numbers compactly: each hex digit stands for four bits. It's used for colours, memory addresses and file data.
Why do computers use binary?
Electronic circuits are most reliable with two states, on and off, which map neatly to 1 and 0.
The story behind it
Where the idea came from: Gottfried Wilhelm Leibniz described the binary number system in 1703. Today every computer works in it.
Leibniz was fascinated that all numbers could be written with just 0 and 1. More than two centuries later, Claude Shannon showed that electrical switches could do binary logic, which led directly to digital computers.
Why you can trust this calculator
- It runs in your browser. Nothing you type into it is sent anywhere.
- The method is explained on this page, so you can check it yourself.
- Free to use, with no sign-up.
- Results are estimates, so please double-check anything important.
- Spotted a mistake? Tell us and we'll look into it.

After 15 years as a mathematics educator, I built CalculStore to give students, teachers, professionals and anyone working with numbers simple, reliable tools.
Meet the founder
