Convert a decimal number to octal by repeated division by 8, with every division and remainder shown for your input. The classic use is Unix permission masks.
Show calculation steps
Processed privately in your browser — nothing you paste is uploaded, logged or stored.
Division by eight
The change-of-base algorithm with divisor 8: repeatedly divide, collect remainders 0–7, read bottom-up. No letters are needed — octal is the largest common base whose digits stay within decimal symbols — which historically made it printer-friendly shorthand.
The steps panel lists each division for your input, doubling as a worked tutorial in the method that generalises to every base.
Worked example
Input: 493 493 ÷ 8 = 61 r 5 61 ÷ 8 = 7 r 5 7 ÷ 8 = 0 r 7 Read upward: 755
| Power | Value |
|---|---|
| 8^0 | 1 |
| 8^1 | 8 |
| 8^2 | 64 |
| 8^3 | 512 |
| 8^4 | 4096 |
| 8^5 | 32768 |
| 8^6 | 262144 |
The permissions round trip
That example is no accident: 493 is what stat() returns in decimal for mode 755. APIs that expose permissions as plain integers force exactly this conversion on developers — in both directions — and getting it wrong produces silently mis-permissioned files. The pairing page (Octal to Decimal) closes the loop.
Sizing rule
Each octal digit covers three bits, so digit count ≈ bit count / 3: values under 512 need three digits, under 4096 four. Compare hex’s four bits per digit — octal is one notch less dense, one notch more keyboard-friendly.
Exactness and privacy
BigInt-exact at any magnitude; fractions route to the Decimal Fraction to Octal page where repeat detection lives. Digits are validated with positions. Local computation only — nothing transmitted.
How to use the Decimal to Octal Converter
- Enter the decimal number.
- Click "Convert to octal".
- The steps show each division by 8 and its remainder – read bottom-up for the answer.
- Copy the octal result.
Frequently asked questions
How does division by 8 produce octal digits?
Each division extracts the number of 8s and a leftover 0-7; the leftover is the next digit from the right. 493 ÷ 8 = 61 r 5, 61 ÷ 8 = 7 r 5, 7 ÷ 8 = 0 r 7 → read up: 755.
Why is 493 = 755 octal a famous pair?
Because chmod 755 – the standard permission set rwxr-xr-x – IS decimal 493. Tools that display permissions in decimal produce exactly this confusion, which the converter untangles.
How many octal digits will a number need?
Roughly one per three bits: numbers to 511 fit three octal digits (9 bits), to 4095 four digits. It is the same bound as binary, grouped in threes.
Does the converter handle huge decimals?
Yes – the division loop runs in BigInt, so any length stays exact. There is no float involved at any point.
What about a decimal with a fraction like 7.5?
Use the Decimal Fraction to Octal converter – fractions need the multiplication method and can repeat; this page is exact integers only and says so rather than rounding.
How can I verify the result?
Recompute the last digit: your number mod 8 must equal it (493 mod 8 = 5 ✓). Or round-trip through the Octal to Decimal converter, which sums place values back.
Where does the arithmetic run?
In your browser. Values are never transmitted – the steps you see were generated on your device.