StringMash.com

Octal to decimal converter

Octal to decimal, each digit times its power of 8, then added.

Conversion
3 characters
Updates as you type
Swap for decimal to octal

Show the steps
  1. 7 × 8² = 7 × 64 = 448
  2. 5 × 8¹ = 5 × 8 = 40
  3. 5 × 8⁰ = 5 × 1 = 5
  4. Add them up: 448 + 40 + 5 = 493
Printable chart

Using the converter

Type an octal number, like 755 or 0o755, and the decimal appears straight away, with each digit's place value worked out underneath. Octal digits go from 0 to 7, so an 8 or 9 is flagged. Several numbers can go in at once, separated by spaces, commas or new lines.

How to convert octal to decimal

Each place in an octal number is worth 8 times the place to its right, so the places are 1, 8, 64, 512 and so on. Multiply each digit by its place value and add them up.

For 755, the 7 is in the 64s place, the first 5 in the 8s place and the last 5 in the ones place. That's 7 × 64 + 5 × 8 + 5 × 1 = 448 + 40 + 5 = 493.

Where octal is still used

Octal was common on early computers whose words were multiples of 3 bits. Today it's mostly seen in Unix file permissions, where each digit is three bits, for read, write and run. In chmod 755, the 7 (111) gives the owner all three and each 5 (101) gives read and run. The chmod calculator spells it out.

Questions

What is 10 in octal as a decimal?

8. One eight and no ones.

What is 777 in decimal?

511. That's 7 × 64 + 7 × 8 + 7 = 448 + 56 + 7. It's one less than 1000 in octal, which is 512.

Why does a leading 0 mean octal?

In C, JavaScript's older syntax and many shells, a number written with a 0 in front, like 0755, is read as octal. Newer languages use 0o755 to avoid surprises. The converter accepts both.

Is octal the same as base 8?

Yes. Octal is the name for base 8, the way hexadecimal is base 16 and binary is base 2.

THE FIRST 33 NUMBERS

Decimal, binary, octal and hex from 0 to 32

DecimalBinaryOctalHex
0000
1111
21022
31133
410044
510155
611066
711177
81000108
91001119
10101012A
11101113B
12110014C
13110115D
14111016E
15111117F
16100002010
17100012111
18100102212
19100112313
20101002414
21101012515
22101102616
23101112717
24110003018
25110013119
2611010321A
2711011331B
2811100341C
2911101351D
3011110361E
3111111371F
321000004020

Sources

Added and reviewed . What's new