Octal to decimal converter
Convert octal numbers to decimal — by adding up each digit times its power of 8. Exact at any size, with a worked example and a table of common values. Free, and computed in your browser.
Part of developer tools.
Binary
10101101
Octal
255
Decimal
173
Hexadecimal
AD
Octal to decimal table
| Octal | Decimal |
|---|---|
| 0 | 0 |
| 1 | 1 |
| 2 | 2 |
| 3 | 3 |
| 4 | 4 |
| 5 | 5 |
| 6 | 6 |
| 7 | 7 |
| 10 | 8 |
| 11 | 9 |
| 12 | 10 |
| 13 | 11 |
| 14 | 12 |
| 15 | 13 |
| 16 | 14 |
| 17 | 15 |
| 20 | 16 |
| 144 | 100 |
| 177 | 127 |
| 377 | 255 |
| 400 | 256 |
| 1750 | 1000 |
| 2000 | 1024 |
| 10000 | 4096 |
| 177777 | 65535 |
| 37777777777 | 4294967295 |
| 1777777777777777777777 | 18446744073709551615 |
The last rows are the largest 32-bit and 64-bit unsigned values. The second is past the point where ordinary JavaScript numbers start rounding; the table and the converter above both compute with BigInt, so every digit is exact.
How to convert octal to decimal
Multiply each octal digit by the power of 8 for its position — 8⁰ = 1 for the rightmost digit, 8¹ = 8 for the next, 8² = 64 after that — and add the results. For 255: 2 × 8² + 5 × 8¹ + 5 × 8⁰ = 128 + 40 + 5 = 173.
Octal and decimal side by side
The largest 16-bit value is 177777 in octal and 65535 in decimal: 6 digits against 5. A decimal digit is worth log₂ 10 ≈ 3.32 bits, against 3 for an octal digit — not a whole ratio, so decimal and octal digits never line up and there is no digit-by-digit shortcut: the whole number has to be added up, as above. Octal survives mainly in Unix file permissions, where each digit is one read-write-execute triplet: 755 is rwx r-x r-x. In JavaScript and Python source, 173 is written 0o255 in octal and 173 with no prefix in decimal. Paste a prefixed number into the converter and it switches to the matching base; a number with no prefix is read in the selected base — octal on this page.
Other conversions
Going the other way? Decimal to octal converter.
Or open the full number base converter and see a number in all four bases at once.