Decimal to octal converter

Enter a decimal number to get its octal form with each step of repeated division by 8.

Loading the tool…

Processing and privacy: The result is calculated inside your browser and your data is not sent to any server.

How to use it

  1. Enter decimal number and fraction digits if it does not end.
  2. The result appears straight away and updates as you edit.
  3. Copy the result, or copy a link that keeps the same values to share it.

How it is calculated

Whole part: divide by 8 again and again, note each remainder and read the remainders from last to first. Fraction part: multiply the fraction by 8 again and again and take the whole digit each time.

Example

Inputs: Decimal number = 100, Fraction digits if it does not end = 24. Result: Result in octal: 144.

100
144

Limits and caveats

  • Negative numbers keep a minus sign in front of the magnitude; they are not shown in two's complement.
  • Up to 2000 digits before the point and 200 after it.
  • A fraction that does not end in the new base is cut at the number of digits you choose, without rounding.

Questions about this tool

How do I convert 100 to octal?

100 ÷ 8 = 12 r4, then 12 ÷ 8 = 1 r4, then 1 ÷ 8 = 0 r1. Read bottom up: 144.

How do I get a Linux permission from a decimal number?

Convert it straight to octal: 493, for example, becomes 755.

Do decimal fractions always end in octal?

No. 0.1 repeats forever, so the tool cuts it at the digit count you choose and shows the repeating part.