Binary to Octal Converter

Convert a binary number to octal and an octal number back to binary.

Supports binary and octal integers of any length with full working precision.

Updated August 12, 2026
Frank Zhao - Creator
CreatorFrank Zhao
Loading calculator…

Introduction / overview

The Binary to Octal Converter switches a whole number between base 2 and base 8. Type a binary value such as 111101111101 and you immediately get its octal form 75875_8; flip the mode and the same tool reads an octal value such as 7158715_8 back into binary 111001101111001101.

One tool, two directions: “binary to octal” is the default, and the “octal to binary” mode runs the conversion the other way. Both result fields are read-only — the answer always follows from whatever you type.

This is the tool to reach for when you are studying number systems, decoding an octal value from documentation or a permission code, or checking a base-8 representation by hand. Because every three binary bits collapse into a single octal digit, the calculator also shows the binary grouped in fours and its bit width, so long values stay easy to read and copy.

How to use / quick start

1

Keep “binary to octal” selected

This is the default option under Convert…, so you can usually skip this step.

2

Type the binary number

In the Binary input field, enter a string made only of 0s and 1s. Leading zeros are fine but not required — the tool works with the value, not the number of digits you typed.

3

Read the octal result

The Results panel shows the Octal representation — the same value written in base 8. Each place now stands for a power of 8 rather than 2.

4

Convert the other way when needed

Choose octal to binary, type an octal value such as 7158715_8, and the Results panel returns the binary form plus its bit width and a 4-bit grouped readout.

Example — convert 11001 to octal

Type 1100111001 in the Binary input field. The tool splits the bits into triads from the right, padding the leftmost group, then maps each triad:

11001211001_2  \ \to\ 011 001011\ 001  \ \to\ 3 13\ 1  \ \to\ 31831_8

The Results panel reads Octal representation: 31. Since 110012=2511001_2 = 25 and 318=2531_8 = 25, the two strings are the same value written in different bases.

Calculation method

Binary to octal — triads of three bits

Binary to octal is a place-value conversion. Starting from the right, the binary digits are split into groups of three bits (triads); if the leftmost group has fewer than three bits, it is padded with leading zeros so every group lines up. Each triad is a value from 0 to 7, which is exactly one octal digit.

ok=4b3k+2+2b3k+1+b3k,O=k=0m1ok8ko_k = 4 b_{3k+2} + 2 b_{3k+1} + b_{3k}, \qquad O = \sum_{k=0}^{m-1} o_k \cdot 8^{k}

Because three bits always make exactly one octal digit — 0002=08000_2 = 0_8, 1112=78111_2 = 7_8 — the conversion never needs rounding and never drops digits, no matter how long the number is.

Octal to binary — digit expansion

Going the other way, each octal digit expands back into its own three-bit pattern, and the patterns are joined in order:

b3k+2b3k+1b3k=bin3(ok)b_{3k+2}\, b_{3k+1}\, b_{3k} = \mathrm{bin}_3(o_k)

For 7158715_8, each digit maps to its triad:

71117 \to 111\quad10011 \to 001\quad51015 \to 101  \ \Rightarrow\ 111001101111001101

Variables

  • OO — the octal value
  • mm — the number of triads (octal digits)
  • oko_k — the kk-th octal digit (0–7)
  • bib_i — the bit at position ii (0 or 1)

Frequently asked questions

Why does “Number of bits” say 8-bit when my binary input only has six digits?

Because the grouped display pads the binary value to the next multiple of four so every group is complete. 111101111101 has six bits, so it is shown as the 8-bit form 0011 11010011\ 1101. The leading zeros do not change the value — they only make the readout line up.

Why is “Binary (grouped)” in groups of four instead of three?

The conversion to octal itself works in triads of three bits. The grouped row is a separate convenience that spaces the binary in fours — the nibble style used with hexadecimal — because that is the most common way to format long binary values for copying. Both are just ways of writing the same number.

Can I convert negative numbers or fractions?

No — this tool converts non-negative whole numbers only. The Binary input accepts only 0 and 1, and the Octal input accepts only 0–7, so a minus sign, decimal point, or any other character shows the input error message and is not converted. For negative or fixed-width binary, use the binary converter.

Limitations

This calculator accepts non-negative whole numbers only: the Binary input takes the digits 0 and 1, and the Octal input takes 0–7. A minus sign, decimal point, or any other character produces a clear error message — “Input is not a binary number…” or “Input is not an octal number…” — and the value is not converted. There is no fixed bit-width cap, and because the conversion is an exact integer operation the result is never rounded; the grouped and bit-width helpers simply add the leading zeros needed to align the display.

Binary to Octal Converter - Convert Between Base-2 and Base-8