How to convert Decimal to Octal
To convert decimal to octal, divide the number by 8 repeatedly, writing down the remainder each time, until the quotient reaches zero. The remainders, read from the last to the first, are the octal digits.
Worked example
Convert 1958 (decimal) to octal:
- 1958 ÷ 8 = 244, remainder
6 - 244 ÷ 8 = 30, remainder
4 - 30 ÷ 8 = 3, remainder
6 - 3 ÷ 8 = 0, remainder
3 - Read the remainders bottom-up:
3646
So 1958 in decimal is 3646 in octal.
Decimal to Octal conversion table
| Decimal | Octal |
|---|---|
| 0 | 0 |
| 1 | 1 |
| 2 | 2 |
| 3 | 3 |
| 4 | 4 |
| 5 | 5 |
| 6 | 6 |
| 7 | 7 |
| 8 | 10 |
| 9 | 11 |
| 10 | 12 |
| 11 | 13 |
| 12 | 14 |
| 13 | 15 |
| 14 | 16 |
| 15 | 17 |
Frequently asked questions
- Can this handle numbers larger than 64 bits?
- Yes. Conversion runs on arbitrary-precision integers, so numbers of any length convert exactly. Many online converters silently lose precision above 2⁵³ (about 16 decimal digits) — this one doesn't.
- How do I convert negative numbers?
- A leading minus sign works in every base. For the bit-pattern view programmers usually want, switch the mode to two's complement at 8, 16, 32, or 64 bits — then binary, octal, and hex show the bit pattern while decimal shows the signed value.
- Can I convert the other way, or to other bases?
- Use the Octal to Decimal converter, or just change the From/To dropdowns above — every common base is shown at once anyway, and a Text mode converts ASCII to bytes and back.
Need arithmetic rather than conversion — adding hex numbers, shifting bits, masking? Use the programmer's calculator.