
How to Convert Decimal to Octal: Steps & Examples
To convert a decimal number to octal, repeatedly divide the decimal value by 8, record the remainder at each step, and read those remainders from bottom to top. For example, decimal 83 divides down to remainders 3, 2, 1 — read bottom to top, that's octal 123.
This guide walks through why that works, the full step-by-step method, a decimal-to-octal formula, several verified worked examples, and the mistakes people most often make along the way.
What Is the Decimal Number System?
Decimal is the number system most people count in every day. It's base 10, meaning it uses ten digit symbols — 0 through 9 — and each position in a decimal number is worth a power of 10 (1, 10, 100, 1000, and so on). Decimal is also called base 10; the two terms describe the same system.
What Is the Octal Number System?
Octal is a base-8 number system. It uses only eight digit symbols, 0 through 7 — the digits 8 and 9 never appear in a valid octal number. Like decimal, octal is a positional number system, so each digit's value depends on its position, but that position is worth a power of 8 instead of a power of 10:
| Power of 8 | Value |
|---|---|
| 8⁰ | 1 |
| 8¹ | 8 |
| 8² | 64 |
| 8³ | 512 |
| 8⁴ | 4,096 |
Because octal has only eight digit symbols, a number rolls over to a new position one step sooner than decimal does — the octal digit "7" is followed by "10" instead of "8," the same way decimal "9" is followed by "10" instead of continuing with a nonexistent tenth digit.
How to Convert Decimal to Octal
The standard manual method is repeated division by 8:
- Divide the decimal number by 8.
- Record the remainder — it will always be a whole number from 0 to 7.
- Divide the resulting quotient by 8 again.
- Repeat steps 2–3 until the quotient reaches 0.
- Read the recorded remainders from bottom to top (the last remainder first). That sequence of digits is the octal result.
Dividing by 8 works because octal is base 8: each division step separates out one octal digit at a time. The first division tests what's left over after removing complete groups of 8 — in other words, the digit in the 8⁰ (ones) position. The next division, performed on the quotient, tests the 8¹ position, the one after that tests 8², and so on. Because each division answers for a larger place value than the one before it, the very last remainder produced corresponds to the largest place value in the number — which needs to be written on the left. Reading the remainders from bottom to top simply puts that largest place value first, exactly the way octal numbers are normally written.
Decimal to Octal Formula
Decimal-to-octal conversion doesn't reduce to a single algebraic formula the way, say, a temperature conversion does. What it relies on is a short, repeatable algorithm built from two operations applied to a value n:
remainder = n mod 8
quotient = floor(n / 8)
Compute the remainder and quotient for n, then repeat the same two operations using the quotient as the new n, continuing until the quotient reaches 0. Each remainder becomes one octal digit — but in reverse order, since the first remainder calculated is the last digit of the final octal number, and the last remainder calculated is the first digit.
Example: Convert 83 Decimal to Octal
83 ÷ 8 = 10 remainder 3
10 ÷ 8 = 1 remainder 2
1 ÷ 8 = 0 remainder 1
The quotient reaches 0, so the division stops. Reading the remainders from bottom to top: 1, 2, 3 — which gives 123.
83 in decimal = 123 in octal.
To confirm the result, expand it using powers of 8:
1 × 8² + 2 × 8¹ + 3 × 8⁰
= (1 × 64) + (2 × 8) + (3 × 1)
= 64 + 16 + 3
= 83
The expansion matches the original number, confirming 83₁₀ = 123₈.
More Decimal to Octal Examples
7 (below the first base boundary)
Any decimal value from 0 to 7 fits in a single octal digit, since octal digits already cover 0–7. No division is needed: 7 = 7₈.
8 (the first base boundary)
8 ÷ 8 = 1 remainder 0
1 ÷ 8 = 0 remainder 1
Bottom to top: 1, 0 → 10. 8 = 10₈ — the first decimal number that needs two octal digits.
10 (two remainders)
10 ÷ 8 = 1 remainder 2
1 ÷ 8 = 0 remainder 1
Bottom to top: 1, 2 → 12. 10 = 12₈. Check: (1 × 8) + (2 × 1) = 10.
64 (a power of 8, with zero remainders)
64 ÷ 8 = 8 remainder 0
8 ÷ 8 = 1 remainder 0
1 ÷ 8 = 0 remainder 1
Bottom to top: 1, 0, 0 → 100. 64 = 100₈. Zero remainders still need to be recorded — skipping either 0 here would produce a wrong result. Check: (1 × 64) + (0 × 8) + (0 × 1) = 64.
255 (three octal digits)
255 ÷ 8 = 31 remainder 7
31 ÷ 8 = 3 remainder 7
3 ÷ 8 = 0 remainder 3
Bottom to top: 3, 7, 7 → 377. 255 = 377₈. Check: (3 × 64) + (7 × 8) + (7 × 1) = 192 + 56 + 7 = 255.
1000 (a larger conversion)
1000 ÷ 8 = 125 remainder 0
125 ÷ 8 = 15 remainder 5
15 ÷ 8 = 1 remainder 7
1 ÷ 8 = 0 remainder 1
Bottom to top: 1, 7, 5, 0 → 1750. 1000 = 1750₈. Check: (1 × 512) + (7 × 64) + (5 × 8) + (0 × 1) = 512 + 448 + 40 + 0 = 1000.
Summary Table
| Decimal | Division Remainders (in order computed) | Octal |
|---|---|---|
| 7 | — (single digit) | 7 |
| 8 | 0, 1 | 10 |
| 10 | 2, 1 | 12 |
| 64 | 0, 0, 1 | 100 |
| 83 | 3, 2, 1 | 123 |
| 255 | 7, 7, 3 | 377 |
| 1000 | 0, 5, 7, 1 | 1750 |
The "Octal" column reads each remainder list in reverse — last remainder computed first.
Decimal Values 0 Through 7 in Octal
Decimal values 0 through 7 convert to themselves in octal, since octal already has a digit for each of those values:
0₁₀ = 0₈ 4₁₀ = 4₈
1₁₀ = 1₈ 5₁₀ = 5₈
2₁₀ = 2₈ 6₁₀ = 6₈
3₁₀ = 3₈ 7₁₀ = 7₈
The pattern breaks at 8, because octal has no digit symbol for eight — 8₁₀ = 10₈, rolling over to two digits one step sooner than decimal does (which doesn't roll over until 10).
Decimal to Octal Conversion Table
A quick reference for decimal 0 through 16:
| 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 |
| 16 | 20 |
How to Check a Decimal to Octal Conversion
Two reliable ways to verify a conversion:
- Recalculate the positional expansion. Multiply each digit of the octal result by its power-of-8 place value and add the products — as shown for 83 and 255 above, the total should equal the original decimal number.
- Use a converter. The Base Converter handles the decimal-to-octal direction (and any other base pairing) using exact BigInt arithmetic, so you can compare its result against your own working.
Converting Decimal to Octal Through Binary
Decimal can also reach octal indirectly, by converting to binary first and then grouping the binary digits in sets of three — because 8 = 2³, every group of 3 binary bits maps to exactly one octal digit. Decimal 83 is 1010011 in binary; grouped from the right into sets of three (padding the leftmost group with a leading zero), that's 001 010 011, which maps to octal digits 1, 2, 3 — the same 123 found by repeated division.
This two-step route is useful mainly as a cross-check or when you already have a binary value on hand. For converting decimal numbers directly, repeated division by 8 is more direct since it skips the intermediate binary step. See How to Convert Decimal to Binary for the binary half of this method, and the Binary to Octal Converter for the grouping step.
Decimal to Octal vs. Octal to Decimal
These two conversions are inverse operations, but they don't share a manual procedure:
- Decimal to octal works by repeatedly dividing by 8 and reading the remainders from bottom to top, as covered throughout this guide.
- Octal to decimal works the opposite way: multiply each octal digit by its power-of-8 place value and add the products.
See How to Convert Octal to Decimal for the full reverse method, including its own worked examples and place-value table.
Common Decimal to Octal Mistakes
- Dividing by 10 instead of 8. It's an easy slip if you're used to decimal place values — octal conversion only works with division by 8.
- Forgetting to record a zero remainder. Every division step produces a remainder, including ones that come out to 0 — skipping one removes a digit and shifts everything after it, as in the 64 example above.
- Using the quotient where the remainder belongs, or vice versa. The quotient carries into the next division step; the remainder is what gets recorded as an octal digit. Swapping them produces an entirely wrong result.
- Reading the remainders top to bottom instead of bottom to top. This reverses the digit order — for 83, reading top to bottom would incorrectly give 321 instead of 123.
- Stopping the division before the quotient reaches 0. Stopping one step early drops the leading (most significant) digit from the result.
- Letting an 8 or 9 appear in the final answer. Valid octal digits only run from 0 to 7. If a result contains an 8 or 9, a division or remainder was calculated incorrectly somewhere along the way.
- Confusing decimal-to-octal with octal-to-decimal. These use different procedures — one divides repeatedly by 8, the other multiplies digits by powers of 8. Applying the wrong one gives a plausible-looking but incorrect answer.
Frequently Asked Questions
How do you convert decimal to octal? Divide the decimal number by 8 and record the remainder, then divide the resulting quotient by 8 again and record that remainder too. Repeat until the quotient reaches 0, then read the remainders from bottom to top — that sequence of digits, each between 0 and 7, is the octal equivalent. For example, decimal 83 produces remainders 3, 2, 1, which read bottom to top gives octal 123.
What is the formula for decimal-to-octal conversion? There isn't a single algebraic formula — the method is an algorithm: remainder = n mod 8, and quotient = floor(n / 8). Apply it to n, then keep applying it to each new quotient until the quotient reaches 0. Reading the collected remainders from last to first gives the octal result.
Why do you divide by 8 when converting decimal to octal? Octal is a base-8 number system, so each digit position is worth a power of 8 instead of a power of 10. Dividing by 8 repeatedly strips off one octal digit at a time: the remainder at each step is exactly the digit, from 0 to 7, that belongs in that position.
Why are the remainders read from bottom to top? The first division produces the remainder for the smallest place value (8⁰), and each division after that produces the remainder for the next larger place value — 8¹, then 8², and so on. Since the largest place value is found last, reading the remainders from the last one calculated back to the first puts them in the correct order, from most significant digit to least significant digit.
What is 83 in octal? Decimal 83 is 123 in octal. Dividing 83 by 8 repeatedly gives remainders 3, 2, 1 in that order, and reading them from bottom to top gives 123. Checking it back: (1 × 64) + (2 × 8) + (3 × 1) = 64 + 16 + 3 = 83.
What is decimal 8 in octal? Decimal 8 is 10 in octal. 8 ÷ 8 = 1 remainder 0, then 1 ÷ 8 = 0 remainder 1 — reading bottom to top gives 10. It's the first decimal value that needs two octal digits, the same way decimal 10 is the first value that needs two digits in base 10.
Can an octal number contain 8 or 9? No. Octal only uses the digits 0 through 7. A number containing an 8 or a 9, such as 189, is not a valid octal value.
How can I check a decimal-to-octal conversion? Multiply each digit of your octal result by its power-of-8 place value and add the products — the total should equal the original decimal number. You can also enter the value into the Base Converter, which shows the decimal-to-octal result instantly.
Try Our Free SEO Tools
Put what you learned into action with our free SEO analysis tools.