Decimal to Octal Converter

Octal and binary forms of a decimal number, as used in chmod permissions.

How it is calculated

The tool takes a whole decimal number of zero or more and writes it in base 8, and also in base 2 for comparison. The conversion is repeated division: divide by 8, keep the remainder, divide the quotient by 8 again, and stop when the quotient reaches 0. The remainders read from last to first are the octal digits. As a formula, N = dk×8k + ... + d1×8 + d0, with every digit d between 0 and 7. A string of plain digits is read exactly, so integers all the way up to 9,223,372,036,854,775,807 (263 − 1) convert without rounding; anything larger gives no result. Negative numbers, fractions and text also give no result. A leading zero is ignored: 0755 is read as the decimal number 755, not as octal.

Worked example

Convert 493. Step 1: 493 ÷ 8 = 61 remainder 5. Step 2: 61 ÷ 8 = 7 remainder 5. Step 3: 7 ÷ 8 = 0 remainder 7. Reading the remainders from last to first gives 755. Check: 7×64 + 5×8 + 5 = 448 + 40 + 5 = 493. The binary form shown beside it is 111101101, which is simply 111, 101, 101: three bits for each octal digit.

Try this example →

Common mistakes

  • Reading the remainders from first to last instead of last to first, which gives 557 instead of 755.
  • Entering a number that is already octal. The field takes a plain decimal number: 0755 is treated as 755 and becomes 1363 in octal, and a prefix such as 0o755 gives no result.
  • Entering a negative number or one with a decimal part such as 3.5. The tool handles whole numbers from 0 upward and shows nothing otherwise.
  • Typing a chmod value like 755 and expecting the permission bits. Here 755 is decimal and becomes 1363 in octal; the permission 755 is already octal, which is 493 in decimal.
  • Pasting a number with thousands separators. 1 000 and 1,000 give no result, and 1.000 is read as the number 1 (a decimal point), not one thousand, so remove the separators first.

About this calculator

Octal is a base-8 positional numbering system using only the digits 0–7, converted from decimal by repeated division by 8 and reading the remainders in reverse order — so decimal 83 becomes octal 123 (83 = 1×64 + 2×8 + 3). Each octal digit maps neatly onto exactly three binary bits, which made it a convenient shorthand for binary in the early computing era.

Octal's clearest surviving use today is Unix and Linux file permissions: the familiar chmod 755 or 644 notation is octal, with each digit's three bits representing read, write, and execute permissions for owner, group, and others — a convention that dates back to early Unix systems and remains standard in system administration and scripting today.

Was this helpful?

You can pick up to 3 reactions.

Comments (1)

  • Editorial team

    Octal shows up in two everyday places: Unix file modes and character escapes in C-style strings. Decimal 65, the letter A, is 101 in octal, which is why the escape for it is written as a backslash followed by 101. Each octal digit equals three binary bits, so the binary line is easy to cross-check. Would octal back to decimal or hexadecimal be more useful to you?

Popular calculators

All Calculators