How it works
Octal counts in base 8, decimal counts in base 10. Converting means rewriting the same quantity with a different set of digits — the value never changes, only how it is written.
- Number the digits from the right, starting at 0.
- Multiply each digit by 8 raised to the power of its position.
- Add the results — that total is the decimal value.
The reverse conversion is Decimal to Octal, which also handles every other base pair.
Examples
Worked examples, digit by digit:
- 12 (octal) = 1×81 + 2×80 = 10 (decimal)
- 25 (octal) = 2×81 + 5×80 = 21 (decimal)
- 377 (octal) = 3×82 + 7×81 + 7×80 = 255 (decimal)
| Decimal | Binary | Octal | Hexadecimal |
|---|---|---|---|
| 0 | 0 | 0 | 0 |
| 1 | 1 | 1 | 1 |
| 2 | 10 | 2 | 2 |
| 4 | 100 | 4 | 4 |
| 8 | 1000 | 10 | 8 |
| 10 | 1010 | 12 | A |
| 15 | 1111 | 17 | F |
| 16 | 10000 | 20 | 10 |
| 32 | 100000 | 40 | 20 |
| 64 | 1000000 | 100 | 40 |
| 100 | 1100100 | 144 | 64 |
| 255 | 11111111 | 377 | FF |
Octal to Decimal: frequently asked questions
- How do I convert octal to decimal?
- Multiply each octal digit by 8 raised to its position (starting at 0 on the right) and add the results. For example, 55 = 5×8^1 + 5×8^0 = 45. The converter above does this instantly for any value.
- What is 377 in decimal?
- Octal 377 equals 255 in decimal (the value 255, the largest number that fits in one byte).
- Why are octal and decimal used?
- Octal (base 8) is a compact way to write groups of three bits and is still used for Unix file permissions such as 755. Decimal (base 10) is the everyday number system.
