Octal to Decimal Converter

Enter an octal number to get its decimal value, with the powers-of-8 working shown step by step.

Loading tool…

About the Octal to Decimal

Octal is base 8 and uses only the digits 0–7. Each position is worth eight times the one to its right: 1, 8, 64, 512, 4096 … To convert to decimal, multiply each digit by its power of 8 and add. For 755: 7×64 + 5×8 + 5×1 = 448 + 40 + 5 = 493. The step table under the result shows this for your number.

Where you meet octal today is mainly Unix file permissions. In chmod 755 each digit is three bits — read (4), write (2), execute (1) — for owner, group and others, so 7 = rwx and 5 = r-x. The decimal value (493) is what a program receives if it parses the mode as a plain number, a classic bug when calling os.chmod(path, 755) in Python instead of 0o755.

Watch out for implicit octal in code. In C, C++, Java and older JavaScript, a literal with a leading zero is octal: 010 equals 8, not 10. Python 3 requires the explicit 0o prefix and treats 010 as a syntax error; JavaScript also forbids 010 in strict mode and modules. This converter accepts 0o prefixes and rejects the digits 8 and 9, which cannot appear in an octal number.

How to use it

  1. Type the octal number (digits 0–7; a 0o prefix is fine).
  2. Read the decimal result.
  3. Follow the step-by-step table showing each digit times its power of 8.
  4. Copy the result; binary and hex are listed under “Other bases”.

Frequently asked questions

How do you convert octal to decimal?
Multiply each digit by 8 raised to its position from the right (starting at 0) and add: 17 in octal = 1×8 + 7 = 15.
What is 777 octal in decimal?
511 (7×64 + 7×8 + 7). As a permission it means rwx for owner, group and others.
Why is 010 equal to 8 in some programming languages?
C, C++, Java and non-strict JavaScript treat a leading 0 as an octal prefix. Use 0o10 (Python, JavaScript) or avoid leading zeros to prevent surprises.
How do I convert octal to decimal in code?
JavaScript: parseInt('755', 8). Python: int('755', 8). Bash: echo $((8#755)).

Related tools