Decimal to Octal: Convert Base 10 into Base 8
Decimal numbers use ten digits, from 0 to 9. Octal uses eight digits, from 0 to 7. A decimal to octal conversion rewrites a whole-number value in base 8 without changing its quantity. For instance, decimal 100 is octal 144 because 1×64 + 4×8 + 4 equals 100. The calculator above converts one decimal integer or a space-separated list of values.
This guide explains the repeated-division method, shows how to verify results with octal place values, and describes the calculator’s input limits. It accepts non-negative whole numbers through 9007199254740991, the largest integer JavaScript represents exactly. Decimal fractions such as 0.513 require a separate fractional method and are not accepted by this integer converter.
How to Convert Decimal to Octal
The standard decimal to octal how to method uses repeated division by eight. Each remainder is an octal digit because dividing by 8 always leaves a remainder from 0 through 7. The first remainder found is the rightmost digit, so the remainder list must be reversed after the last division.
- Divide the decimal number by 8. Keep the whole-number quotient and the remainder.
- Record the remainder. It becomes one octal digit between 0 and 7.
- Continue with the quotient. Divide that quotient by 8 and record its remainder.
- Stop when the quotient reaches zero.
- Read the remainders in reverse order. This sequence is the octal result.
For decimal 123, the divisions are 123 ÷ 8 = 15 remainder 3; 15 ÷ 8 = 1 remainder 7; and 1 ÷ 8 = 0 remainder 1. Read the remainders from last to first: 173. Therefore, 123₁₀ = 173₈.
“Divide by eight, record each remainder, then reverse the remainders to write the octal digits.”
A Second Method: Use Powers of Eight
Octal place values are powers of eight: 1, 8, 64, 512, and so on. To convert 123, begin with the largest power of 8 that fits, which is 64. One 64 fits, leaving 59. Seven 8s fit into 59, leaving 3. The final units digit is 3. The counts form 173₈, which expands to 1×64 + 7×8 + 3.
The place-value approach is helpful for checking an answer or understanding what each octal digit represents. Repeated division is often more systematic when converting an unfamiliar number, while place values make it easy to verify the result afterward.
Decimal to Octal Conversion Table
This decimal to octal conversion table lists common values, including the requested examples. For verification, expand each octal result using powers of eight. Remember that octal digits never include 8 or 9.
| Decimal (base 10) | Octal (base 8) | Place-value check |
|---|---|---|
| 0 | 0 | 0 |
| 10 | 12 | 1×8 + 2 |
| 100 | 144 | 1×64 + 4×8 + 4 |
| 1000 | 1750 | 1×512 + 7×64 + 5×8 |
| 101 | 145 | 1×64 + 4×8 + 5 |
| 111 | 157 | 1×64 + 5×8 + 7 |
| 120 | 170 | 1×64 + 7×8 |
| 123 | 173 | 1×64 + 7×8 + 3 |
| 255 | 377 | 3×64 + 7×8 + 7 |
A quick way to check a table entry is to multiply each octal digit by its place value and add the products. For example, 1750₈ equals 1×512 + 7×64 + 5×8 + 0, which is 1000 in decimal. The zero at the end is significant because it marks an empty units place.
Worked Decimal to Octal Examples
10 decimal to octal
Divide 10 by 8 to get quotient 1 and remainder 2. Divide 1 by 8 to get quotient 0 and remainder 1. Reverse the remainders to get 12₈. The check is 1×8 + 2 = 10.
100 decimal to octal
Using place values, 100 contains one 64, four 8s, and four units: 64 + 32 + 4 = 100. Its octal representation is 144₈.
1000 decimal to octal
One 512 leaves 488. Seven 64s use 448, leaving 40. Five 8s use 40, leaving no units. The digits are 1, 7, 5, and 0, so 1000₁₀ = 1750₈.
0.513 decimal to octal
The calculator handles whole numbers only, but the fractional conversion can be shown manually. Multiply the fractional part repeatedly by 8 and record each integer part: 0.513×8 gives 4 with a fractional remainder of 0.104; continue multiplying that remainder by 8. The digits begin 0.406517676355…₈. This expansion does not terminate, so it is not an input accepted by the whole-number calculator.
Convert a list of decimal values
The converter supports space-separated integers. Entering 10 100 123 returns 12 144 173 in the same order. Each value is processed independently, so the spaces separate numbers rather than forming one larger value.
Octal Digits and Their Binary Groups
Every octal digit has a direct three-bit binary equivalent because 8 is 2 raised to the third power. This relationship is useful when checking a conversion or moving between number bases: replace each octal digit with its three-bit group to get binary, or group binary digits in threes from the right to get octal. It does not change the underlying integer; it only changes how that integer is written.
| Octal digit | Value in decimal | Matching three-bit binary group |
|---|---|---|
| 0 | 0 | 000 |
| 1 | 1 | 001 |
| 2 | 2 | 010 |
| 3 | 3 | 011 |
| 4 | 4 | 100 |
| 5 | 5 | 101 |
| 6 | 6 | 110 |
| 7 | 7 | 111 |
For example, the octal digits in 173₈ map to 001 111 011. Removing the leading zero gives binary 1111011₂, which is 123 in decimal. Leading zeroes in a binary group are placeholders, not extra value. This digit-by-digit check is separate from the repeated-division method, but it offers a second way to confirm a result without converting all the way through decimal again.
Common Conversion Mistakes to Avoid
Most incorrect answers come from reversing the remainders incorrectly, using a base other than eight, or dropping a place-value zero. Keeping the quotient and remainder columns separate makes the division method easier to follow. Write each remainder beside the quotient that produced it; only reverse the remainder sequence once the quotient becomes zero. If the original number is smaller than 8, the division has a quotient of zero immediately, so that single remainder is already the complete octal answer.
- Reading remainders in the order found: The first remainder is the least-significant digit. The final remainder belongs at the left, so the order must be reversed.
- Using digits 8 or 9 in the result: Octal uses only 0 through 7. A result containing 8 or 9 signals an arithmetic or grouping error.
- Removing a zero that marks a place: In 1750₈, the final zero means there are no units. Removing it changes the value to 175₈.
- Mixing up the input and output bases: Unless a prefix or subscript says otherwise, the calculator expects the input as decimal and returns octal.
- Typing punctuation as a separator: Multiple values are separated with whitespace. Commas and decimal points are not accepted as list separators.
A quick reverse check helps catch these issues. Expand the result from right to left using powers of eight, starting with 1 and multiplying the place value by 8 at each step. For 145₈, calculate 1×64 + 4×8 + 5 = 101. If the sum matches the original decimal input, the conversion is consistent. The check is short for small answers and remains systematic for larger ones.
Where Octal Notation Is Useful
Octal is one of several positional number systems used in computing and technical work. Its digits are compact compared with binary because each octal digit represents three binary bits. This can make long bit patterns easier to scan, copy, or discuss, especially when the data naturally groups into threes. The same compactness explains why a power-of-eight expansion is a convenient way to check a decimal conversion.
Some operating systems and programming contexts also use octal notation for permission masks, constants, or legacy representations. In those settings, the meaning depends on the surrounding format: a leading zero, an explicit prefix, or a language-specific notation may indicate that a literal is octal. This web calculator instead presents plain decimal digits as the input and plain octal digits as the output. It does not add programming-language prefixes or interpret file permissions.
That distinction matters when copying a result into another application. Confirm the destination’s notation rules before pasting, and preserve any prefix or formatting that the destination requires. A bare result such as 173 is clear in this article when labeled with the octal subscript, but software may require a particular prefix to distinguish it from decimal 173. The numeric value is the same only when each side interprets its digits in the intended base.
Octal is not a text encoding. A number that happens to match a character code does not become a character merely by writing it in base 8. To interpret a sequence as text, use a converter designed for the relevant character encoding and input representation. Separating numeric base conversion from character decoding prevents a common source of confusion: a base converter preserves a number, while a text converter maps code units or bytes to symbols.
Using the Decimal to Octal Calculator
This decimal to octal converter uses the browser’s exact integer conversion for accepted values. Enter one non-negative integer, or separate several integers with whitespace, then choose Convert. The decimal to octal calculator returns base-8 digits without an octal prefix.
- Enter decimal digits only; do not use commas, decimal points, signs, or prefixes.
- Separate multiple whole numbers with spaces or line breaks.
- Each value must be from 0 to 9007199254740991.
- The complete input is limited to 500 characters.
- The output uses octal digits 0 through 7 and omits unnecessary leading zeroes.
- Use Copy to clipboard, Clear, or Ctrl+Enter to operate the tool.
Input validation matters: a value such as 10.5 is a fraction, not a whole-number code, and is rejected. So are malformed entries such as 12x. This avoids silently converting only the initial digits and gives a reliable decimal-to-octal result for every accepted value.
Integer Limits and Decimal Fractions
The calculator accepts integers no greater than 9007199254740991, also written as 2⁵³ − 1. This is JavaScript’s maximum safe integer, meaning every accepted value is represented exactly. Larger decimal integers may lose precision in ordinary JavaScript number arithmetic, so this tool reports an error instead of returning a potentially incorrect octal result.
Converting decimal to octal for whole-number input uses repeated division; it is a separate process from converting a value with digits after the decimal point.
Fractions use a different procedure. To convert a decimal fraction to octal, repeatedly multiply the fractional part by 8, record the integer digit produced, and continue with the new fractional remainder. Some fractions terminate; others repeat or continue indefinitely. For 0.513, the expansion begins 0.406517676355…₈. The current calculator is for whole numbers and does not perform this fractional conversion.
Negative numbers also require a sign convention, and computer representations may use signed formats such as two’s complement. This converter intentionally handles unsigned, non-negative whole integers only. Use a tool that explicitly supports fractions or signed values if those are part of your input.
Octal Compared with Binary, ASCII, and Other Bases
Octal is a numeric base, while ASCII is a character-encoding standard. Converting a number to octal does not turn it into text. Use Binary to Octal when the same whole-number value starts in base 2; the converter groups bits in threes. For character data, Binary to ASCII interprets binary byte values as character codes, ASCII to Binary formats decimal character codes as bytes, and ASCII to Text maps decimal codes to characters.
Choose the tool based on what your input represents: one numeric value, a sequence of character codes, or encoded bytes. The base conversion itself preserves a number’s value; character interpretation adds a separate mapping that depends on the selected encoding.
“Octal changes the notation of an integer; it does not decode characters or change the value.”
Conclusion: Divide by Eight and Reverse the Remainders
To convert decimal to octal, repeatedly divide a non-negative whole number by 8, record each remainder, and read the remainders in reverse. You can check the answer by expanding its digits as powers of eight. This calculator supports space-separated integers up to 9007199254740991 and rejects fractions, negatives, and malformed values. For fractional values such as 0.513, use the repeated-multiplication method instead.