Decimal to Octal: Convert by Repeated Division by 8
Convert decimal to octal the easy way using repeated division by 8. Includes worked examples, a quick-reference table, and tips to check your answers.
Decimal to Octal: How to Convert Numbers by Repeated Division by 8
To convert decimal to octal, repeatedly divide the decimal number by 8, write down the remainder at each step, and then read the remainders from bottom to top. That sequence of remainders is your octal (base-8) number. For example, decimal 125 becomes octal 175. This single rule โ divide by 8, collect remainders, reverse them โ handles any whole number you throw at it.
This guide explains what octal actually is, why base-8 still matters, and how to do the repeated-division method by hand with a fully worked example and a quick-reference table. By the end you will be able to convert any decimal value to octal on paper and check your work in seconds. When you just need a fast, error-free answer, our browser-based number conversion tools will do the math instantly.
What Is the Octal Number System?
Octal is a positional number system with a base of 8. That means it uses only eight digits โ 0, 1, 2, 3, 4, 5, 6, and 7 โ and there is no digit "8" or "9". Just as decimal (base 10) groups values in powers of ten, octal groups values in powers of eight. Each position in an octal number represents the next power of 8: ones (8โฐ), eights (8ยน), sixty-fours (8ยฒ), five-hundred-twelves (8ยณ), and so on.
Decimal, the system we use every day, is base 10 because it has ten digits (0โ9). Computers, on the other hand, work in binary (base 2). Octal sits neatly between them: because 8 is exactly 2ยณ, one octal digit represents exactly three binary digits. That clean three-bit relationship is the historical reason octal became popular in early computing.
Why Octal Still Matters
Octal is no longer the default for representing raw memory the way it was on older mainframes, but it is far from dead. The most common place modern developers meet octal is Unix and Linux file permissions. When you run a command like chmod 755 script.sh, those three digits are octal: each digit (7, 5, 5) encodes read, write, and execute bits for the owner, group, and others. Understanding octal turns those cryptic numbers into something readable.
Octal also appears in legacy systems, certain microcontroller documentation, and as escape sequences in some programming languages (for example, \101 in a string). Learning to convert decimal to octal gives you a foundation for reading all of these.
The Repeated Division by 8 Method
The core technique for converting decimal to octal is repeated division by 8. It is the same idea as the division method used for binary (divide by 2) or hexadecimal (divide by 16), just with a divisor of 8. Here is the step-by-step process:
- Divide the decimal number by 8.
- Record the remainder (it will always be a value from 0 to 7 โ never 8 or higher).
- Replace the number with the quotient (the whole-number result of the division).
- Repeat steps 1โ3 with the new quotient until the quotient becomes 0.
- Read the remainders from the bottom up (last remainder first). That is your octal number.
Key rule: every remainder when dividing by 8 must be between 0 and 7. If you ever write down an 8 or 9 as a remainder, you have made an arithmetic mistake.
Worked Example: Convert Decimal 125 to Octal
Let us convert the decimal number 125 to octal step by step. We divide by 8 each time and keep track of the quotient and remainder.
| Step | Division | Quotient | Remainder |
|---|---|---|---|
| 1 | 125 รท 8 | 15 | 5 |
| 2 | 15 รท 8 | 1 | 7 |
| 3 | 1 รท 8 | 0 | 1 |
Now read the remainders from bottom to top: 1, then 7, then 5. So decimal 125 = octal 175.
You can verify the answer by converting back. Multiply each octal digit by its place value (a power of 8) and add: (1 ร 64) + (7 ร 8) + (5 ร 1) = 64 + 56 + 5 = 125. The numbers match, so the conversion is correct.
A Second Worked Example: Decimal 250 to Octal
Let us try a larger number, 250, to reinforce the pattern.
| Step | Division | Quotient | Remainder |
|---|---|---|---|
| 1 | 250 รท 8 | 31 | 2 |
| 2 | 31 รท 8 | 3 | 7 |
| 3 | 3 รท 8 | 0 | 3 |
Reading the remainders bottom to top gives 372. Check: (3 ร 64) + (7 ร 8) + (2 ร 1) = 192 + 56 + 2 = 250. Correct again.
The pattern is identical no matter how large the number. Each round of division peels off one octal digit, starting from the rightmost (least significant) position and working left. Because you never need to memorize multiplication tables beyond 8, the method stays manageable even for big values โ you just have a few more rows in the table.
An Alternative: The Place-Value Subtraction Method
Some learners find a second approach more intuitive, especially for understanding why octal works. Instead of dividing, you subtract the largest power of 8 that fits, then repeat. List the powers of 8 first: 1, 8, 64, 512, 4096, and so on. To convert decimal 250:
- The largest power of 8 that fits into 250 is 64. How many 64s fit? 250 รท 64 = 3 (since 3 ร 64 = 192). Write down 3, then subtract: 250 โ 192 = 58.
- The next power is 8. How many 8s fit into 58? 58 รท 8 = 7 (since 7 ร 8 = 56). Write down 7, then subtract: 58 โ 56 = 2.
- The last power is 1. How many 1s fit into 2? Exactly 2. Write down 2.
Reading the digits left to right gives 372 โ the same answer as the division method. This approach makes the place values explicit, which is helpful when you are first building intuition for base systems. Once the concept clicks, most people switch back to repeated division because it requires less setup.
Converting Fractional Decimals to Octal
Whole numbers use repeated division, but decimal fractions (the part after the point) use repeated multiplication by 8 instead. To convert the fractional part, multiply by 8, record the integer part of the result, and repeat with the leftover fraction. For example, to convert 0.5 to octal: 0.5 ร 8 = 4.0, so the integer part is 4 and there is nothing left. Therefore 0.5 in decimal is 0.4 in octal. For a value like 0.625: 0.625 ร 8 = 5.0, giving 0.5 octal. You read these digits top to bottom โ the opposite direction from the whole-number remainders. Many fractions do not terminate cleanly in octal, just as 1/3 does not terminate in decimal, so you stop after a chosen number of places.
Quick Reference: Decimal to Octal Table
The table below shows common decimal values and their octal equivalents. Notice that for the values 0 through 7, decimal and octal are identical โ they only start to diverge at 8, which is written as 10 in octal (one "eight" and zero "ones").
| Decimal | Octal | Decimal | Octal |
|---|---|---|---|
| 0 | 0 | 16 | 20 |
| 1 | 1 | 24 | 30 |
| 7 | 7 | 32 | 40 |
| 8 | 10 | 64 | 100 |
| 9 | 11 | 100 | 144 |
| 10 | 12 | 125 | 175 |
| 15 | 17 | 255 | 377 |
Want to skip the arithmetic entirely? Our free online converter turns decimal into octal, binary, and hexadecimal instantly โ no signup, no install, just type and copy. It is ideal for double-checking homework or batch-converting values during a coding session.
Common Mistakes and How to Avoid Them
Converting decimal to octal is mechanical, but a few errors trip people up repeatedly:
- Reading remainders top-down. The most common slip is reading the remainders in the order you wrote them. Always read from the last division up to the first.
- Writing a remainder of 8 or 9. Remainders from division by 8 can only be 0โ7. If you get 8, your quotient is wrong.
- Stopping too early. Keep dividing until the quotient is exactly 0, not just small. A quotient of 1 still produces one more remainder.
- Confusing octal with hexadecimal. Octal uses digits 0โ7 and powers of 8; hex uses 0โ9 plus AโF and powers of 16. Do not mix the divisors.
How Octal Relates to Binary
Because 8 = 2ยณ, each octal digit maps to exactly three binary bits. This makes converting between octal and binary trivial: just translate each octal digit to its 3-bit binary group. For instance, octal 175 becomes 001 111 101 in binary, which is 1111101. If you frequently move between bases, understanding this shortcut is faster than dividing repeatedly. You can confirm any of these conversions with our binary and decimal converter.
Related Reading
If you found this useful, explore more base-conversion guides in our Binary Converters hub. Two closely related tutorials are The Binary Alphabet: A to Z in Binary and Decimal to ASCII: Mapping Numbers to Characters. Together they cover the most common conversions you will encounter when learning how computers represent numbers and text.
Frequently Asked Questions
What is the easiest way to convert decimal to octal?
The easiest manual method is repeated division by 8: divide the number by 8, note each remainder, and read the remainders from bottom to top. For instant results without arithmetic, use a free online converter.
Why do we read the remainders from bottom to top?
Each division strips off the least significant octal digit first. The last remainder you calculate corresponds to the highest place value, so reading bottom-to-top arranges the digits in the correct order from most to least significant.
Can octal numbers contain the digits 8 or 9?
No. Octal is base 8, so it only uses the digits 0 through 7. If you see an 8 or 9, the value is not a valid octal number, or a calculation error has occurred.
What is decimal 125 in octal?
Decimal 125 is octal 175. You can verify this by computing (1 ร 64) + (7 ร 8) + (5 ร 1) = 125.
Where is octal actually used today?
The most common modern use is Unix and Linux file permissions, such as the 755 in chmod 755. Octal also appears in legacy systems, some hardware documentation, and certain string escape sequences in programming languages.
How is octal different from hexadecimal?
Octal is base 8 and uses digits 0โ7, while hexadecimal is base 16 and uses digits 0โ9 plus letters AโF. To convert decimal to octal you divide by 8; to convert to hex you divide by 16.
Do decimal and octal ever look the same?
Yes, for the numbers 0 through 7 the decimal and octal representations are identical. They begin to differ at decimal 8, which is written as 10 in octal.