A binary to decimal converter tells you the base-10 value of a number written in base 2. Type any binary number above, with or without a binary point, and you'll get its exact decimal value along with every place value that contributes to it. This guide explains how to convert binary to decimal by hand, a faster method for long numbers, and how fractions and signed numbers work.
Place values: the core idea
Binary is a positional number system, just like decimal. The rightmost digit is the ones place, worth 2⁰ = 1. Moving left, each position is worth twice as much: 2, 4, 8, 16, 32, 64, 128 and so on. To convert binary to decimal, multiply each digit by its place value and add the results. Since every digit is 0 or 1, that simply means adding up the place values wherever there's a 1. For 101010, the 1s sit in the 32, 8 and 2 places, so the value is 32 + 8 + 2 = 42. The place-value boxes in the converter draw this out for you, and the sum underneath shows the total.
A faster way: doubling as you go
For long binary numbers, adding place values means first working out large powers of two. A quicker method reads the bits from left to right. Start at 0. For each bit, double your running total and add the bit. For 1101: start with 1, then 1 × 2 + 1 = 3, then 3 × 2 + 0 = 6, then 6 × 2 + 1 = 13. The answer is 13, and you never had to write down a power of two. This doubling method is also how computers convert binary to decimal internally.
Converting binary fractions to decimal
Positions to the right of the binary point have negative powers of two: 2⁻¹ = 0.5, 2⁻² = 0.25, 2⁻³ = 0.125, 2⁻⁴ = 0.0625 and so on. Add them up the same way. For 1101.101, the whole part is 8 + 4 + 1 = 13 and the fraction is 0.5 + 0.125 = 0.625, giving 13.625. A useful fact: every binary fraction has an exact, finite decimal value, because 2 divides 10. So 0.0001 is exactly 0.0625, and this converter always shows the full decimal value with no rounding. The reverse isn't true, which is why decimal 0.1 can't be written exactly in binary.
Signed binary and two's complement
The same pattern of bits can mean different numbers depending on how it's read. Read as an unsigned number, 11111111 is 255. Read as an 8-bit two's complement number, where the leftmost bit counts as negative, it's −1, and 10000000 is −128. Turn on Two's complement above to read your bits that way: the sign bit is highlighted and its negative place value appears in the sum. In this mode, the number of digits you type sets the width, so 1111 is −1 but 01111 is 15. For fixed widths of 8, 16, 32 or 64 bits, use the two's complement calculator. A binary number written with a minus sign, like -1011, is simply −11.
Powers of two worth remembering
A few values come up again and again when you convert binary to decimal, so they're worth learning:
| Power | Value | Where you'll see it |
|---|---|---|
| 2⁸ | 256 | Values in one byte (0 to 255) |
| 2¹⁰ | 1,024 | One kibibyte |
| 2¹⁶ | 65,536 | Values in 16 bits |
| 2³² | 4,294,967,296 | Values in 32 bits, IPv4 addresses |
A binary number of n ones is always one less than 2ⁿ. For example, 8 ones is 255, and 64 ones is 18,446,744,073,709,551,615, the largest unsigned 64-bit integer. Powers of two are also why storage has binary units: the unit converter shows how a kibibyte (1,024 bytes) differs from a kilobyte (1,000 bytes).
Exact results for long numbers
Ordinary floating-point arithmetic loses precision after about 53 bits, so many converters return a rounded answer for long binary strings. This binary to decimal converter uses arbitrary-precision arithmetic, so a 64-bit, 128-bit or even 500-bit number converts digit for digit. You can paste up to 512 characters, including spaces, underscores and a 0b prefix.
Good to know
- Leading zeros don't change an unsigned value:
00101and101are both 5. - Group long numbers in fours to read them more easily, or convert them with the binary to hex converter for a compact form.
- Go the other way with the decimal to binary converter to check your work.
- If your binary is text rather than a number, use the binary to text converter.
For a quick sanity check, count the digits. A binary number of n digits that starts with 1 is always at least 2ⁿ⁻¹ and less than 2ⁿ, so 8 digits means somewhere from 128 to 255.