Type 777 into this tool and you get 511, not the coincidence it first appears: 777 is an octal number, and in base 8 those three sevens work out to 448 plus 56 plus 7, which is 511. That single calculation sits underneath every chmod command you have ever run. This page converts any octal number to decimal live as you type, showing the positional arithmetic rather than hiding it, and everything runs locally in your browser with no signup and no data leaving your device.
Octal is base 8, so its digits run from 0 to 7 and each position carries a power of 8. Reading 777 right to left: the last position is the ones place, the middle is the eights place, and the first is the sixty-fours place. Unlike binary-to-octal conversions, which are pure bit regrouping, this conversion involves real arithmetic, because 8 is not a power of 10. That makes it a genuinely useful exercise in positional notation, the same concept you learned for decimal numbers but with a different base.
The tool treats your input as one whole number, however long. A six-digit octal value and a sixty-digit one are both handled exactly, since modern browsers compute with arbitrary-precision integers, and any character outside 0 through 7 produces a clear error message instead of a silent wrong answer.
How Positional Powers of 8 Work
Every base-N number works the same way decimal does: each digit is multiplied by the base raised to its position power, and the products are summed. In octal the weights from right to left are 1, 8, 64, 512, 4096, 32768, and so on, each position eight times the previous one. The number 1750 in octal is therefore 1 times 512 plus 7 times 64 plus 5 times 8 plus 0, which equals 512 plus 448 plus 40, or 1000 in decimal.
Compare this with binary, where the weights are powers of 2, and hexadecimal, where they are powers of 16. The idea is identical; only the multiplier changes. What makes octal conversion slightly trickier than binary is that digits can be up to 7, so mental arithmetic is real work, and a mistake in the sixty-fours column throws the total off by more than the whole rest of the number combined.
One habit worth building: estimate first. Each additional octal digit multiplies the maximum value by 8, so three digits can reach 777, which is 511, four digits can reach 4095, five digits can reach 32767, and so on. If your decimal answer for a four-digit octal number is five digits long, you know something went wrong before even checking.
How to Use This Tool (Step by Step)
- Enter your octal number in the input box. Digits 0 through 7 only; an 8 or 9 triggers an invalid-digit error naming the offending character.
- The decimal result appears live on every keystroke, with no button to click.
- Large values are fine: the conversion uses exact integer arithmetic, so even forty-digit octal numbers convert without rounding.
- Copy the result with the copy button for your notes, scripts, or homework.
- To verify, paste the decimal result into the companion decimal-to-octal tool; you should get your original digits back.
Worked Examples: Numbers and Permissions
Each row shows the positional expansion so you can check the arithmetic by hand.
| Octal input | Expansion | Decimal result |
|---|---|---|
| 7 | 7 | 7 |
| 10 | 1 times 8 plus 0 | 8 |
| 144 | 1 times 64 plus 4 times 8 plus 4 | 100 |
| 755 | 7 times 64 plus 5 times 8 plus 5 | 493 |
| 644 | 6 times 64 plus 4 times 8 plus 4 | 420 |
| 777 | 7 times 64 plus 7 times 8 plus 7 | 511 |
| 1750 | 512 plus 448 plus 40 plus 0 | 1000 |
The 755 and 644 rows are the everyday chmod values, and the decimal column explains something people often misread: 755 does not mean seven hundred fifty-five. It means 493, an arbitrary-looking number that happens to have the bit pattern rwxr-xr-x. The octal digits exist purely to make those bits human-readable.
The chmod Math Behind File Permissions
A Unix permission string is nine bits: three for the owner, three for the group, three for others, with read worth 4, write worth 2, and execute worth 1 in each triple. The owner's triple for 755 is 4 plus 2 plus 1, or 7; the group's is 4 plus 1, or 5; and others repeat 5. In decimal the whole nine-bit pattern is 493, which is why a directory listing tool working in raw numbers shows 493 where chmod shows 755.
This is also why permission digits max out at 7: the largest three-bit value is 111, which is 7. A digit of 8 or 9 cannot exist because there is no bit combination that sums to it. When you see a script comparing a permission against the decimal value 420, that is 644; against 511, that is 777. Programming APIs, particularly in languages whose standard libraries return permission bits as plain integers, speak decimal, while the shell speaks octal, and this conversion is the bridge between the two vocabularies.
Common Use Cases
- Shell scripting: comparing or logging permissions in decimal, since many languages expose st_mode values where the permission part is a plain decimal number like 493.
- Homework and exams: base conversion questions almost always include octal to decimal because it tests positional notation without the tedium of long binary strings.
- Understanding umask: the default umask 022 is decimal 18, and seeing the numbers plainly helps explain how 022 turns 777 into 755 for directories.
- Reading old documentation: systems manuals from the 1970s through 1990s quote octal addresses and configuration values that modern tools expect in decimal.
- Sanity-checking data files: tar archives store sizes and checksums as octal text; converting them to decimal reveals the actual byte counts.
How It Works: The Formula and Edge Cases
Formally, an octal number with digits d(k), d(k-1), down to d(0) equals the sum of each digit times 8 to the power of its position. The tool computes this with arbitrary-precision integer arithmetic, so there is no floating-point rounding even for numbers far beyond the 64-bit limit. Leading zeros are accepted and ignored numerically: 0755 and 755 both give 493.
An empty input produces an empty output rather than a zero, so a half-typed number does not masquerade as a result. Invalid characters, including spaces in the middle, letters, and the digits 8 and 9, stop the conversion with a named error. This strictness matters because in real octal data, such as tar headers or permission columns, every digit is meaningful, and silently skipping a character would shift the positions of all digits after it.
Tips and Best Practices
- Estimate magnitude first using the per-digit maximums: three digits reach 511, four reach 4095, five reach 32767; an answer wildly outside that range means a slipped column.
- When converting by hand, write the weights 64, 8, 1 above a three-digit number before multiplying; most chmod arithmetic errors come from using 100s and 10s out of decimal habit.
- Round-trip check: decimal result back into decimal-to-octal should return the original digits exactly.
- Remember that a leading zero in code, as in 0755 or 022, marks the literal as octal in C, JavaScript, Python 2, and the shell; dropping it changes the value the language sees.
- For permission work, memorize the four common decimal values: 511 for 777, 493 for 755, 420 for 644, and 384 for 600.