Practice free

BIN2OCT function

BIN2OCT converts a binary number to octal. 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 octal, which gives 12.

Practice this in the app

Syntax

BIN2OCT(number, [places])

Arguments in [square brackets] are optional.

number (required)
The binary number to convert, given as text or a number. Up to 10 digits.
places (optional)
Minimum number of characters in the result; pads with leading zeros.

Returns: The octal equivalent.

What Excel actually returns

Each formula below was run in desktop Excel. The result is exactly what the cell showed, errors included.

FormulaExcel showsCase
=BIN2OCT("1101") 15 Typical
=BIN2OCT("1111111111") 7777777777 Negative (two's complement)
=BIN2OCT(0) 0 Zero
=BIN2OCT("") 0 Empty string
=BIN2OCT({"1","10"}) 1 Spill
=BIN2OCT(1101) 15 Number input (not text)
=BIN2OCT("102") #NUM! Invalid digit
=BIN2OCT("11111111111") #NUM! Too long input

Watch out for

  • Input is limited to 10 characters.
  • Result is text, not a number.

Where it works

Excel
BIN2OCT 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 .