Menu

Octal to Decimal Converter

Type an octal number and read its decimal value, with the working shown underneath. It opens on 755, the most common file permission, which is 493.

By Nethanel Bar, Co-founder & CEO

Last updated

Ready to actually learn to code?

Coddy teaches you by writing real code in your browser - interactive lessons, instant feedback, and AI help when you get stuck.

How to convert octal to decimal

Octal is base 8, so it uses the digits 0 to 7 and each position is worth eight times the one to its right: 1, 8, 64, 512, 4096. The digits 8 and 9 never appear in an octal number.

To convert, multiply each digit by its place value and add. 17 is 1 × 8 + 7 = 15, and 100 is 1 × 64 = 64. The panel under the converter shows these lines for whatever you type.

Octal survives mainly in Unix file permissions, where each digit packs three bits: read (4), write (2) and execute (1). That is why chmod 755 gives the owner read, write and execute, and everyone else read and execute.

What to know about octal numbers

  • Octal digits run from 0 to 7; there is no 8 or 9.
  • Place values are powers of 8: 1, 8, 64, 512.
  • One octal digit is exactly three bits, so 7 is 111 and 5 is 101.
  • In code, a leading 0o marks octal (0o755 in Python and JavaScript); in C a leading 0 does.

Octal to decimal, worked out

A file permission

Octal

755

Decimal

493

7 × 64 + 5 × 8 + 5 × 1 = 448 + 40 + 5 = 493.

Two digits

Octal

17

Decimal

15

1 × 8 + 7 = 15, one less than octal 20, which is 16.

A private file

Octal

600

Decimal

384

6 × 64 = 384: read and write for the owner, nothing for anyone else.

The largest three-digit octal number

Octal

777

Decimal

511

7 × 64 + 7 × 8 + 7 = 511, one less than 8³, which is 512.

Common octal to decimal mistakes

  • Typing an 8 or a 9. Neither exists in octal, so the converter pauses when you do.
  • Multiplying by 10 instead of 8. Octal 10 is eight.
  • Reading a C literal such as 0755 as decimal. The leading 0 makes it octal, so its value is 493.
  • Converting permission digits before using them. chmod 755 expects octal, so pass the digits as they are.

Octal to decimal FAQ

What is 755 in decimal?
493. 7 × 64 + 5 × 8 + 5 = 448 + 40 + 5 = 493.
What is octal 10 in decimal?
8. The 1 sits in the eights place.
How do I convert octal to decimal in Python?
int('755', 8) returns 493. In JavaScript, parseInt('755', 8) does the same.
Where is octal used today?
Mostly in Unix file permissions such as chmod 644 and chmod 755, and in a few older file formats. Each octal digit holds three bits, which matches the three permission flags.

Learn more

Other developer tools

Coddy programming languages illustration

Learn to code with Coddy

GET STARTED