Convert decimal numbers to base 8 (octal) or octal back to decimal, with the division steps shown, plus the binary and hexadecimal equivalents.
- All Math and Numbers Calculators
- Base Calculator (whole-number octal arithmetic)
- Base 9 Calculator
- BCD Binary Coded Decimal Calculator
- Decimal to Floating Point Calculator
- Log Base 2 Calculator
- Exponent Calculator
Base 8 Formula
The base 8 calculator converts signed whole numbers and fractions between decimal and octal. For negative values, convert the absolute value and retain the negative sign. Octal, also called base 8, uses only the digits 0 through 7.
To convert an octal number to decimal, multiply each octal digit by a power of 8 based on its position, then add the results.
- Decimal is the base 10 value.
- d is an octal digit from 0 to 7.
- n is the power of 8 for the digit. The digit just left of the point has power 0. The digits to its right have powers −1, −2 and so on.
- 8 is the base used by octal numbers.
To convert the whole part of a decimal number to octal, repeatedly divide that whole part by 8 and record each remainder. The octal result is the remainders read from last to first.
- Decimal is the number being divided at each step.
- Quotient is the whole-number result after dividing by 8.
- Remainder is the digit used in the octal result.
If you enter a decimal value, the calculator returns the equivalent octal value. If you enter an octal value, the calculator expands each digit by powers of 8 and returns the decimal value.
Convert fractional values
For decimal to octal, convert the whole part as above. For the fractional part, multiply the remaining fraction by 8. Use the whole part of that product as the next octal digit, then repeat with what is left. If the same remainder returns, the digits from that point repeat.
For example, 1/3 × 8 is 2 + 2/3. Then 2/3 × 8 is 5 + 1/3. The original remainder has returned, so decimal 1/3 is 0.(25) in octal. The parentheses mean that 25 repeats.
To go in reverse, the first digit after the octal point is worth 1/8 and the next is worth 1/64. For example, octal 1.2 is 1 + 2/8, or 1.25 in decimal. For a repeating block of k octal digits immediately after the point, its value is the block’s whole-number value divided by 8k − 1. Each nonrepeating place before the block shifts that contribution one more place to the right.
For fractional input, the calculator also shows the exact base 10 fraction. If an expansion would need more than 64 fractional digits to terminate or show a full repeat, an ellipsis marks the truncated display.
Octal Place Values and Common Conversions
Use these tables to check how octal digits are weighted and to compare common decimal and octal values.
| Octal place | Power of 8 | Decimal value |
|---|---|---|
| 1s place | 80 | 1 |
| 8s place | 81 | 8 |
| 64s place | 82 | 64 |
| 512s place | 83 | 512 |
| 4096s place | 84 | 4096 |
| Decimal | Octal | Note |
|---|---|---|
| 8 | 10 | One group of 8 |
| 16 | 20 | Two groups of 8 |
| 64 | 100 | One group of 64 |
| 255 | 377 | Common 8-bit maximum |
Example Problems
Example 1: Convert octal 157 to decimal
Break the octal number into place values:
So, octal 157 equals decimal 111.
Example 2: Convert decimal 100 to octal
Divide by 8 and track the remainders:
- 100 ÷ 8 = 12 remainder 4
- 12 ÷ 8 = 1 remainder 4
- 1 ÷ 8 = 0 remainder 1
Read the remainders from bottom to top:
FAQ
What digits are allowed in base 8?
Base 8 uses the digits 0, 1, 2, 3, 4, 5, 6, and 7. The digits 8 and 9 are not valid in an octal number because each place represents powers of 8.
Why does octal 10 equal decimal 8?
In octal, 10 means one group of 8 and zero 1s. It does not mean ten in decimal. The value is calculated as 1 × 81 + 0 × 80, which equals 8.
How do you know which field to fill in?
Choose Decimal to octal or Octal to decimal and enter up to 100 digits in the visible field. Decimal to octal accepts a point or a fraction like 1/3. Octal to decimal accepts an octal point or a repeating block like 0.(25). Both accept a leading sign. Select Calculate to see the converted value.
