Octal to Decimal Converter
Convert octal numbers to decimal format
Tip: Enter an octal number (0-7 only). The conversion happens in real-time.
Runs in your browserOctal Decimal
Octal to decimal, step by step
Convert octal to decimal
Type an octal number and its decimal value appears as you type. Results longer than four digits are also shown with commas between the thousands, and the window bar shows the bit length.
Octal numbers look like decimal ones, which is where mistakes come from: 777 in octal is only 511, and 10 is 8. In C, and in old JavaScript code, a leading zero makes a number octal, so 010 can mean 8.
How to convert octal to decimal by hand
Multiply each digit by 8 to the power of its position, counting positions from 0 on the right, and add the results. For 1750:
| Digit | Place value | Adds |
|---|---|---|
| 1 | 8³ = 512 | 512 |
| 7 | 8² = 64 | 448 |
| 5 | 8¹ = 8 | 40 |
| 0 | 8⁰ = 1 | 0 |
Add the last column: 512 + 448 + 40 + 0 = 1000, so 1750 in octal is 1000 in decimal. The step-by-step window above does the same for the number you type, up to 40 digits.
Octal to decimal table
| Octal | Decimal |
|---|---|
| 7 | 7 |
| 10 | 8 |
| 11 | 9 |
| 12 | 10 |
| 17 | 15 |
| 20 | 16 |
| 77 | 63 |
| 100 | 64 |
| 377 | 255 |
| 400 | 256 |
| 644 | 420 |
| 755 | 493 |
| 777 | 511 |
| 1000 | 512 |
File permissions are written in octal because each digit is one class of user: owner, group and others. In decimal the same values, such as 420 for 644 and 493 for 755, hide that structure.
Need octal from a decimal number?
The decimal to octal converter divides by 8 and reads the remainders from the bottom up.
Prefixes, signs and invalid digits
Works
0o755,0755and755all give493-17gives-15, with the sign kept- Spaces and underscores are skipped, so
7_777gives4095
Shows an error or is not done
- The digits
8and9, which are not octal - Fractions such as
0.4 - Two's complement: octal digits are always read as a positive value
For hex instead, use the octal to hex converter; the number system converter shows binary, decimal, hex and octal together.
Octal to decimal questions
511: 7 × 64 + 7 × 8 + 7 = 511. As a permission it is rwxrwxrwx.
In base 8 the second place counts eights, so 10 means one eight and no ones.
No. 0644 and 644 both give 420. In some languages the zero only marks the number as octal.
Yes, exactly, at any length. The step-by-step window lists the place values for up to 40 digits.
No. The conversion runs in your browser.