Guide
Decimal to octal by dividing by eight
Dividing by eight is the same idea as dividing by ten when you write down the digits of a decimal number, only the base is different. This page performs the division chain and prints every line, which is what an exercise sheet or a teacher usually wants to see, and it also handles the cases where the chain would be tedious: big numbers, negatives and fractions.
The procedure
Divide the decimal number by 8 and record the whole-number quotient and the remainder. The remainder is a digit from 0 to 7. Repeat with the quotient until it reaches zero. The octal number is the remainders written in reverse order, so that the last remainder you found is the first digit. Each step strips off the lowest octal digit, in the same way that dividing by ten strips the last decimal digit.
Checking by converting back
Octal positions are worth 1, 8, 64, 512, 4,096 and so on. To verify an answer, multiply each digit by its position’s worth and add. If you get the number you began with, the conversion was right. The reverse page, octal to decimal, prints this sum for you, and the “same number in other bases” box here lets you compare the binary form, where octal digits correspond to groups of three bits.
Options
Add the 0o prefix to produce the literal that Python and modern JavaScript accept. Group digits for readability if the number is long. Paste several numbers on separate lines to convert them in one go. An invalid line gets its own message, and the valid ones are still converted.
Edge cases
Negative values are shown with a minus sign in front of the octal digits. The page does not produce complement forms. Decimal fractions work by multiplying the fractional part by 8 and taking the whole part as the next digit; 0.5 is 0.4, because half of eight is four. A fraction like 0.1 does not end and is truncated with an ellipsis.
A common confusion is to read a permission mode such as 755 as the decimal number seven hundred and fifty-five. As octal it is 493 in decimal, and that figure has no meaning for chmod.
A worked example
The Sample button loads 2026. Dividing: 2026 ÷ 8 = 253 remainder 2; 253 ÷ 8 = 31 remainder 5; 31 ÷ 8 = 3 remainder 7; 3 ÷ 8 = 0 remainder 3. Reading the remainders from the bottom gives 3752. Check: 3 × 512 is 1,536, 7 × 64 is 448, 5 × 8 is 40 and 2 is 2, which total 2,026. The box underneath adds binary 11111101010 and hexadecimal 7EA for comparison.
Limits
The page converts values. It does not decide that a number is a file mode, a character code or a date, and it does not check the result against any file system. If the target is a Unix mode, use the chmod calculator, which builds the digits from permission choices and avoids the decimal detour altogether. Octal conversions of fractions are approximate beyond 24 digits, by design.
Related tools
- Octal to Decimal shows the place-value sum for the reverse direction.
- Decimal to Binary uses divisions by two for the same number.
- Decimal to Hex uses divisions by sixteen.
- Chmod Calculator produces permission modes directly.
Checked against the current version of the Decimal to Octal on .

