Decimal to Octal Converter
Convert base-10 numbers to base-8 and back, with the division steps shown so you can check the result by hand.
Octal (base 8)
Enter a decimal number.
How it was calculated
Digits 0–7 only.
Decimal (base 10)
Enter an octal number.
How the conversion works
Octal is base 8, so each position represents a power of 8. To convert from decimal, divide by 8 repeatedly and collect the remainders:
Worked example. Convert 100 to octal:
100 ÷ 8 = 12remainder412 ÷ 8 = 1remainder41 ÷ 8 = 0remainder1
Reading the remainders from the bottom up gives 144. Checking the other way:
1×8² + 4×8¹ + 4×8⁰ = 64 + 32 + 4 = 100
Common values
| Decimal | Octal | Where you see it |
|---|---|---|
| 0 | 0 | Zero |
| 8 | 10 | Base rollover |
| 64 | 100 | 8² |
| 100 | 144 | Worked example |
| 255 | 377 | Maximum 8-bit value |
| 420 | 644 | Common Unix file permission |
| 493 | 755 | Common Unix file permission |
| 511 | 777 | Full permissions |
| 4095 | 7777 | Maximum 12-bit value |
Frequently asked questions
- How do you convert decimal to octal by hand?
- Repeatedly divide the number by 8 and keep each remainder. Read the remainders from last to first. For 100: 100/8 = 12 remainder 4, 12/8 = 1 remainder 4, 1/8 = 0 remainder 1, giving 144 in octal.
- Why is octal used in computing?
- Octal groups binary neatly into sets of three bits, which made it a compact way to read binary on early computers. It is still most visible today in Unix file permissions, where values such as 755 encode read, write and execute rights.
- Can this tool handle negative numbers?
- Yes. The sign is preserved and applied to the converted value, so −100 decimal becomes −144 octal.
- What about numbers too large for JavaScript?
- Values beyond about 15 digits lose precision because JavaScript numbers are double-precision floats. For everyday use this is not a problem, but for cryptographic-size integers use a big-integer library instead.
- Is my data uploaded anywhere?
- No. The conversion runs entirely in your browser; nothing is sent to a server.
Related tools
Text ↔ Binary
Convert text to binary using real UTF-8.
JSON ↔ XML
Two-way developer format conversion.
Epoch → Date
Turn a Unix timestamp into a readable date.
RGB ↔ HEX
Two-way color conversion with live preview.
UTC → EST
US Eastern time with automatic daylight saving.
BPM → Milliseconds
Note lengths in ms for delay timing.
Last updated: August 31, 2026