Related Function:

The BIN2OCT function converts a binary number to octal.



Note: Hexadecimal (base 16), decimal (base 10), octal (base 8), and binary (base 2) are the most commonly used numeral systems in engineering and computing. Therefore, Excel has provided functions to convert numeric values to and from each of these systems.


Argument Description
number The binary number you want to convert

  Number cannot contain more than 10 characters (10 bits)
  The most significant bit of number is the sign bit
  The remaining 9 bits are magnitude bits
  Negative numbers are represented using two’s-complement notation
[places] Optional. The number of characters to use

  If [places] is omitted, BIN2OCT uses the minimum number of characters necessary
  [places] is useful for padding the return value with leading 0s (zeros)


  A B C
1 Formula Result Notes
2 =BIN2OCT(1111111111) 7777777777 Converts binary 1111111111 to octal
3 =BIN2OCT(1001, 3) 011 Converts binary 1001 to octal with 3 characters
4 =BIN2OCT(10,10) 0000000002 Converts binary 10 to octal with 10 characters

Common Function Error(s)

Problem What went wrong
#VALUE! Occurs if the supplied [places] argument is not recognized as a number
#NUM! Occurs if either:

  the supplied number argument is not recognized as a binary number or contains more than 10 characters
  the resulting octal number requires more places than is specified by the supplied [places] argument
  the supplied [places] argument ≤ 0
#NAME? Occurs when Analysis ToolPak add-in is not enabled