gettoolz.app

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.

Base

Binary

10101101

Octal

255

Decimal

173

Hexadecimal

AD

Octal to decimal table

OctalDecimal
00
11
22
33
44
55
66
77
108
119
1210
1311
1412
1513
1614
1715
2016
144100
177127
377255
400256
17501000
20001024
100004096
17777765535
377777777774294967295
177777777777777777777718446744073709551615

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.