Home › Converters › Octal to Decimal

Octal to Decimal

You have met a number written in octal — in a Unix permission string, an old programming manual, or a homework problem — and you need to know what it is worth in ordinary decimal. This octal to decimal converter translates it exactly, digit for digit, even for very long values: type the octal number and the decimal answer appears, with binary and hexadecimal shown alongside in the table below.

511
Base 8 → base 10 · decimal value: 511

The same value in all four bases

BaseValue
Binary (base 2)111111111
Octal (base 8)777
Decimal (base 10)511
Hexadecimal (base 16)1FF

How it works

Octal is a base-8 counting system: it uses only the digits 0 through 7, and each position in an octal number is worth a power of eight instead of a power of ten. Reading from the right, the positions are worth 1, 8, 64, 512, 4096 and so on — each one eight times the previous. Octal earned its place in computing because it maps cleanly onto binary: every octal digit is exactly three binary digits, so long bit strings can be written in a third of the space while staying easy to translate back.

Converting octal to decimal means multiplying each digit by its place value and adding the results. This converter performs that arithmetic with exact whole numbers of unlimited size, so a twenty-digit octal value converts digit-for-digit rather than being rounded the way a floating-point calculator would round it.

Decimal value = (rightmost digit × 1) + (next digit × 8) + (next digit × 64) + (next digit × 512) + … — each position left is worth eight times more: 8^0, 8^1, 8^2, 8^3, …

To convert by hand, write the powers of eight above the digits, multiply down each column, and add. For the octal number 25, that is 2 × 8 + 5 × 1 = 16 + 5 = 21. The reverse trip — decimal to octal — works by dividing by eight and collecting the remainders, and you can run it here by swapping the base boxes: this tool converts binary, octal, decimal and hexadecimal in any direction, because all four bases describe the same whole number, just written with different digits.

Worked example

A student setting up her first Linux web server reads that a configuration file should be readable by everyone, and the guide quotes a number in octal: 777. Before trusting it, she wants the decimal value.

Step 1: Write the powers of eight over the digits — 64, 8, 1.
Step 2: Multiply each digit by its power: 7 × 64 = 448, 7 × 8 = 56, 7 × 1 = 7.
Step 3: Add the products: 448 + 56 + 7 = 511.
Step 4: So the octal number 777 is 511 in decimal.

That is exactly what the converter shows for 777: 511. In binary that is 111111111 — nine ones — which is why 777 is the "everything allowed" permission in Unix: each octal 7 is the three bits 111, read, write and execute all switched on.

Common mistakes and tips

The most common mistake is reading an octal number as if it were decimal: 777 typed on a spec sheet is worth 511, not seven hundred seventy-seven, and 10 in octal is only 8. Always confirm the base before doing arithmetic. The second trap is using digits 8 or 9 — octal has neither, so if a "number" contains them it is not octal at all, and this converter will stop and name the bad digit instead of guessing.

Watch for leading zeros in code: in many programming languages a number written with a leading 0, like 0777, is octal by convention, which surprises people who typed the zero as decoration. And remember the handy bridge to binary: convert octal digit by digit — 7 becomes 111, 5 becomes 101 — so 755 becomes 111101101, the exact bit pattern a system administrator pictures.

FAQ

What is 777 in decimal?

Octal 777 is 511 in decimal. Multiply each digit by its power of eight and add: 7 × 64 + 7 × 8 + 7 × 1 = 448 + 56 + 7 = 511.

How do I convert octal to decimal by hand?

Write the powers of eight (1, 8, 64, 512…) under the octal digits from the right, multiply each digit by the power above it, and add the results. For 25 that is 2 × 8 + 5 × 1 = 21.

Why do I get an error when I type 8 or 9?

Because 8 and 9 are not octal digits. Octal counts with only eight symbols, 0 through 7, so the converter names the invalid digit and stops rather than silently producing a wrong answer.

What does the octal number 755 mean in file permissions?

On Unix and Linux systems, 755 is a permission code: each octal digit is three permission bits, so 7 (111) means read, write and execute, and each 5 (101) means read and execute. As a plain number, octal 755 is 493 in decimal.

Is octal 10 the same as decimal 10?

No. Octal 10 is 8 in decimal — one group of eight and nothing left over. The digits look identical to decimal 10, which is exactly why it pays to check which base a number is written in before using it.

Disclaimer: Results are conversions for guidance only. Values are exact whole-number conversions; for legal, medical, or safety-critical use, confirm with an official source or a qualified professional.