Free Online Tool Updated August 2026

Binary to Octal Converter — How to Convert Binary to Octal

Convert binary to octal instantly using our free online calculator, or learn the step-by-step 3-bit grouping method. Includes a complete binary-to-octal table, worked examples with fractional binary numbers, common mistakes, Unix permission examples, and code snippets in Python, JavaScript, C, and Java.

Try it: Binary to Octal Converter

Octal Result: 326
Popular conversions (click to test):

Binary to Octal Conversion Table (3-Bit Grouping)

Every 3-bit binary pattern corresponds to exactly one octal digit (0–7). Use this fundamental 3-bit conversion table as the direct lookup key for all binary-to-octal conversions:

3-Bit Binary Octal Digit (Base 8) Decimal Equivalent Positional Weights (4 + 2 + 1)
000·4 + 0·2 + 0·1 = 0
110·4 + 0·2 + 1·1 = 1
220·4 + 1·2 + 0·1 = 2
330·4 + 1·2 + 1·1 = 3
441·4 + 0·2 + 0·1 = 4
551·4 + 0·2 + 1·1 = 5
661·4 + 1·2 + 0·1 = 6
771·4 + 1·2 + 1·1 = 7

Popular Fast Conversions:

BinaryOctalDecimalUsage
2016octalbin20 reverse
755493Unix rwxr-xr-x
644420Unix rw-r--r--
5242Alternating bits
377255Max 8-bit byte (0xFF)

Why binary-to-octal conversion works.

Octal is base-8 and binary is base-2. The simple conversion comes from one fact: 8 = 2³. Because 8 is exactly the third power of 2, exactly 3 binary digits represent all 8 possible octal values (0–7). No arithmetic is required — just a direct one-to-one group substitution.

Octal → 3-bit binary:
0→0001→0012→0103→011 4→1005→1016→1107→111

How to convert a binary to octal number (Step-by-step).

  1. Write the binary number. Example: 11010110
  2. Group from the right in triplets, padding left as needed:
    11010110 → [011] [010] [110]
  3. Convert each group: 011=3, 010=2, 110=6
  4. Concatenate:326₈

Worked examples.

How to convert a binary fraction to octal.

Converting a binary number with a decimal point (a binary fraction) to octal requires splitting the number into two parts: the integer part and the fractional part. Group the integer part from right-to-left, and group the fractional part from left-to-right. Pad with zeros as necessary.

Common mistakes to avoid.

  • Grouping from left instead of right. Binary 10101 groups as [010][101] = 25₈, not from the left.
  • Forgetting leading zeros. 1010 must pad to [001][010] = 12₈.
  • Wrong side for fraction padding. Fractional trailing zeros go on the RIGHT. .01[010] = .2₈.

Binary to octal in code.

Python
binary_to_octal.py
print(format(int("11010110", 2), 'o'))  # Output: 326
print(format(int("101010", 2), 'o'))    # Output: 52
print(oct(int("11111111", 2))[2:])      # Output: 377
JavaScript
binaryToOctal.js
const toOct = b => parseInt(b, 2).toString(8);
console.log(toOct("11010110")); // "326"
console.log(toOct("101010"));   // "52"
C
binary_to_octal.c
#include <stdio.h>
#include <stdlib.h>
int main() {
    long d = strtol("11010110", NULL, 2);
    printf("%lo\n", d);  // 326
    return 0;
}
Java
BinaryToOctal.java
System.out.println(
  Integer.toOctalString(Integer.parseInt("11010110", 2))
); // "326"

Unix/Linux file permissions (real-world use).

chmodBinaryPermissionsUse Case
111 101 101rwxr-xr-xScripts/executables
110 100 100rw-r--r--Regular files
110 000 000rw-------SSH keys
111 111 111rwxrwxrwxFull access (avoid)

r=4, w=2, x=1. Digit 7 = 4+2+1 = all permissions set (rwx).

Frequently Asked Questions

How do you convert binary to octal?

Group binary bits into sets of three starting from the rightmost digit. Pad the leftmost group with leading zeros if fewer than three bits. Convert each 3-bit group to its octal digit (0–7).

What is the binary to octal conversion with decimal point?

For fractional binary, group the integer part right-to-left and the fractional part left-to-right, each in triplets. Pad with zeros as needed. Example: 11010111.010110 → 327.26₈.

What is the octal value of binary 10101?

Binary 10101 = 25₈. Groups: [010][101] → 2, 5 → 25₈ (decimal 21).

Why do we group bits in threes for octal?

Because 8 = 2³. Three binary digits create 8 unique combinations (000–111) which map exactly to the 8 octal digits (0–7).

Binary → Octal Table

3-BitOctDec
00000
00111
01022
01133
10044
10155
11066
11177

Powers of 2 in Octal

2ⁿDecOct
2⁰11
22
44
810
2⁴1620
2⁵3240
2⁶64100
2⁷128200

Explore Other Popular Converters