od

Octal to Decimal

βœ“ Free & no signup πŸ”’ Runs 100% in your browser Updated 2026-11-25 Binary Converter Tools

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)

  1. 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.
  2. The decimal result appears live on every keystroke, with no button to click.
  3. Large values are fine: the conversion uses exact integer arithmetic, so even forty-digit octal numbers convert without rounding.
  4. Copy the result with the copy button for your notes, scripts, or homework.
  5. 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 inputExpansionDecimal result
777
101 times 8 plus 08
1441 times 64 plus 4 times 8 plus 4100
7557 times 64 plus 5 times 8 plus 5493
6446 times 64 plus 4 times 8 plus 4420
7777 times 64 plus 7 times 8 plus 7511
1750512 plus 448 plus 40 plus 01000

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.

Frequently Asked Questions

How do I convert octal to decimal by hand?
Multiply each digit by 8 raised to its position power and add the products. Position powers run 1, 8, 64, 512 from right to left. For 777: 7 times 64 is 448, 7 times 8 is 56, and 7 times 1 is 7, so the total is 511. For 144: 64 plus 32 plus 4 equals 100. Always write the weights above the digits first; most errors happen when people accidentally use decimal weights of 100 and 10 instead of 64 and 8.
What is 777 in decimal and why is it not seven hundred seventy-seven?
777 in octal is 511 in decimal. The digits sit in base-8 positions: 7 times 64 plus 7 times 8 plus 7 times 1 equals 448 plus 56 plus 7, which is 511. It is not 777 because octal has no hundreds or tens; its columns are sixty-fours and eights. In the chmod world, 777 means read, write, and execute permission for owner, group, and others, and the underlying nine-bit value that programs see is the single decimal number 511.
What decimal value is chmod 755 or 644?
chmod 755 is decimal 493, and 644 is decimal 420. Compute 755 as 7 times 64 plus 5 times 8 plus 5, which is 448 plus 40 plus 5, or 493, and 644 as 6 times 64 plus 4 times 8 plus 4, which is 384 plus 32 plus 4, or 420. Programming libraries that report file modes as integers return these decimal forms, while the shell displays octal, which is why the same permission appears as 755 in ls output and 493 in some language APIs.
Why are the digits 8 and 9 invalid in octal input?
Octal is base 8, so its digit set is exactly 0 through 7, the same way binary has only 0 and 1. The digit 8 would represent the value that octal writes as 10, and 9 the value octal writes as 11, so allowing them would create two names for the same number and break positional arithmetic. The tool reports an error naming the invalid character. If your source number contains an 8 or 9, it is probably decimal data that needs the decimal-to-octal converter, or a typo worth catching.
How large an octal number can this tool convert?
Effectively unlimited. The conversion uses arbitrary-precision integer arithmetic, so numbers beyond the 64-bit limit, past 22 octal digits, still convert exactly with no rounding. Ordinary inputs are fast regardless of size; extremely long inputs, hundreds of digits, are limited only by your browser's rendering speed. If a very large value feels slow, the live conversion still works but you may prefer to paste the full number in one action rather than typing it character by character.
What is the difference between octal and decimal position values?
Decimal positions carry powers of 10: ones, tens, hundreds, thousands. Octal positions carry powers of 8: ones, eights, sixty-fours, five-hundred-twelves. The digit symbols 0 through 7 mean the same quantity in both systems, but their position weights differ, so 100 in octal is not one hundred; it is 64 in decimal. This is the single most common source of confusion when reading octal data like permissions or tar headers: the digits look decimal but the columns are not.

Related Tools