Skip to content
RK Calculator
Menu

Decimal to Octal Converter

Convert decimal numbers to octal, including fractions and negative numbers, with the working shown.

Change the values and press Calculate to work out your own figures.

Enter a decimal number to write it in octal.

About decimal numberFor example 170 or 10.625.
Result
In octal
252
In binary
10101010
In hexadecimal
AA

170 in decimal is 252 in octal.

Show the working
  1. 170 ÷ 8 = 21 remainder 2
  2. 21 ÷ 8 = 2 remainder 5
  3. 2 ÷ 8 = 0 remainder 2
  4. Read the remainders from the bottom up for the whole part
  5. 170₁₀ = 252₈

How to use it

Enter a decimal number to write it in octal.

Letters stand for digits above 9 (A = 10 … Z = 35) and can be typed in either case; prefixes such as 0b and 0x, spaces and underscores are ignored. Show the working gives each step.

Key facts

decimal → octal: place values Σ dᵢ × bⁱ; repeated division by the new base

How the conversion works

To decimal, multiply each digit by its place value (a power of the base) and add; from decimal, divide by the base repeatedly and read the remainders from the bottom up (for a fraction, multiply by the base and read off the whole parts).

Questions

What is 170 in octal?

252.

Can I convert fractions?

Yes. Digits after the point are converted exactly; if they repeat forever in the new base, the repeating block is shown in parentheses.

Formulas

decimal → octal: place values Σ dᵢ × bⁱ; repeated division by the new base

Sources

Limitations

  • Numbers have at most 1,000 characters; Roman numerals cover whole numbers from 1 to 3,999,999.

Formula version 0.1.0Reviewed