Category: FUNCTION | Updated: 2026-11-22
How to Use the BIN2DEC Function in Google Sheets | Convert Binary to Decimal
Syntax
=BIN2DEC(signed_binary_number)
- signed_binary_number: Specifies the binary number (a number or string consisting only of
0and1, up to 10 digits) to convert to decimal.
Practical Example with a Table
Here is an example of converting various binary numbers (positive values and 10-digit negative values) to decimal using the BIN2DEC function.
| Input (Binary) | Formula | Result (Decimal) | Description |
|---|---|---|---|
1010 |
=BIN2DEC(A2) |
10 | 8 + 0 + 2 + 0 = 10 |
11111111 |
=BIN2DEC(A3) |
255 | Maximum 8-bit value |
1111111111 |
=BIN2DEC(A4) |
-1 | Negative number in 10-bit two’s complement |
1000000000 |
=BIN2DEC(A5) |
-512 | Minimum convertible negative number |
Common Errors and Notes
- #NUM! Error: Occurs if the argument contains digits other than
0and1, or if you specify a binary number with 11 or more digits. - Leading Zeros Omitted: Entering
0010as a number in a cell causes Google Sheets to auto-format it as10, butBIN2DECcorrectly returns2either way—and also when passed as the string"0010". - Reverse Conversion (Decimal to Binary): To convert a decimal number back to binary, use the
DEC2BINfunction.
Frequently Asked Questions
Q. How many digits of binary can the BIN2DEC function convert?
A. It supports up to 10 digits (10 bits). Specifying a binary number with more than 10 digits results in a "#NUM!" error.
Q. Why does a 10-digit binary number starting with "1" become negative?
A. Because BIN2DEC uses 10-bit "two's complement" notation, any 10-digit value whose most significant bit (10th digit from the right) is 1 is converted as a negative integer (e.g., 1111111111 equals -1).