Search tools

Find a tool by name or what it does.

Decimal to Octal

Convert decimal to octal and back, with exact results for numbers of any length.

Conversion

Numbers of any length convert exactly. Add a leading minus sign for negative values.

How many octal digits to compute after the point. Many decimal fractions repeat forever in octal, so long fractions are rounded to this many places.

Result

Octal
52
Remainder steps (integer part)
Quotient ÷ 8Remainder
422
55

How to convert decimal to octal online

  1. Pick a direction

    Choose Decimal to octal or Octal to decimal depending on which value you have.

  2. Enter the number

    Type an integer or a number with a decimal point, with a leading minus sign for negative values.

  3. Adjust the octal places

    When converting decimal to octal, set how many digits to compute after the point for fractional values.

  4. Read the result and steps

    The converted value appears instantly, along with a step-by-step breakdown of how it was built.

Why use this tool

Exact for any length

Integer conversion uses full-precision arithmetic, so a 50-digit number converts exactly instead of losing digits to rounding.

Both directions

Swap between decimal to octal and octal to decimal with one click, without retyping the number.

Fractional parts included

Numbers with a decimal point convert too. Decimal fractions are computed out to a chosen number of octal places, since many repeat forever in base 8.

Step-by-step breakdown

See the remainder chain used to build an octal result, or the place-value breakdown used to read an octal number back into decimal.

Negative numbers

A leading minus sign converts correctly and carries through to the result.

Runs entirely in your browser

Every conversion happens on your device as you type. Nothing is uploaded or stored.

About this tool

Octal is base 8, a number system built from the digits 0 through 7 instead of the familiar 0 through 9 of decimal. It shows up in file permission codes, some older computing conventions, and any context where grouping bits in threes is convenient, since three binary digits map exactly to one octal digit. This tool converts between the two, either direction, without losing precision.

The integer part of a number converts exactly no matter how long it is, using the same remainder method taught by hand: repeatedly divide by 8 and read the remainders in reverse. That chain of steps is shown underneath the result, capped at a readable number of rows for very long numbers, while the actual result above still reflects the full-precision value. Converting octal back to decimal shows the mirror process instead, breaking the number into digit times place-value contributions that sum to the decimal total.

Numbers with a fractional part work too, though the two bases do not always agree on what terminates. A decimal fraction like 0.1 repeats forever once written in octal, so the octal places setting controls how many digits to compute before rounding, with a note when the result is an approximation. Octal fractions always convert to an exact, finite decimal value. For the same numbers in other bases, see the full number base converter, or convert straight to binary or hexadecimal.

Frequently asked questions

What is octal used for?
Octal, base 8, groups binary digits in threes, which made it a convenient shorthand on early computers and is still used today for Unix file permission codes like 755.
Does it handle very large numbers?
Yes. Integer conversion uses full-precision arithmetic rather than standard floating-point math, so numbers dozens of digits long still convert exactly.
Why is my decimal fraction rounded in octal?
Many decimal fractions, like 0.1, do not terminate when written in base 8, the same way 1/3 does not terminate in decimal. The octal places setting controls how many digits are computed before rounding.
Can I convert negative numbers?
Yes. Add a leading minus sign to the input and the sign carries through to the converted result.
What do the remainder steps show?
For decimal to octal, each row divides the running quotient by 8 and records the remainder; reading the remainders bottom to top spells out the octal digits. For octal to decimal, the rows instead show each digit multiplied by its place value.
Is my number uploaded anywhere?
No. Every conversion runs in your browser, and nothing is sent to a server or stored.

Related tools