OCT2BIN Function
Converts an octal number to binary.
Category
Engineering
Available in
All versions, Microsoft 365
Returns
Binary text
Overview
OCT2BIN converts a octal number into binary. Octal (base 8) uses the digits 0–7. Binary (base 2) uses only the digits 0 and 1.
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 OCT2BIN reads a 10-character octal value starting with 4–7 as negative.
Syntax
Arguments
| Argument | Required? | What it does |
|---|---|---|
| number | Yes | The octal number to convert, as text or a number — up to 10 characters. |
| places | No | How many characters to show, padding with leading zeros (e.g. 8 turns 101 into 00000101). Ignored for negative numbers. |
Examples
Example 1 — Octal to binary
Each row converts the value in column A.
| A | B | |
|---|---|---|
| 1 | Octal | Binary |
| 2 | 3 | 11 |
| 3 | 7 | 111 |
| 4 | 755 | 111101101 |
| 5 | 7777777000 | 1000000000 |
Example 2 — See the read/write/run switches
Each octal permission digit is three switches: read, write, run. Three places shows all of them.
| A | B | C | |
|---|---|---|---|
| 1 | Digit | rwx | Meaning |
| 2 | 7 | 111 | read, write, run |
| 3 | 5 | 101 | read, run |
| 4 | 4 | 100 | read only |
| 5 | 0 | 000 | no access |
Common mistakes
- #NUM! The text isn't valid octal (for example a 2 in binary), it's longer than 10 characters, the answer doesn't fit in places, or a negative result is too big for the target base.
Notes
- The answer is text, so it keeps leading zeros. Convert back with the matching ...2DEC function before doing maths with it.
- Related functions: BIN2OCT, OCT2DEC, OCT2HEX.

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.