BIN2DEC Function

Converts a binary number to decimal.

Category

Engineering

Available in

All versions, Microsoft 365

Returns

A number

Want to practice BIN2DEC in a real spreadsheet? Open a blank sheet in our Practice Sandbox and try it with live data, with the AI Excel tutor beside you. No Excel needed — just a free account.Try it free in the Sandbox

Overview

BIN2DEC converts a binary number into decimal. Binary (base 2) uses only the digits 0 and 1. Decimal (base 10) is the everyday number system.

Negative numbers use a fixed 10-character form called two's complement: the first digit acts as the minus sign. For example −1 is 1111111111 in binary, 7777777777 in octal and FFFFFFFFFF in hex. So BIN2DEC reads a 10-character binary value starting with 1 as negative.

Syntax

=BIN2DEC(number) Explain

Arguments

ArgumentRequired?What it does
numberYesThe binary number to convert, as text or a number — up to 10 characters.

Examples

Example 1 — Binary to decimal

Each row converts the value in column A.

B2fx=BIN2DEC(A2)
AB
1BinaryDecimal
2110113
311111111255
41111111111-1
51000000000-512
=BIN2DEC(A2) Explain

Example 2 — Add up flags typed as binary

Convert first, then do the maths — binary text can't be summed directly.

=BIN2DEC(A2)+BIN2DEC(A3) Explain

With 0101 in A2 and 0010 in A3, the answer is 7 (5 + 2).

Common mistakes

  • #NUM! The text isn't valid binary (for example a 2 in binary), it's longer than 10 characters.
  • Ten digits starting with 1. A full 10-digit value whose first digit is 1 is negative: 1111111111 is −1, not 1,023. Use nine digits or fewer for positive numbers.

Notes

  • The answer is a real number you can calculate with.
  • Related functions: DEC2BIN, BIN2HEX, BIN2OCT, DECIMAL.
Kyle Stott

Author

Kyle Stott

Certified Microsoft Excel Expert

Kyle has worked professionally with Microsoft Excel for over a decade and has consulted on and taught Excel best practices to over 400 companies across 30+ countries.