Decimal (Base 10) to Octal (Base 8) Converter
Convert decimal numbers to octal.
255 (base 10) = 377 (base 8)
Digits in base 10: 0 to 9. Digits in base 8: 0 to 7.
How to convert Decimal to Octal
Every positional number system works the same way: a digit is worth its own value times the base raised to the power of its position. In base 10 the place values, from the right, are 100 = 1, 101 = 10, 102 = 100 and so on.
To get from decimal to base 8, divide the number by 8 over and over. Every remainder is one digit of the answer, starting with the last digit, so you read the remainders from the bottom up.
The method
divide by 8, keep the remainder, repeat until the quotient is 0the answer is the remainders read from last to firstdigits in base 10: 0 to 9digits in base 8: 0 to 7
Worked example 1: 45 from decimal to octal
45 ÷ 8 = 5 remainder 55 ÷ 8 = 0 remainder 5Read the remainders from the bottom up: 5545 (base 10) = 55 (base 8)
Remainders come out last digit first, which is why you read them from the bottom up.
Worked example 2: 255 from decimal to octal
255 ÷ 8 = 31 remainder 731 ÷ 8 = 3 remainder 73 ÷ 8 = 0 remainder 3Read the remainders from the bottom up: 377255 (base 10) = 377 (base 8)
Worked example 3: 1000 from decimal to octal
1,000 ÷ 8 = 125 remainder 0125 ÷ 8 = 15 remainder 515 ÷ 8 = 1 remainder 71 ÷ 8 = 0 remainder 1Read the remainders from the bottom up: 17501000 (base 10) = 1750 (base 8)
Need the other direction? Open the Octal to Decimal converter.
Decimal to Octal examples
The decimal number 255 is written 255 in decimal and 377 in octal.
| Decimal | Octal |
|---|---|
| 1 | 1 |
| 2 | 2 |
| 7 | 7 |
| 8 | 10 |
| 10 | 12 |
| 15 | 17 |
| 16 | 20 |
| 32 | 40 |
| 64 | 100 |
| 100 | 144 |
| 255 | 377 |
| 1000 | 1750 |
Where Decimal to Octal comes up
Decimal is the base 10 system everyone learns first, with the digits 0 to 9. It is the form people read: prices, measurements, ages and IDs. It is also the base we calculate in by hand, which is why the worked steps on this page pass through decimal.
Octal uses the digits 0 to 7, and each octal digit stands for exactly three bits. Unix file permissions such as chmod 755 are written in octal, and it also appears in older machine listings where word sizes divide by three.
Going to a smaller base spreads the same value over more digits, so the result is longer. The number 255 needs 3 digits in decimal and 3 in octal.
Decimal to Octal FAQ
How do I convert decimal to octal?
Divide the decimal number by 8, write down the remainder, and repeat with the quotient until it reaches 0. The remainders, read from last to first, are the base 8 number.
Which digits does decimal use?
Base 10 uses the digits 0 to 9. For example, A is not a valid digit in base 10.
Will the octal number be longer or shorter?
Longer. Going to a smaller base spreads the same value over more digits, so the result is longer. Roughly 1.11 octal digits for every decimal digit. The number 255 needs 3 digits in decimal and 3 in octal.
What is 255 in octal?
255 in decimal is 377 in octal. Both are the decimal number 255.
Can I convert negative numbers or fractions?
The converter handles whole numbers, and a leading minus sign works for negatives. Fractions use a different method, where you repeatedly multiply the fractional part by the new base, and they are not supported here.