Decimal to octal converter

Type a decimal number to get it in octal, base 8, or use the base converter for any other base. 255 becomes 377 and 493 becomes 755. Paste a list with one number per line to convert them all.

Octal to decimal

Show the working
One number per line, or separate them with spaces.0 numbers
Reviewed bySam Siewert
Last updated · How we test

Runs in your browser. Nothing you type is uploaded.

How to convert decimal to octal

  1. Divide the number by 8. Write down the whole-number answer and the remainder.
  2. Divide that answer by 8 again, and keep going until the answer is 0.
  3. Read the remainders from the last one to the first. That is the octal number.

Every remainder is between 0 and 7, so it is already an octal digit. The decimal to binary converter and the decimal to hex converter follow the same steps with 2 or 16 in place of 8. The converter shows this division table under "Show the working".

Decimal to octal example: 493 divided by 8 is 61 remainder 5, 61 divided by 8 is 7 remainder 5, and 7 divided by 8 is 0 remainder 7. Reading the remainders from the bottom gives 755.

Decimal to octal example: 100

DivideQuotientRemainder
100 ÷ 8124
12 ÷ 814
1 ÷ 801

Read up from the bottom: 1, 4, 4. So 100 in decimal is 144 in octal. Check it the other way with the octal to decimal converter, or by hand: 1 × 64 + 4 × 8 + 4 = 100.

Decimal to octal chart

Decimal to octal chart: 7 is 7, 8 is 10, 10 is 12, 16 is 20, 64 is 100, 100 is 144, 255 is 377, 493 is 755, 512 is 1000 and 1000 is 1750.
DecimalOctalDecimalOctal
11911
771012
8101620
324064100
100144128200
255377256400
512100010001750

Fractions and negative numbers

For the part after the point, multiply by 8 and keep the whole-number part as the next digit. 0.5 × 8 = 4, so 0.5 is 0.4 in octal. Some fractions never end: 0.1 becomes 0.06314631... and the tool stops after 32 digits and tells you the digits repeat. A minus sign is kept as it is, so -8 becomes -10.

Output options

Pick "0o prefix" in the Output menu to get values ready for Python or JavaScript, such as 0o755. In C and older JavaScript a leading 0 means octal (MDN's guide to JavaScript number literals calls it legacy syntax), so 0755 and 755 are different numbers in code.

Frequently asked questions

How do you convert decimal to octal?

Divide by 8 again and again and write down each remainder. The remainders read from bottom to top are the octal digits.

What is 10 in octal?

12. 10 ÷ 8 is 1 with remainder 2.

What is 1000 in octal?

1750. The check is 1 × 512 + 7 × 64 + 5 × 8 + 0 = 1000.

Is there a decimal to octal formula?

Yes: keep taking n mod 8 for the next digit from the right and replace n with n ÷ 8, rounded down, until n is 0.

Why does octal 10 equal decimal 8?

Octal only has the digits 0 to 7, so after 7 it carries one into the next place. That place is worth 8.

Scroll to Top