Using the converter
Type an octal number, like 755 or 0o755, and the decimal appears straight away, with each digit's place value worked out underneath. Octal digits go from 0 to 7, so an 8 or 9 is flagged. Several numbers can go in at once, separated by spaces, commas or new lines.
How to convert octal to decimal
Each place in an octal number is worth 8 times the place to its right, so the places are 1, 8, 64, 512 and so on. Multiply each digit by its place value and add them up.
For 755, the 7 is in the 64s place, the first 5 in the 8s place and the last 5 in the ones place. That's 7 × 64 + 5 × 8 + 5 × 1 = 448 + 40 + 5 = 493.
Where octal is still used
Octal was common on early computers whose words were multiples of 3 bits. Today it's mostly seen in Unix file permissions, where each digit is three bits, for read, write and run. In chmod 755, the 7 (111) gives the owner all three and each 5 (101) gives read and run. The chmod calculator spells it out.
Questions
What is 10 in octal as a decimal?
8. One eight and no ones.
What is 777 in decimal?
511. That's 7 × 64 + 7 × 8 + 7 = 448 + 56 + 7. It's one less than 1000 in octal, which is 512.
Why does a leading 0 mean octal?
In C, JavaScript's older syntax and many shells, a number written with a 0 in front, like 0755, is read as octal. Newer languages use 0o755 to avoid surprises. The converter accepts both.
Is octal the same as base 8?
Yes. Octal is the name for base 8, the way hexadecimal is base 16 and binary is base 2.
Decimal, binary, octal and hex from 0 to 32
| Decimal | Binary | Octal | Hex |
|---|---|---|---|
| 0 | 0 | 0 | 0 |
| 1 | 1 | 1 | 1 |
| 2 | 10 | 2 | 2 |
| 3 | 11 | 3 | 3 |
| 4 | 100 | 4 | 4 |
| 5 | 101 | 5 | 5 |
| 6 | 110 | 6 | 6 |
| 7 | 111 | 7 | 7 |
| 8 | 1000 | 10 | 8 |
| 9 | 1001 | 11 | 9 |
| 10 | 1010 | 12 | A |
| 11 | 1011 | 13 | B |
| 12 | 1100 | 14 | C |
| 13 | 1101 | 15 | D |
| 14 | 1110 | 16 | E |
| 15 | 1111 | 17 | F |
| 16 | 10000 | 20 | 10 |
| 17 | 10001 | 21 | 11 |
| 18 | 10010 | 22 | 12 |
| 19 | 10011 | 23 | 13 |
| 20 | 10100 | 24 | 14 |
| 21 | 10101 | 25 | 15 |
| 22 | 10110 | 26 | 16 |
| 23 | 10111 | 27 | 17 |
| 24 | 11000 | 30 | 18 |
| 25 | 11001 | 31 | 19 |
| 26 | 11010 | 32 | 1A |
| 27 | 11011 | 33 | 1B |
| 28 | 11100 | 34 | 1C |
| 29 | 11101 | 35 | 1D |
| 30 | 11110 | 36 | 1E |
| 31 | 11111 | 37 | 1F |
| 32 | 100000 | 40 | 20 |
Decimal, binary, octal and hex from 0 to 32stringmash.com/octal-to-decimal
Sources
Added and reviewed . What's new






