Octal to Decimal Converter
Convert between octal (base-8) and decimal (base-10) numbers with step-by-step place value calculations.
Octal to Decimal Converter
Calculator
Adjust values & calculateEnter your values below. Every result is computed in your browser โ no data is sent to any server.
Formula: Decimal = Sum of (octal_digit x 8^position)
Worked example โ Octal 644 = 420 decimal (rw-r--r-- permission)
Formula
Decimal = Sum of (octal_digit x 8^position)
Each octal digit is multiplied by 8 raised to the power of its position, counting from the right starting at 0. The sum of all these products gives the decimal equivalent. For the reverse, repeated division by 8 with remainders read bottom-to-top produces the octal representation.
Worked Examples
Example 1: Unix File Permission
Problem:Convert octal permission 644 to decimal to understand the permission bits.
Solution:6 x 8^2 = 6 x 64 = 384 4 x 8^1 = 4 x 8 = 32 4 x 8^0 = 4 x 1 = 4 Sum = 384 + 32 + 4 = 420
Result:Octal 644 = 420 decimal (rw-r--r-- permission)
Example 2: Octal to Decimal Conversion
Problem:Convert octal 1750 to decimal.
Solution:1 x 8^3 = 1 x 512 = 512 7 x 8^2 = 7 x 64 = 448 5 x 8^1 = 5 x 8 = 40 0 x 8^0 = 0 x 1 = 0 Sum = 512 + 448 + 40 + 0 = 1000
Result:Octal 1750 = 1000 decimal
Frequently Asked Questions
How do you convert octal to decimal manually?
To convert an octal number to decimal, assign each digit a positional power of 8, starting from the rightmost digit at position 0. Multiply each digit by 8 raised to its position, then add all the products together. For example, octal 745 becomes: 7 times 64 (448) plus 4 times 8 (32) plus 5 times 1 (5), totaling 485 in decimal.
What are some real-world applications of octal numbers?
Octal numbers are primarily used in computing contexts. The most common application is Unix and Linux file permissions, where three octal digits represent read (4), write (2), and execute (1) permissions for owner, group, and others. Octal was also historically used in older computer systems like the PDP-8 and early IBM mainframes. Some programming languages use an octal prefix (like leading zero in C) to denote octal literals.
Why does each octal digit correspond to exactly three binary digits?
Since 8 equals 2 raised to the third power, each octal digit represents exactly three binary digits (bits). The octal digit 0 maps to 000, 1 to 001, up through 7 which maps to 111. This direct correspondence makes octal a convenient shorthand for binary, since you can convert between them by simply grouping or expanding three bits at a time without any arithmetic.
How is octal different from hexadecimal?
Octal is base-8 and uses digits 0 through 7, while hexadecimal is base-16 and uses digits 0 through 9 plus letters A through F. Each octal digit represents 3 binary digits, whereas each hex digit represents 4 binary digits. Hexadecimal is more commonly used in modern computing because it aligns with 8-bit bytes (two hex digits per byte), while octal is mainly seen in Unix file permissions and some legacy systems.
Can octal numbers contain the digits 8 or 9?
No, valid octal numbers can only contain digits 0 through 7. The digit 8 or 9 would be invalid in the octal system because base-8 only needs eight symbols. If you see 8 or 9 in a number that you expect to be octal, it is either an error or the number is actually in a different base such as decimal. Many programming languages will throw a syntax error if you use 8 or 9 in an octal literal.
How do you convert a decimal number to octal by repeated division?
Divide the decimal value by 8, write down the remainder, then divide the quotient by 8 again, repeating until the quotient reaches zero. Reading the remainders from last to first gives the octal digits. Take 200: 200 divided by 8 is 25 remainder 0, then 25 divided by 8 is 3 remainder 1, then 3 divided by 8 is 0 remainder 3, so the octal form is 310. Checking with place values, 3 times 64 plus 1 times 8 plus 0 gives 200.
How do Unix file permissions use octal?
Permissions are three groups of three bits covering owner, group and others, and each group of three bits fits exactly one octal digit. Read is 4, write is 2 and execute is 1, so adding the values gives the digit. Mode 755 means the owner has 4 plus 2 plus 1, or rwx, while group and others have 4 plus 1, or r-x. Mode 644 gives the owner read and write and everyone else read only. That neat three bits per digit mapping is why chmod uses base 8 rather than hexadecimal.
How do you convert octal directly to hexadecimal?
Go through binary, because octal groups bits in threes and hexadecimal groups them in fours, so there is no direct digit to digit mapping. Expand each octal digit into three bits, join the bits into one string, then regroup into four bit nibbles from the right, padding with leading zeros. Octal 755 becomes 111 101 101, which is 111101101, regrouped as 0001 1110 1101, giving hexadecimal 1ED. Both equal decimal 493, which is a quick way to check the work.
How are octal literals written in programming languages?
C and older C derived languages mark an octal literal with a leading zero, so 0755 is decimal 493 while 755 is decimal 755. That silent difference is a classic source of bugs when a zero padded value such as an area code or a date field is pasted into source code. Modern languages use an explicit prefix instead, with 0o755 in Python 3 and current JavaScript, which removes the ambiguity. Configuration formats such as JSON have no octal literal at all, so file modes there are usually quoted strings.
Can octal represent fractions after the point?
Yes, and the place values continue the same pattern with negative exponents. The first digit after the octal point carries a weight of one eighth, the next one sixty fourth, then one five hundred and twelfth. So 0.5 in octal is five eighths, which is 0.625 in decimal, and 0.14 in octal is one eighth plus four sixty fourths, which is 0.1875. Fractions whose denominators are not powers of two repeat forever in octal, exactly as one third repeats in decimal, so such conversions are always approximations.
References
Reviewed for accuracy by Manoj Kumar, Mathematics Educator ยท Editorial policy
Related Calculators
๐งฎBinaryto Octal Converter
Calculate binaryto octal converter with inputs, formulas, and instant results.
๐งฎDecimalto Octal Converter
Calculate decimalto octal converter with inputs, formulas, and instant results.
๐งฎHexadecimal to Decimal Converter
Calculate hexadecimal to decimal converter with inputs, formulas, and instant results.
๐งฎBytes Converter
Convert between bytes, KB, MB, GB, TB, and PB in both binary and decimal systems.
๐งฎTorque Unit Converter
Calculate torque unit converter with inputs, formulas, and instant results.
๐งฎElectrical Resistance Converter (ฮฉ, kฮฉ, Mฮฉ)
Calculate electrical resistance unit converter with inputs, formulas, and instant results.
๐งฎTime Unit Converter
Calculate time unit converter with inputs, formulas, and instant results.
๐งฎArea Converter
Calculate area converter with inputs, formulas, and instant results.