Skip to main content

Online Calculators and Tools | Calculators Toolbox

Octal Converter

This octal converter switches numbers between decimal and octal (base 8), with binary and hex shown as well.
Home / Octal Converter
Octal Converter illustration showing a terminal window with a glowing padlock and three permission toggles, beside stacked cubes in groups of eight
Octal Converter

Calculation Explanation

Free tool by Octal Converter – CalculatorsToolbox

Octal Converter – Decimal to Octal and Octal to Decimal

Our free octal converter switches numbers between decimal (base 10) and octal (base 8) in both directions, with the full working shown. Each result also includes the binary and hexadecimal values, which is perfect for programming and Unix file permissions.

What Is the Octal Number System?

Octal is a base-8 number system that uses only the digits 0 through 7. After 7 comes 10 (which means eight), then 11 (nine), and so on. Each place is worth eight times the place to its right: ones, eights, sixty-fours, 512s and 4,096s.

Octal was popular in early computing because many machines used word sizes that were multiples of three bits, and each octal digit represents exactly three binary digits. Hexadecimal has since become more common, but octal is still essential in one very visible place: Unix and Linux file permissions, where commands like chmod 755 use octal digits.

How to Convert Between Octal and Decimal

To convert decimal to octal, divide by 8 repeatedly and collect the remainders. To convert octal to decimal, multiply each digit by its power of 8 and add.

Octal → Decimal: Σ (digit × 8position)  |  Decimal → Octal: divide by 8, read remainders bottom to top

For 493: 493 ÷ 8 = 61 r 5, 61 ÷ 8 = 7 r 5, 7 ÷ 8 = 0 r 7. Reading upward gives 755. Going back, 7 × 64 + 5 × 8 + 5 × 1 = 448 + 40 + 5 = 493.

Example Calculations:

493 to octal755₈
644₈ to decimal384 + 32 + 4 = 420
64 to octal8² → 100₈
777₈ to decimal448 + 56 + 7 = 511

How to Use the Octal Converter

  1. On the Decimal → Octal tab, type any whole number.
  2. The octal value appears straight away, together with the binary and hex versions.
  3. To convert the other way, switch to Octal → Decimal and enter digits from 0 to 7. A 0o prefix is ignored.
  4. If you type an 8 or 9 by mistake, the converter tells you, since those digits don't exist in octal.

Where Octal Is Used

Linux File Permissions

chmod 755 gives the owner read, write and execute (7), and everyone else read and execute (5).

Programming Languages

Python writes octal as 0o755, while C and older JavaScript treat a leading 0 as octal, a common source of bugs.

Aviation Transponders

Aircraft squawk codes like 7700 (emergency) use octal digits, so codes never contain an 8 or 9.

Legacy Computers

Machines like the PDP-8 and early IBM systems used 12-, 24- or 36-bit words, which split neatly into octal digits.

Character Escapes

Many languages allow octal escape codes in strings, such as \101 for the letter A.

Number System Lessons

Octal is a common stepping stone in teaching how different bases work.

Understanding Unix File Permissions

The Three Permission Bits

Each octal digit adds up read (4), write (2) and execute (1). So 7 = 4 + 2 + 1 (all three), 6 = 4 + 2 (read and write), 5 = 4 + 1 (read and execute) and 4 = read only.

Owner, Group and Others

A three-digit permission like 644 sets the owner (6 = read/write), the group (4 = read) and everyone else (4 = read). It's the standard setting for ordinary files on web servers.

Common Permission Values

755 for folders and scripts, 644 for regular files, 600 for private files like SSH keys, and 777 (everyone can do everything), which should be avoided for security.

Octal and Binary

Each octal digit is exactly three bits: 7 = 111, 5 = 101, 4 = 100. So 755 = 111 101 101, which lines up perfectly with rwx r-x r-x. See the full binary working with the binary converter.

Tips for Working With Octal

  • Octal only uses digits 0–7. If you see an 8 or 9, the number isn't octal.
  • Powers of 8 to remember: 8, 64, 512 and 4,096.
  • Convert octal to binary instantly by replacing each digit with three bits.
  • In code, watch out for leading zeros: in some languages 010 means eight, not ten.
  • To convert octal to hex, go through binary: regroup the bits in fours instead of threes.
  • For base-16 values, use the hex converter.

Decimal, Octal and Binary Table

DecimalOctalBinaryDecimalOctalBinary
00000810001 000
11001911001 001
220101012001 010
330111620010 000
441003240100 000
5510164100001 000 000
66110100144001 100 100
77111511777111 111 111

Step-by-Step Worked Example

What does the permission 750 mean, and what is it in decimal?

  1. Owner digit 7 = 4 + 2 + 1 → read, write, execute.
  2. Group digit 5 = 4 + 1 → read and execute.
  3. Others digit 0 → no access at all.
  4. As a number: 7 × 64 + 5 × 8 + 0 = 448 + 40 + 0 = 488 in decimal.

Enter 750 on the Octal → Decimal tab of the octal converter to confirm 488, and you'll see the binary form 111 101 000 matching rwx r-x ---.

Why Octal Faded and Hex Took Over

In the 1960s, many computers used 12-, 18-, 24- or 36-bit words, all divisible by 3, so octal fit perfectly. When the 8-bit byte became the standard in the 1970s, with 16-, 32- and 64-bit processors following, groups of four bits made more sense, and hexadecimal took over. Octal survives in file permissions, aviation codes and a few programming conventions, which is why it's still worth knowing, and why a quick octal converter remains a handy tool for system administrators and students alike.

Converting Octal to Hex

There's no direct division trick between octal and hex, but binary makes it easy. Write each octal digit as three bits, regroup the bits in fours from the right, then read each group as a hex digit. For 755₈: 7 = 111, 5 = 101, 5 = 101, giving 111101101. Regroup as 1 1110 1101, which is 1ED in hex. The converter shows all three bases together, so you can see this relationship for any number.

Common Octal Mistakes

The most common error is typing an 8 or 9, which simply don't exist in base 8. Another is misreading octal values as decimal; 755 in octal is 493, not seven hundred fifty-five. In programming, a leading zero can silently switch a number to octal in some languages, so 0123 might be read as 83. When writing permissions or code, always be clear which base you're using.

Why Use Our Octal Converter?

Our octal converter works in both directions, rejects invalid digits, shows binary and hex alongside every result, and explains each step. It's a quick, reliable tool for Linux administrators setting permissions, programmers reading legacy code and students learning number bases.

Frequently Asked Questions

Quick answers to common questions related to Octal Converter are as under:-

What is the octal number system?

Octal is a base-8 number system that uses the digits 0 to 7. Each place value is a power of 8: 1, 8, 64, 512 and so on.

How do you convert decimal to octal?

Divide the number by 8 repeatedly and record each remainder. Read the remainders from the last to the first. For example, 100 becomes 144 in octal.

How do you convert octal to decimal?

Multiply each digit by 8 raised to its position, starting from 0 on the right, and add the results. 17 in octal is 1 × 8 + 7 = 15.

What does chmod 755 mean?

It gives the owner read, write and execute permission (7) and gives the group and everyone else read and execute permission (5 each).

Why doesn't octal have the digits 8 and 9?

Base 8 only needs eight digits, 0 to 7. Once you reach eight, you carry over to the next place, so eight is written as 10.

Each octal digit represents exactly three binary digits, so converting between them is simply a matter of grouping bits in threes.

Latest from Our Blog

Explore helpful tips, updates, and guides on calculators, AI tools, and conversions.