Calculator and Converter

Binary to decimal converter

Type a binary number and this tool shows its decimal value.

Results

Enter your values to see the result.

About this tool

It ignores spaces, underscores and a 0b prefix, so you can paste numbers as they appear in code. It is useful for learning, programming and electronics.

How it is calculated
each binary digit counts for a power of 2 (the right-hand digit is 1, then 2, 4, 8 …); the digits that are 1 are added up. Spaces, underscores and a 0b prefix are ignored.
Worked example
With Binary number: 11001010, the result is: Decimal: 202.
Good to know
Each binary digit stands for a power of two, starting with 1 on the right, then 2, 4, 8 and so on. The digits that are 1 are added together. Only the digits 0 and 1 are allowed, and the tool works for whole numbers.

Frequently asked questions

How do I convert binary to decimal by hand?

Write the powers of two under each digit from the right, and add up the powers where the digit is 1. For 1101, that is 8 plus 4 plus 1, which is 13.

What does the 0b prefix mean?

It is a marker used in many programming languages to show that a number is written in binary. The tool ignores it.

Related calculators