What is the Binary to Octal Converter?
This tool converts a number written in binary (base 2, using only the digits 0 and 1) into octal (base 8, using digits 0–7). Octal is a compact way to represent binary because every three binary digits correspond to exactly one octal digit. The converter also reports the equivalent decimal (base 10) value so you can double-check the result.
How to use it
Type a binary number such as 101110 into the input box and submit. The calculator validates that every character is a 0 or 1, then returns the octal value, the original binary, and the decimal equivalent. Leading zeros are handled automatically.
The formula explained
Because 2³ = 8, three binary digits encode one octal digit. Starting from the right, split the binary string into groups of three bits, padding the leftmost group with zeros if needed. Convert each group using \(d = 4 \cdot b_2 + 2 \cdot b_1 + b_0\), giving a value from 0 to 7. Concatenate the digits to form the octal number.
$$\text{Octal} = \left( \text{Binary}_2 \right)_{2 \to 8}$$$$\begin{gathered} \text{Octal}_8 = \sum_{i=0}^{k-1} g_i \cdot 8^{\,i} \\[1.5em] \text{where}\quad \left\{ \begin{aligned} \text{Binary} &= b_{n-1}b_{n-2}\cdots b_1 b_0 \;(\text{base }2) \\ g_i &= 4b_{3i+2} + 2b_{3i+1} + b_{3i} \\ k &= \lceil n/3 \rceil \text{ groups of 3 bits} \end{aligned} \right. \end{gathered}$$
Worked example
Take 101110. Split into groups of three from the right: 101 and 110. The first group is \(4 \cdot 1 + 2 \cdot 0 + 1 \cdot 0 = 5\); the second is \(4 \cdot 1 + 2 \cdot 1 + 1 \cdot 0 = 6\). So the octal result is 56. As a check, the decimal value is \(32 + 8 + 4 + 2 = 46\).
Binary-to-Octal Group Conversion Table
Binary-to-octal conversion works because \(8 = 2^3\). Each octal digit corresponds exactly to a group of three binary digits (a triplet). To convert, split the binary number into groups of 3 bits starting from the right, pad the leftmost group with leading zeros if needed, then replace each triplet with the single octal digit below.
| 3-Bit Binary (triplet) | Octal Digit | Decimal Value |
|---|---|---|
| 000 | 0 | 0 |
| 001 | 1 | 1 |
| 010 | 2 | 2 |
| 011 | 3 | 3 |
| 100 | 4 | 4 |
| 101 | 5 | 5 |
| 110 | 6 | 6 |
| 111 | 7 | 7 |
Each triplet is read with place values \(4,\ 2,\ 1\) (that is \(2^2, 2^1, 2^0\)). For example, \(101_2 = 1\times4 + 0\times2 + 1\times1 = 5\), giving the octal digit \(5\).
More Worked Examples
Example 1: \(11_2\) → octal
Group from the right into 3-bit triplets, padding the left with zeros: \(11 \to 011\).
$$011_2 = 0\times4 + 1\times2 + 1\times1 = 3$$
So \(11_2 = \)3\(_8\). Its decimal value is also 3.
Example 2: \(11010110_2\) → octal
Split into triplets from the right; the leftmost group gets a padding zero: \(11\,010\,110 \to 011\,010\,110\).
| Triplet | 011 | 010 | 110 |
|---|---|---|---|
| Octal digit | 3 | 2 | 6 |
Reading the digits left to right gives \(11010110_2 = \)326\(_8\). As a decimal value this binary equals 214.
Example 3: A longer string \(101110011001_2\)
This is 12 bits, already a multiple of 3, so no padding is required. Group from the right:
| Triplet | 101 | 110 | 011 | 001 |
|---|---|---|---|---|
| Octal digit | 5 | 6 | 3 | 1 |
Therefore \(101110011001_2 = \)5631\(_8\). The same value confirmed in base 10 is 2969.
FAQ
Why group in threes? Each octal digit represents exactly three bits because \(8 = 2^3\), making the conversion a clean, lossless regrouping.
What if the digit count isn't a multiple of three? We pad zeros on the left; this does not change the value.
Can I enter a decimal point? This converter handles whole binary integers. Remove any fractional part before converting.