How to convert decimal to octal by hand
Example 1: 493 in decimal is 755 in octal
Decimal to octal: divide by 8 and keep the remainders
Divide by 8 until the quotient is 0. The remainders, read from the bottom up, are the octal digits.
| Number | Division | Quotient | Remainder |
|---|---|---|---|
| 493 | 493 ÷ 8 | 61 | 5 |
| 61 | 61 ÷ 8 | 7 | 5 |
| 7 | 7 ÷ 8 | 0 | 7 |
Reading the remainders from bottom to top gives 755
Example 2: 64 in decimal is 100 in octal
Decimal to octal: divide by 8 and keep the remainders
Divide by 8 until the quotient is 0. The remainders, read from the bottom up, are the octal digits.
| Number | Division | Quotient | Remainder |
|---|---|---|---|
| 64 | 64 ÷ 8 | 8 | 0 |
| 8 | 8 ÷ 8 | 1 | 0 |
| 1 | 1 ÷ 8 | 0 | 1 |
Reading the remainders from bottom to top gives 100
Decimal to Octal conversion table
| Decimal | Octal |
|---|---|
| 0 | 0 |
| 1 | 1 |
| 2 | 2 |
| 3 | 3 |
| 4 | 4 |
| 5 | 5 |
| 6 | 6 |
| 7 | 7 |
| 8 | 10 |
| 9 | 11 |
| 10 | 12 |
| 11 | 13 |
| 12 | 14 |
| 13 | 15 |
| 14 | 16 |
| 15 | 17 |
| 16 | 20 |
| 32 | 40 |
| 64 | 100 |
| 100 | 144 |
| 128 | 200 |
| 255 | 377 |
| 256 | 400 |
| 512 | 1000 |
| 1000 | 1750 |
| 1024 | 2000 |
Where this conversion comes up
- Unix file permissions: a mode your code prints in decimal, such as 493, is 755 in octal, the value you would pass to chmod.
- Aircraft transponder (squawk) codes use only the digits 0 to 7, so each one is a four digit octal number.
- Coursework on number bases, where octal is often taught alongside binary and hex.
Frequently asked questions
Why does octal only use the digits 0 to 7?
Octal is base 8, so each position holds 8 possible values, 0 to 7. The number eight itself is written 10 in octal.
Can I convert negative numbers?
Yes. Put a minus sign in front and it is kept in the result, for example -493 becomes -755. The converter does not produce two's complement.
Is there a limit on how big the number can be?
No practical limit. The conversion uses arbitrary precision integers, so long values stay exact. The step-by-step working is shown for numbers up to 24 digits.
Can I convert fractions?
Not with this tool. It converts whole decimal numbers to whole octal numbers.
Other number converters
Going the other way? Use the Octal to Decimal Converter. To see a number in every base at once, try the all-in-one number converter.