Decimal to Octal Converter

Decimal ↔ Octal Converter

Convert between decimal (base 10) and octal (base 8) number systems. Octal is commonly used in Unix file permissions and legacy computing systems.

Last updated: March 2026 | By Patchworkr Team

Result will appear here...

What is Octal?

Octal is a base-8 number system that uses eight distinct symbols: 0, 1, 2, 3, 4, 5, 6, and 7. It was historically popular in computing because three binary digits (bits) can be represented by exactly one octal digit, making it a convenient shorthand for binary representations.

Octal is most commonly encountered in Unix and Linux file permissions (like 755 or 644), where each digit represents read, write, and execute permissions for owner, group, and others. It's also used in some legacy programming contexts and embedded systems.

While hexadecimal has largely replaced octal in modern computing (because 4 bits map to 1 hex digit), octal remains important for file permissions and understanding older codebases.

How to Convert

Decimal to Octal

Repeatedly divide by 8 and take remainders:

Step 1: Divide the decimal number by 8
Step 2: Record the remainder (this becomes the rightmost digit)
Step 3: Divide the quotient by 8 again
Step 4: Repeat until quotient is 0
Step 5: Read remainders in reverse order (bottom to top)

Octal to Decimal

Multiply each digit by 8 raised to its position:

Position 0 (rightmost): multiply by 8⁰ = 1
Position 1: multiply by 8¹ = 8
Position 2: multiply by 8² = 64
Position 3: multiply by 8³ = 512
Sum all values to get the decimal result

Example Conversion

Convert 100 (octal) to decimal:

Breakdown:
Identify each position:
1 0 0 → positions 2, 1, 0
Calculation:
Multiply each digit by 8 raised to its position:
Position 2: 1 × 8² = 1 × 64 = 64
Position 1: 0 × 8¹ = 0 × 8 = 0
Position 0: 0 × 8⁰ = 0 × 1 = 0
Sum:
Add all values together:
64 + 0 + 0 = 64
Final Answer:
100₈ = 64₁₀

Frequently Asked Questions

Why is octal used for file permissions?

Unix file permissions use 3 bits for read (4), write (2), and execute (1). One octal digit (0-7) perfectly represents these 3 bits, making permissions like 755 or 644 compact and easy to work with.

What's the largest single octal digit?

7 is the largest octal digit, representing decimal 7. Since octal is base-8, it only uses digits 0 through 7. If you see an 8 or 9, it's not a valid octal number.

How do you identify an octal number?

Octal numbers are often prefixed with '0' (zero) in programming languages like C. For example, 0755 is octal. Without context, only numbers using digits 0-7 can be octal.

Why is octal less popular than hex?

Hexadecimal (base-16) aligns better with modern computing where bytes (8 bits) are standard. Two hex digits represent one byte exactly, while octal requires different groupings.

Can you convert octal to binary easily?

Yes! Each octal digit converts to exactly 3 binary digits. For example, octal 5 = binary 101, and octal 7 = binary 111. This makes octal-binary conversion straightforward.

What does chmod 755 mean?

In Unix/Linux, 755 means: owner has full permissions (7=rwx), group can read and execute (5=rx), and others can read and execute (5=rx). Each digit is an octal representation of permission bits.

Is octal still used in modern programming?

Octal is less common in modern programming but still appears in file permissions, some embedded systems, and when working with legacy code. Hexadecimal has largely replaced it for most purposes.

What's 777 in file permissions?

777 (octal) gives full permissions (read, write, execute) to everyone: owner, group, and others. It's generally considered insecure as it allows anyone to modify or execute the file.

Related Tools