How to convert octal to decimal, step by step

How to convert octal to decimal, step by step

Octal digits run from 0 to 7, and each place is worth eight times the one to its right. Multiply each digit by its place value, add them up, and 755 becomes 493.

Where octal still shows up

Octal is base 8. You meet it mostly in Unix file permissions such as 755 and 644, in a few older file formats, and in programming exercises. Read 755 as a decimal number and you get the wrong value. In octal it is 7 × 64 + 5 × 8 + 5, which is 493.

The mistake also runs the other way. A script that expects a permission in octal does something odd when it is given 493, and a value written with a leading zero, such as 0755, is read as octal by some programming languages.

Convert with one tool, check with another

The Number Base Converter moves a number between any two bases from 2 to 36 and always shows binary, octal, decimal, and hex side by side. Set From to 8 and To to 10, or type the number with the 0o prefix. It handles whole numbers of any length with BigInt, and fractions too.

The Decimal to Binary Converter is useful for a second check. Each octal digit stands for exactly three bits, so 755 in octal is 111 101 101 in binary. Type 493 into the converter and it gives 111101101, the same bits.

Convert octal to decimal

  1. Write down the octal digits and number their places from 0 on the right. In 755, the places are 2, 1, and 0.
  2. Work out each place value: 8⁰ = 1, 8¹ = 8, 8² = 64, 8³ = 512.
  3. Multiply each digit by its place value: 7 × 64 = 448, 5 × 8 = 40, and 5 × 1 = 5.
  4. Add the products: 448 + 40 + 5 = 493.
  5. Check the answer in the Number Base Converter with From set to 8.

Things that break an octal conversion

  • The digits 8 and 9 do not exist in octal. A number that contains them is not octal.
  • Fractions are written to 20 digits. A longer one is cut off and marked.
  • Two's complement is shown only for whole numbers that fit the chosen width.

Frequently asked questions

What is octal 17 in decimal?

15. 1 × 8 + 7 = 15.

What is octal 377 in decimal?

255, the largest value that fits in one byte.

What is 755 in decimal?

493, when 755 is read as octal. Unix permissions are written in octal, one digit per permission group.

How do I convert decimal to octal?

Divide by 8 again and again and read the remainders from last to first. 493 gives 755.

Tools used in this guide

More from the blog

All guides