BIN2DEC function

Converts a binary number (base 2) represented as a text string to its equivalent decimal (base 10) numeric value.

=BIN2DEC(number)

Generate a BIN2DEC formula

Describe what you need. The generator will reach for BIN2DEC where BIN2DEC is the right tool, and tell you when it is not.

How to get a better answer
  • Name your columns by letter and by header: "column F (Net Value)" beats "the amount column".
  • State every condition, including the negatives — "not cancelled" changes the formula's shape.
  • Say where the data starts if it is not row 1, and whether it will grow.
  • Check the settings above match your spreadsheet: the wrong argument separator is a syntax error on your machine.

Arguments

How BIN2DEC reads its arguments
numberrequiredBIN2DEC
ArgumentRequiredDescription
numberRequiredA text string or cell reference containing only the digits 0 and 1, representing a binary number. Leading zeros are ignored; if empty, non-binary, or containing invalid characters, returns #VALUE!.

Returns

A decimal number representing the conversion of the input binary string.

Availability

Excel: All · Google Sheets: Supported

Worked examples

1. Decode a campaign channel identifier from binary

CampaignChannelBinaryID
Email-PromoEmail101
Social-FallSocial110
=BIN2DEC("101")

Result: 5

The binary code "101" converts to decimal 5, representing the Email channel's internal database ID. By converting the stored binary code to decimal, you can quickly match campaigns to their channel configuration and budget allocations.

2. Get the numeric campaign tier from binary encoding

CampaignChannelSpendBinaryTier
Social-FallSocial1200110
Display-RetargetDisplay8001010
=BIN2DEC("110")

Result: 6

Binary "110" equals decimal 6, indicating tier 6 status. Higher tier campaigns unlock premium analytics, expanded audience targeting, and dedicated support—so converting binary tier codes to decimal lets you quickly segment campaigns by access level.

3. Compare multiple campaign status codes converted to decimal

CampaignChannelClicksStatusCode
Display-RetargetDisplay2001010
Search-BrandSearch8001111
=BIN2DEC("1010"), =BIN2DEC("1111")

Result: 10 and 15

Display-Retarget's binary status "1010" converts to 10 (high performance), while Search-Brand's "1111" converts to 15 (premium status). These decimal values determine access to advanced reporting features, AI optimization, and performance benchmarking.

Common errors

Which BIN2DEC error are you seeing?
BIN2DEC returned an error#VALUE!
Verify the input contains only 0 and 1; remove or replace any invalid characters: =BIN2DEC("1010") instead of =BIN2DEC("1012").
#NUM!
Ensure the binary string is within your platform's bit limit (typically ≤ 53 bits or ≤ 511 decimal), or split the conversion across multiple formulas.
#VALUE!
Provide a valid binary value with at least one digit: =BIN2DEC("1"), =BIN2DEC("0"), or reference a cell containing binary data.
ErrorWhy it happensHow to fix it
#VALUE!The binary string contains a character other than 0 or 1, such as =BIN2DEC("1012") where "2" is not a valid binary digit.Verify the input contains only 0 and 1; remove or replace any invalid characters: =BIN2DEC("1010") instead of =BIN2DEC("1012").
#NUM!The binary number exceeds the system's maximum supported bit length; most implementations allow up to 53 bits, while some platforms limit to 9–10 bits.Ensure the binary string is within your platform's bit limit (typically ≤ 53 bits or ≤ 511 decimal), or split the conversion across multiple formulas.
#VALUE!The input is an empty string or a null reference, such as =BIN2DEC("") or =BIN2DEC(A1) where A1 is blank.Provide a valid binary value with at least one digit: =BIN2DEC("1"), =BIN2DEC("0"), or reference a cell containing binary data.

Tips and when to use something else

  • Use DEC2BIN for the reverse conversion: =DEC2BIN(5) returns "101", the inverse of =BIN2DEC("101"). This is useful for auditing or exporting binary-formatted data.
  • Combine BIN2DEC with bitwise functions like BITAND or BITOR to perform logical operations on the result: =BITAND(BIN2DEC("1100"), BIN2DEC("1010")) returns 8.
  • BIN2DEC is designed for decoding binary-encoded data (status flags, channel IDs, legacy system identifiers). If your data is already in decimal, skip conversion and use it directly.
  • Build dynamic tier or status checks: =IF(BIN2DEC(A2)>10, "Premium", "Standard") converts a binary status code to a tier label for reporting and filtering.

Frequently asked questions

When should I use BIN2DEC instead of just typing the decimal number directly?
Use BIN2DEC when your source data (imported spreadsheets, APIs, external databases) provides values in binary format—such as binary-encoded flags, channel codes, or legacy system identifiers. BIN2DEC lets you decode these for matching, filtering, and reporting.
Does BIN2DEC support negative binary numbers or two's complement?
No, BIN2DEC converts only unsigned binary numbers. For signed integers or two's complement representation, you must handle the sign bit separately or use a custom formula to adjust the result.
What is the maximum binary number BIN2DEC can convert?
Platform-dependent: Google Sheets supports up to 53-bit binary values (9007199254740991 in decimal), while Excel implementations may vary. Values exceeding these limits return #NUM!. Test your platform's limits with large binary strings.
How do I verify my BIN2DEC conversion or convert the result back to binary?
Use DEC2BIN on the result: =DEC2BIN(BIN2DEC("1010")) returns "1010" for verification. This pattern is useful for auditing data pipelines and confirming conversions before export.

Need a different formula?

The full generator is not scoped to one function — describe any spreadsheet problem and it will pick.

Open the formula generator

Reviewed 2026-09-17