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.
| Octal | |
| Decimal | |
| Hexadecimal |
All conversion runs in your browser; nothing you type is uploaded anywhere.
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.
Key takeaways
- Octal is base 8, so every digit position is worth a power of 8: 1, 8, 64, 512, 4096
- Divide by 8, collect the remainders, read them bottom to top: 100 decimal becomes 144 in octal
- Each octal digit packs three bits, so the binary shortcut slices bits into groups of three
- Digits 8 and 9 never appear in octal, which is why squawk codes like 7700 never contain them
- Decimal fractions convert by multiplying by 8: 0.25 decimal is 0.2 in octal
On this page
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:
| Division | Quotient | Remainder |
|---|---|---|
| 156 ÷ 8 | 19 | 4 |
| 19 ÷ 8 | 2 | 3 |
| 2 ÷ 8 | 0 | 2 |
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 8 | Value |
|---|---|---|
| 1st | 8 ^ 0 | 1 |
| 2nd | 8 ^ 1 | 8 |
| 3rd | 8 ^ 2 | 64 |
| 4th | 8 ^ 3 | 512 |
| 5th | 8 ^ 4 | 4096 |
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:
| Decimal | Octal | Decimal | Octal |
|---|---|---|---|
| 0 | 0 | 20 | 24 |
| 8 | 10 | 32 | 40 |
| 9 | 11 | 50 | 62 |
| 10 | 12 | 64 | 100 |
| 12 | 14 | 100 | 144 |
| 15 | 17 | 156 | 234 |
| 16 | 20 | 255 | 377 |
| 17 | 21 | 512 | 1000 |
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:
| Use | Example | What it means |
|---|---|---|
| Unix file permissions | chmod 755 | 7 = read, write, execute for the owner; 5 = read and execute for group and others |
| Aviation transponder codes | squawk 7700 | Four octal digits give 4096 possible codes; 7700 signals an emergency |
| C language literals | int x = 010; | A leading zero makes the literal octal, so x holds 8, not 10 |
| Retro computing | PDP-8 word size | 12-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 group | Octal digit |
|---|---|
| 000 | 0 |
| 001 | 1 |
| 010 | 2 |
| 011 | 3 |
| 100 | 4 |
| 101 | 5 |
| 110 | 6 |
| 111 | 7 |
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:
- Writing an 8 or a 9. If either digit appears in your answer, a division step went wrong. Every octal digit is 0 through 7, no exceptions.
- Reading remainders top down. The remainders come out of the ladder in reverse. Reading 156's ladder downward gives 432, which is wrong; upward gives 234.
- Stopping one step early. Keep dividing until the quotient is 0, even if it feels repetitive. Skipping the final step drops the leading digit.
- Assuming fractions terminate. In base 8, many decimal fractions repeat forever, so treat trailing digits beyond a few places as rounded.
- Mixing up octal with hex. Both look like plain numbers. Check for the digits 8 and 9, which can only appear in hex or decimal, and confirm which base the source document is using.
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
Fee schedules, rates and rules change without notice. Always confirm important figures with the official source before you rely on them.