Decimal to octal converter
Type a decimal number to get it in octal, base 8, or use the base converter for any other base. 255 becomes 377 and 493 becomes 755. Paste a list with one number per line to convert them all.
Show the working
Runs in your browser. Nothing you type is uploaded.
How to convert decimal to octal
- Divide the number by 8. Write down the whole-number answer and the remainder.
- Divide that answer by 8 again, and keep going until the answer is 0.
- Read the remainders from the last one to the first. That is the octal number.
Every remainder is between 0 and 7, so it is already an octal digit. The decimal to binary converter and the decimal to hex converter follow the same steps with 2 or 16 in place of 8. The converter shows this division table under "Show the working".

Decimal to octal example: 100
| Divide | Quotient | Remainder |
|---|---|---|
| 100 ÷ 8 | 12 | 4 |
| 12 ÷ 8 | 1 | 4 |
| 1 ÷ 8 | 0 | 1 |
Read up from the bottom: 1, 4, 4. So 100 in decimal is 144 in octal. Check it the other way with the octal to decimal converter, or by hand: 1 × 64 + 4 × 8 + 4 = 100.
Decimal to octal chart

| Decimal | Octal | Decimal | Octal |
|---|---|---|---|
| 1 | 1 | 9 | 11 |
| 7 | 7 | 10 | 12 |
| 8 | 10 | 16 | 20 |
| 32 | 40 | 64 | 100 |
| 100 | 144 | 128 | 200 |
| 255 | 377 | 256 | 400 |
| 512 | 1000 | 1000 | 1750 |
Fractions and negative numbers
For the part after the point, multiply by 8 and keep the whole-number part as the next digit. 0.5 × 8 = 4, so 0.5 is 0.4 in octal. Some fractions never end: 0.1 becomes 0.06314631... and the tool stops after 32 digits and tells you the digits repeat. A minus sign is kept as it is, so -8 becomes -10.
Output options
Pick "0o prefix" in the Output menu to get values ready for Python or JavaScript, such as 0o755. In C and older JavaScript a leading 0 means octal (MDN's guide to JavaScript number literals calls it legacy syntax), so 0755 and 755 are different numbers in code.
Frequently asked questions
How do you convert decimal to octal?
Divide by 8 again and again and write down each remainder. The remainders read from bottom to top are the octal digits.
What is 10 in octal?
12. 10 ÷ 8 is 1 with remainder 2.
What is 1000 in octal?
1750. The check is 1 × 512 + 7 × 64 + 5 × 8 + 0 = 1000.
Is there a decimal to octal formula?
Yes: keep taking n mod 8 for the next digit from the right and replace n with n ÷ 8, rounded down, until n is 0.
Why does octal 10 equal decimal 8?
Octal only has the digits 0 to 7, so after 7 it carries one into the next place. That place is worth 8.

