Octal To Decimal Converter
Enter the octal value to convert to decimal or Decimal to Octal.
Octal:
Octal (Base-8) uses digits 0-7. It was historically used in computing as a shorthand for binary (each octal digit = 3 binary digits).
Decimal:
Decimal (Base-10) is the universal number system for everyday calculations.
How to Convert Octal to Decimal — Formula:
Decimal = Σ(dᵢ × 8ⁱ) where dᵢ is each octal digit and i is its position from right.
Example: Octal 755 = (7×8²) + (5×8¹) + (5×8⁰) = 448 + 40 + 5 = 493 decimal.
Technical Details:
Unix file permissions use octal: 7=rwx (read+write+execute), 5=r-x (read+execute), 0=--- (no permissions). chmod 755 = rwxr-xr-x.
Octal To Decimal Converter:
Convert octal numbers to decimal. Octal is still used in Unix/Linux file permissions (e.g., chmod 755).
Binary ↔ Hex ↔ Octal: Grouping Relationship
Binary → Hex (group by 4 bits):
Binary → Octal (group by 3 bits):
Frequently Asked Questions
How do I convert Octal to Decimal?
Decimal = Σ(dᵢ × 8ⁱ) where dᵢ is each octal digit and i is its position from right.
What is the Octal number system?
Octal (Base-8) uses digits 0-7. It was historically used in computing as a shorthand for binary (each octal digit = 3 binary digits).
What is the Decimal number system?
Decimal (Base-10) is the universal number system for everyday calculations.
Where is Octal to Decimal conversion used?
Unix file permissions use octal: 7=rwx (read+write+execute), 5=r-x (read+execute), 0=--- (no permissions). chmod 755 = rwxr-xr-x.
Can I convert large octal numbers?
Yes. This converter handles numbers of any practical size. For very large numbers, the conversion is performed using arbitrary-precision arithmetic to ensure accuracy.
How to Convert Octal to Decimal (Base-8 to Base-10)
Octal-to-decimal conversion uses positional notation where each digit is multiplied by the corresponding power of 8. This is needed when interpreting Unix file permissions (e.g., what decimal number does chmod 755 represent?), working with octal literals in code, or converting legacy system data.
- Assign position values starting from 0 on the right: 8⁰, 8¹, 8², etc.
- Multiply each octal digit by its positional power of 8.
- Sum all the products.
- Example: 755₈ → 7×8² + 5×8¹ + 5×8⁰ = 448 + 40 + 5 = 493₁₀.
Octal to Decimal: Key Values
Important octal numbers and their decimal equivalents:
| Input | Output |
|---|---|
| 7 | 7 |
| 10 | 8 |
| 77 | 63 |
| 100 | 64 |
| 377 | 255 |
| 400 | 256 |
| 644 | 420 |
| 755 | 493 |
| 777 | 511 |
| 1000 | 512 |
| 1750 | 1000 |
| 10000 | 4096 |
Solved Examples: Octal to Decimal
Question 1: What decimal value does the octal permission 644 represent?
Solution:
6 × 8² = 6 × 64 = 384
4 × 8¹ = 4 × 8 = 32
4 × 8⁰ = 4 × 1 = 4
Sum: 384 + 32 + 4 = 420
Answer: 644₈ = 420₁₀ — the internal numeric value the kernel stores for rw-r--r-- permissions.
Question 2: Convert octal 1750 to decimal.
Solution:
1 × 8³ = 1 × 512 = 512
7 × 8² = 7 × 64 = 448
5 × 8¹ = 5 × 8 = 40
0 × 8⁰ = 0
Sum: 512 + 448 + 40 + 0 = 1000
Answer: 1750₈ = 1000₁₀ — a convenient round decimal number.
Question 3: A legacy system stores value 5765₈. Convert to decimal.
Solution:
5 × 8³ = 5 × 512 = 2560
7 × 8² = 7 × 64 = 448
6 × 8¹ = 6 × 8 = 48
5 × 8⁰ = 5 × 1 = 5
Sum: 2560 + 448 + 48 + 5 = 3061
Answer: 5765₈ = 3061₁₀.
Practice: Octal to Decimal
Try solving these on your own to test your understanding:
- Convert 77 (octal) to decimal. (Answer: 63)
- Convert 100 (octal) to decimal. (Answer: 64)
- Convert 755 (octal) to decimal. (Answer: 493)
- Convert 377 (octal) to decimal. (Answer: 255)
- Convert 2000 (octal) to decimal. (Answer: 1024)
- Convert 12345 (octal) to decimal. (Answer: 5349)
The Octal Bug in JavaScript
In older JavaScript (pre-ES5), parseInt("010") returned 8 because the leading zero triggered octal parsing. This caused subtle bugs when processing user input like zip codes or phone numbers. Modern JavaScript with parseInt("010", 10) or Number("010") correctly returns 10. However, octal literals using 0o prefix are intentional: 0o755 === 493 in modern JS. Always specify the radix parameter to avoid ambiguity.
Octal in Embedded Systems and IoT
Some embedded systems and microcontrollers still use octal for configuration registers when the register width is a multiple of 3 bits. An 18-bit configuration register displays cleanly as 6 octal digits but awkwardly as 4.5 hex digits. When reading datasheets for older or specialized hardware, you may encounter octal register maps that require conversion to decimal for calculations or to binary for bit-field analysis.
Key Takeaways
- Multiply each octal digit by 8^position, then sum.
- Powers of 8: 1, 8, 64, 512, 4096, 32768.
- chmod 755 = 493₁₀, chmod 644 = 420₁₀, chmod 777 = 511₁₀.
- Leading-zero octal literals in C/JS are a classic bug source.
- Octal fits cleanly when data widths are multiples of 3 bits.
- For single octal digits, no conversion needed (0-7 same in decimal).