Lelifi·tools

Decimal to Octal Converter

Divide 156 by 8 until the quotient reaches zero, write the remainders in reverse, and 156 in decimal comes out as 234 in octal. The converter shows each division step, runs the reverse expansion as a check, and converts fractional parts by repeated multiplication by 8.

Type a decimal number to get its octal form, with every division step shown so you can follow the ladder instead of trusting a black box.

By the Lelifi editors ·

Key takeaways

Each octal digit carries its own place valueReading 234 in octal back as a decimal number234x 64x 8x 1128244add the products128 + 24 + 4 = 156so 234 in octal and 156 in decimal name the same quantity
Each octal digit multiplies its place value, and the products add back to the decimal number.
The division ladder for 156Divide by 8 until the quotient reaches 0, then read the remainders upward156 ÷ 8 = 1919 ÷ 8 = 22 ÷ 8 = 0432last quotient 19, remainder 4quotient 2, remainder 3quotient 0, remainder 2, stopremainders bottom to top: 2, 3, 4, which gives 234 in octal
The division ladder for 156: divide by 8, keep the remainders, read them upward.
On this page
  1. How to convert decimal to octal by hand
  2. Decimal to octal chart and place values
  3. Reading octal back as decimal
  4. Converting decimal fractions to octal
  5. Where octal shows up today
  6. The binary shortcut: three bits per digit
  7. Octal compared with hexadecimal
  8. Common mistakes and quick checks

How to convert decimal to octal by hand

Octal is base 8, so it has eight digits: 0, 1, 2, 3, 4, 5, 6 and 7. Converting a decimal number means asking, over and over, how many groups of 8 fit and what is left over. Divide the number by 8, write down the remainder, then divide the quotient by 8 again. Stop when the quotient reaches 0 and read the remainders from bottom to top.

Take 156. Dividing by 8 gives 19 with a remainder of 4, then 19 divided by 8 gives 2 with a remainder of 3, then 2 divided by 8 gives 0 with a remainder of 2:

DivisionQuotientRemainder
156 ÷ 8194
19 ÷ 823
2 ÷ 802

Read the remainder column upward and 156 in decimal comes out as 234 in octal. The check is to expand the digits back: 2 x 64 + 3 x 8 + 4 = 156. One more quick example: 100 divides by 8 to give 12 remainder 4, then 12 divides to 1 remainder 4, then 1 divides to 0 remainder 1, which reads upward as 144.

The calculator above runs this ladder for any number you type and shows every division step, so you can compare your handiwork line by line.

Decimal to octal chart and place values

Every position in an octal number is worth a power of 8, counting from the right:

Position (from right)Power of 8Value
1st8 ^ 01
2nd8 ^ 18
3rd8 ^ 264
4th8 ^ 3512
5th8 ^ 44096

With those place values in hand, the small numbers become a lookup instead of a calculation. Digits 0 through 7 stay the same in both bases; from 8 upward the octal reading jumps ahead:

DecimalOctalDecimalOctal
002024
8103240
9115062
101264100
1214100144
1517156234
1620255377
17215121000

The jumps look odd at first: 8 decimal is already "10" in octal, and 64 decimal is "100". That is the same thing that happens when a decimal odometer rolls over at 9, except this one rolls over at 7.

Reading octal back as decimal

Running the conversion in reverse needs no division at all. Multiply each octal digit by its place value and add the products. Reading 234 in octal: the 2 sits in the 64s place, the 3 in the 8s place and the 4 in the 1s place, so the value is 2 x 64 + 3 x 8 + 4 = 156.

The same expansion checks bigger numbers. Read 1750 in octal as 1 x 512 + 7 x 64 + 5 x 8 + 0 = 1000, which confirms the chart entry above. Read 377 in octal as 3 x 64 + 7 x 8 + 7 = 255, the largest value three octal digits can hold, in the same way that 999 is the largest three decimal digits can hold.

Spot-check digits as you go: if any digit you wrote down is an 8 or a 9, the conversion went wrong somewhere, because those digits do not exist in base 8. That one rule catches most slips instantly, and it is also why certain real-world codes, covered below, never contain an 8 or a 9.

Converting decimal fractions to octal

Whole numbers divide by 8; fractional parts multiply by 8 instead. Multiply the fraction by 8, write down the whole-number part of the result as the next octal digit, then repeat with whatever fraction remains.

Take 0.25. Multiplying by 8 gives exactly 2, so 0.25 in decimal is 0.2 in octal, and the process ends because nothing remains. Take 0.75: 0.75 x 8 = 6, so the octal form is 0.6, again terminating after one digit.

Most fractions do not end so neatly. Converting 0.1 gives the digits 0, 6, 3, 1, 4 and then the same block repeats: 0.06314631... in octal. Just as 1/3 becomes the repeating decimal 0.333..., a decimal fraction that terminates in base 10 can repeat forever in base 8. Converters handle this by rounding after several digits, which is why two tools may show slightly different trailing digits for the same input.

When a number has both parts, convert each side separately: 156.25 in decimal is 234.2 in octal, built from the ladder for 156 and the single digit for 0.25.

Where octal shows up today

Octal survives in a handful of places where grouping bits in threes is natural, and the digit rule (no 8s, no 9s) is the tell that a number is octal:

UseExampleWhat it means
Unix file permissionschmod 7557 = read, write, execute for the owner; 5 = read and execute for group and others
Aviation transponder codessquawk 7700Four octal digits give 4096 possible codes; 7700 signals an emergency
C language literalsint x = 010;A leading zero makes the literal octal, so x holds 8, not 10
Retro computingPDP-8 word size12-bit words split into four octal digits with nothing left over

