BIN2DEC function
BIN2DEC converts a binary number to decimal. It is seen in IT, networking and low-level data work, and the input is limited to 10 characters.
Example
Read it as a sentence: turn the binary number 1010 into an ordinary decimal number, which gives 10.
A
B
C
D
1
10
2
3
Syntax
BIN2DEC(number)
-
number(required) - The binary number to convert, given as text or a number. Up to 10 digits.
Returns: The decimal equivalent.
What Excel actually returns
Each formula below was run in desktop Excel. The result is exactly what the cell showed, errors included.
| Formula | Excel shows | Case |
|---|---|---|
=BIN2DEC("1101") | 13 | Typical |
=BIN2DEC("1111111111") | -1 | Negative (two's complement) |
=BIN2DEC(0) | 0 | Zero |
=BIN2DEC("") | 0 | Empty string |
=BIN2DEC({"1","10"}) | 1 | Spill |
=BIN2DEC(1101) | 13 | Number input (not text) |
=BIN2DEC("102") | #NUM! | Invalid digit |
=BIN2DEC("11111111111") | #NUM! | Too long input |
Watch out for
- Input is limited to 10 characters.
- Negative values use two's-complement notation.
Where it works
- Excel
- BIN2DEC is in every version of Excel from 2007 on.
- Google Sheets
- Same name, same behaviour for everyday use.
Part of Engineering functions. Every result on this page was measured in desktop Excel, build 16.0.20527. Last updated .