Binary to Decimal Converter
Type a binary number to get its decimal value, with every step shown.
- Free
- Shows working
- Fractions & signed
- Up to 64 bits
To convert binary to decimal, type your number in the box above. It works as a binary to number converter for whole numbers, fractions and signed values, and as a binary to decimal calculator that shows each step, so you can check your own work. Below: two ways to do it by hand, worked examples, a 0–32 chart, fractions, signed numbers, code and five practice questions. New to the topic? Start with binary numbers. To go the other way, use decimal to binary. Reading letters, not numbers? That’s binary to ASCII.
How to convert binary to decimal
To convert binary to decimal, write the place values 1, 2, 4, 8 and so on under the digits, starting from the right. Add the place values that sit under a 1. For example, 1011 has a 1 under 8, 2 and 1, so 8 + 2 + 1 = 11.
Three steps, and they work for any whole binary number:
- Write the place values under each digit. The rightmost digit is worth 1, and each step to the left doubles it: 1, 2, 4, 8, 16, 32.
- Keep the values under a 1. Ignore the ones under a 0.
- Add them up.
Why start at 1 on the right? That digit is 2⁰, and 2⁰ is 1. Every step left multiplies the weight by 2, the same way each step left in a decimal number multiplies it by 10. A 0 contributes nothing, so it only holds its place.
Method 1, place values: 101101 = 45
Here’s 101101 laid out.
| Digit | 1 | 0 | 1 | 1 | 0 | 1 |
|---|---|---|---|---|---|---|
| Place value | 32 | 16 | 8 | 4 | 2 | 1 |
| Digit × value | 32 | 0 | 8 | 4 | 0 | 1 |
Add the last row: 32 + 8 + 4 + 1 = 45. As a formula, the decimal value is the sum of each digit times 2ⁿ, where n counts from 0 at the right. That’s all the formula there is.
Method 2, doubling: 10001 = 17
Doubling skips the table. Go left to right. Double your running total, then add the next digit.
For 10001: start with 1. Double it and add 0 to get 2. Double and add 0 to get 4. Double and add 0 to get 8. Double and add 1 to get 17.
Run the same trick on 101101 and the totals go 1, 2, 5, 11, 22, 45. Same answer as the table, so the two methods agree. Place values show why it works. Doubling is quicker for a long number, and it’s how most code does it.
More worked examples
- 101 = 5. 4 + 1, with nothing under the 2.
- 1111 = 15. 8 + 4 + 2 + 1. It’s the biggest value that fits in 4 bits.
- 11001011 = 203. 128 + 64 + 8 + 2 + 1.
- 10110 = 22. 16 + 4 + 2.
Binary numbers in textbooks often carry a small 2 after them, like 01011101₂. That’s the base, not a digit. It equals 93.
Binary to decimal chart: 0 to 32
Small numbers come up constantly, so here’s the whole run from 0 to 32. The binary number gains a digit every time you pass a power of 2.
| Binary | Decimal |
|---|---|
| 0 | 0 |
| 1 | 1 |
| 10 | 2 |
| 11 | 3 |
| 100 | 4 |
| 101 | 5 |
| 110 | 6 |
| 111 | 7 |
| 1000 | 8 |
| 1001 | 9 |
| 1010 | 10 |
| 1011 | 11 |
| 1100 | 12 |
| 1101 | 13 |
| 1110 | 14 |
| 1111 | 15 |
| 10000 | 16 |
| 10001 | 17 |
| 10010 | 18 |
| 10011 | 19 |
| 10100 | 20 |
| 10101 | 21 |
| 10110 | 22 |
| 10111 | 23 |
| 11000 | 24 |
| 11001 | 25 |
| 11010 | 26 |
| 11011 | 27 |
| 11100 | 28 |
| 11101 | 29 |
| 11110 | 30 |
| 11111 | 31 |
| 100000 | 32 |
Binary to decimal chart, 0–32. A few bigger ones: 1000000 is 64, 10000000 is 128 and 11111111 is 255. The rule for size: n bits hold the values 0 to 2ⁿ − 1. That’s 255 for 8 bits, 65,535 for 16 bits and 4,294,967,295 for 32 bits.
For every value from 0 to 255 with hex and octal beside it, see the binary numbers chart.
Numbers people look up most
Tap a number to open it in the converter.
Binary fractions to decimal
Digits after the binary point work the same way, but the place values shrink instead of grow. The first digit after the point is worth ½ (0.5), the next ¼ (0.25), then ⅛ (0.125), halving each time.
Take 101.011. The whole part, 101, is 4 + 1 = 5. The digits after the point are 0, 1, 1, so they add 0 + 0.25 + 0.125 = 0.375. Together that’s 5.375.
One more: 1101.101 is 8 + 4 + 1 for the 13, plus 0.5 + 0.125 for the .101, which makes 13.625. A number with a point in a fixed place like this is called fixed-point.
Signed binary: why 11111011 can mean 251 or −5
The same bits can mean two things, and that trips people up. Read 11111011 as an ordinary unsigned number and it’s 251. Read it as an 8-bit signed number in two’s complement and it’s −5.
In two’s complement the leftmost bit counts as negative. In 8 bits that’s −128, so 11111011 is −128 + 64 + 32 + 16 + 8 + 2 + 1 = −5. Flip the bits (00000100), add 1 and you get 5, then put the minus sign in front. A leading 1 only means “negative” when you’re reading the number as signed.
Switch the converter to Signed and it does this for you.
Common mistakes
- Starting the powers at 1. In 101, the right digit is 2⁰ = 1, not 2. Read it as 4 + 2 + 1 and you get 7. The answer is 4 + 0 + 1 = 5.
- Reversing the place values. The biggest value goes under the leftmost digit. Put 1 there instead and 1011 reads as 1 + 0 + 4 + 8 = 13, not 11.
- Treating a leading 1 as a minus sign. It’s only negative in signed mode. 11111011 is 251 unless you say otherwise.
- Typing a digit other than 0 or 1. 10201 isn’t binary. The converter tells you which character it tripped on and where.
Binary to decimal in Python, JavaScript and Excel
Every language has a built-in. Pass the base, 2, and you’re done. Here is what each one returns.
| Language | Code | Result |
|---|---|---|
| Python | int('101101', 2) | 45 |
| Python | int('0b101101', 0) | 45 |
| JavaScript | parseInt('101101', 2) | 45 |
| JavaScript | Number('0b101101') | 45 |
| JavaScript, 64 bits | BigInt('0b' + '1'.repeat(64)) | 18446744073709551615 |
| Excel | =BIN2DEC("1100100") | 100 |
Three gotchas. parseInt('0b101101', 2) returns 0, because it stops at the letter b, so strip the prefix or use Number(). parseInt is only exact up to 2⁵³ − 1 (53 ones, 9007199254740991) and rounds after that. 64 ones comes out as 18446744073709552000, not 18446744073709551615. Use BigInt for anything big. And Excel’s BIN2DEC takes at most 10 digits and treats the first as a sign bit, so =BIN2DEC(1111111111) returns −1, not 1023.
Practice: 5 questions
Work these out by hand, then check against the answers. The converter above shows the steps for any of them.
- 1010
Check
10 (8 + 2) - 1111
Check
15 (8 + 4 + 2 + 1) - 10001
Check
17 (16 + 1) - 11001011
Check
203 (128 + 64 + 8 + 2 + 1) - 101.011
Check
5.375 (4 + 1 + 0.25 + 0.125)
Frequently asked questions
How do you convert binary to decimal?
Write place values 1, 2, 4, 8 and so on from the right, then add the ones under a 1. For 1011 that’s 8 + 2 + 1, which is 11.
What is the doubling method?
Go left to right. Double your total, then add the next digit. For 10001 the totals run 1, 2, 4, 8, 17.
How do you convert a binary fraction to decimal?
After the point, the place values are ½, ¼, ⅛ and so on. Add the ones under a 1. 101.011 is 5 + 0.25 + 0.125, which is 5.375.
What is 1111 in decimal?
15, from 8 + 4 + 2 + 1. It’s the biggest value that fits in 4 bits.
How do I read a binary number that starts with 1 in signed form?
In two’s complement the leading 1 counts as a negative place value. In 8 bits, 11111011 is −5. Read as unsigned, the same bits are 251.
Why does the first digit on the right count as 1?
It’s 2⁰, which is 1. Each step to the left doubles the weight.
How big can a binary number get?
n bits reach 2ⁿ − 1. That’s 255 for 8 bits, 65,535 for 16 bits and 4,294,967,295 for 32 bits.
Why does my spreadsheet give a negative answer?
Excel’s BIN2DEC allows 10 digits and treats the first as a sign bit. So 1111111111 gives −1, and 1000000000 gives −512.
Last checked: 20 November 2026. Every example on this page is generated and checked with a script.
Sources: Python docs: int() · MDN: parseInt · MDN: BigInt · Microsoft Support: BIN2DEC · Knuth, The Art of Computer Programming, Vol. 2, §4.1