The permission connection is the one most people meet first. Each digit of a chmod mode is three bits, one bit each for read, write and execute, and three bits make exactly one octal digit: 4 for read, 2 for write, 1 for execute, added together. That is why modes like 644 (owner read and write, others read) and 600 (owner only) are written in octal, and why the chmod manual documents the numeric modes in base 8.

Transponder codes work the same way from the other end: a controller who assigns "squawk 4573" is reading four octal digits, which is why you will never hear an 8 or a 9 in a code assignment.

The binary shortcut: three bits per digit

Because 8 is 2 cubed, every octal digit corresponds to exactly three binary digits. That gives a second route from decimal to octal: convert to binary first, then slice the bits into groups of three from the right and translate each group by eye.

The number 156 in binary is 10011100. Pad it on the left to a multiple of three bits, which gives 010 011 100, and each group reads as an octal digit: 2, 3, 4. Same answer as the division ladder, reached without any division at all.

Binary groupOctal digit
0000
0011
0102
0113
1004
1015
1106
1117

The shortcut cuts both ways, and it is the fastest method whenever one of the two bases is already in hand. Our binary to octal converter shows the grouping step in detail if you are starting from bits rather than from decimal.

Octal compared with hexadecimal

Hexadecimal is the other base that computer people keep around, and the two fill different niches. Hex groups bits in fours, so one byte, which is 8 bits, becomes exactly two hex digits. Octal groups bits in threes, which lines up with 12-bit and 36-bit machine words from older architectures and with the 9-bit read-write-execute permission triad, but a byte needs up to three octal digits and the top digit can only reach 3.

That is why hex took over most of computing: bytes are the unit modern machines trade in, and two hex digits describe one byte with no padding. Both bases are built into the tools you already use, from the parseInt radix argument in JavaScript to the base-aware int() constructor documented for Python. Octal kept the domains where threes fit better, notably Unix permissions and a few hardware and aviation conventions.

The two bases do agree on one thing: any octal digit expands to a clean binary group, and so does any hex digit, so converting between octal and hex through binary takes seconds. For instance, 64 in decimal is 100 in octal and 40 in hex, and both spellings unpack to the same six bits, 1000000.

Common mistakes and quick checks

Decimal to octal conversion goes wrong in a few predictable ways. Each has a fast fix:

The one-check-fits-all move is to expand your answer back: multiply each digit by its place value, add the products, and confirm you land on the number you started with. If 2 x 64 + 3 x 8 + 4 = 156, then 234 is a correct octal reading and you are done.

Frequently asked questions

What is 10 in octal?

12. Ten divided by 8 gives a quotient of 1 and a remainder of 2, which reads as the two-digit octal number 12.

How do you convert 100 to octal?

Divide by 8 repeatedly: 100 gives 12 remainder 4, then 12 gives 1 remainder 4, then 1 gives 0 remainder 1. Reading the remainders upward gives 144 in octal.

What is 255 in octal?

377. The expansion check confirms it: 3 x 64 + 7 x 8 + 7 = 255, and 377 is the largest number three octal digits can hold.

Why does octal use only the digits 0 to 7?

Base 8 has eight digits by definition, just as decimal has ten. The moment you reach eight, the count rolls over into the next position, so the digits 8 and 9 never appear.

What is 156 in octal?

234. Dividing 156 by 8 leaves 19 remainder 4, then 19 by 8 leaves 2 remainder 3, then 2 by 8 leaves 0 remainder 2, and the remainders read upward as 234.

How do you convert a decimal fraction like 0.25 to octal?

Multiply by 8 and keep the whole-number parts. Since 0.25 x 8 = 2, the octal form is 0.2. Fractions that do not terminate repeat, the way 1/3 repeats in decimal.

Why does chmod use octal numbers?

Each permission digit is three bits, one each for read, write and execute, and three bits pack into one octal digit. A mode like 755 means the owner can do everything while group and others can read and execute.

What is octal used for today?

Unix and Linux file permissions, aviation transponder squawk codes, octal literals in C-style languages, and legacy or retro hardware whose word sizes divide evenly by three bits.

What is 8 in octal?

10. Eight is the first number that needs a second octal digit, the same way ten is the first number that needs a second decimal digit.

Is octal still used, or is it obsolete?

It is narrower than it once was but not gone. File permissions alone make it part of daily work for anyone running Linux or macOS, and transponder codes keep it in every cockpit.

How do I convert octal back to decimal?

Multiply each digit by its place value and add. For 234 in octal, that is 2 x 64 + 3 x 8 + 4 = 156.

Why did old computers use octal instead of decimal?

Machines like the PDP-8 had 12-bit words, and 12 divides into four groups of three bits, so each word read as four compact octal digits with no wasted patterns.

How large can octal numbers get compared with decimal?

Octal needs more digits for the same value, roughly a tenth more, since each octal digit holds a factor of 8 rather than 10. A 4-digit octal number reaches 4095, which needs 4 decimal digits too.

Does the division method work for large numbers?

Yes, it works for any whole number; the ladder just grows one step per octal digit. The calculator above runs the same steps and shows the remainders so you can verify each line.

Spotted a wrong number or a broken result?

More Math tools

See all Math tools

Fee schedules, rates and rules change without notice. Always confirm important figures with the official source before you rely on them.