T
THINKFORU
Submit Feedback

Decimal to Octal Converter: Base-10 to Base-8

Decimal to Octal Converter: Base-10 to Base-8

Decimal to Octal Converter

Save on Google
Tip: enter one number to see the division steps, 2's complement, binary, hex and chmod permissions. Several numbers (new line, space or comma), fractions like 10.625 and e notation like 5.72e2 also work.
Output appears here
 
Related Developer Tools
Tool Name Explanation
Binary to Text Converter Decodes binary (0s and 1s) back into clean, readable text.
Text to Binary Converter Converts text strings into 8-bit or 7-bit binary representation.
Text to Hex Converter Converts plain text characters into hexadecimal ASCII or UTF-8 values.
Hex to Text Converter Decodes hexadecimal values back into plain, human-readable text.
Text to Octal Converter Converts text into octal bytes with separator, digits, and prefix options.
Octal to Text Converter Decodes octal byte sequences back into readable plain text.
Decimal to Binary Converter Converts decimal numbers into binary with step-by-step logic and 2's complement.
Binary to Decimal Converter Converts binary numbers into decimal integers with full positional notation.
Hex to Binary Converter Converts base-16 hexadecimal numbers directly into base-2 binary strings.
Binary to Hex Converter Groups binary digits into 4-bit nibbles and converts them to hex digits.
Octal to Binary Converter Converts base-8 octal values directly into equivalent binary groups.
Binary to Octal Converter Groups binary bits in sets of three to convert directly into octal numbers.
Hex to Decimal Converter Converts base-16 hexadecimal values into base-10 decimal numbers using positional values.
Decimal to Hex Converter Converts base-10 decimal numbers into base-16 hexadecimal with steps and prefix options.
Hex to Octal Converter Converts hexadecimal numbers into octal by mapping hex digits through binary equivalents.
Octal to Hex Converter Converts base-8 octal numbers directly into base-16 hexadecimal representations.

Example 1: Convert 215 to Octal

Division by 8QuotientRemainder (Octal digit)Digit #
215/82670
26/8321
3/8032
Read the remainders from the last step to the first: 215 = 327 (3 x 64 + 2 x 8 + 7).

Example 2: Convert 493 to Octal

Division by 8QuotientRemainder (Octal digit)Digit #
493/86150
61/8751
7/8072
Read the remainders from the last step to the first: 493 = 755 (7 x 64 + 5 x 8 + 5), the chmod mode rwxr-xr-x.

Decimal 0-255 to Octal Table

DecimalOctalBinary (8-bit)Hex
00000000000000
10010000000101
20020000001002
30030000001103
40040000010004
50050000010105
60060000011006
70070000011107
80100000100008
90110000100109
10012000010100A
11013000010110B
12014000011000C
13015000011010D
14016000011100E
15017000011110F
160200001000010
170210001000111
180220001001012
190230001001113
200240001010014
210250001010115
220260001011016
230270001011117
240300001100018
250310001100119
26032000110101A
27033000110111B
28034000111001C
29035000111011D
30036000111101E
31037000111111F
320400010000020
330410010000121
340420010001022
350430010001123
360440010010024
370450010010125
380460010011026
390470010011127
400500010100028
410510010100129
42052001010102A
43053001010112B
44054001011002C
45055001011012D
46056001011102E
47057001011112F
480600011000030
490610011000131
500620011001032
510630011001133
520640011010034
530650011010135
540660011011036
550670011011137
560700011100038
570710011100139
58072001110103A
59073001110113B
60074001111003C
61075001111013D
62076001111103E
63077001111113F
641000100000040
651010100000141
661020100001042
671030100001143
681040100010044
691050100010145
701060100011046
711070100011147
721100100100048
731110100100149
74112010010104A
75113010010114B
76114010011004C
77115010011014D
78116010011104E
79117010011114F
801200101000050
811210101000151
821220101001052
831230101001153
841240101010054
851250101010155
861260101011056
871270101011157
881300101100058
891310101100159
90132010110105A
91133010110115B
92134010111005C
93135010111015D
94136010111105E
95137010111115F
961400110000060
971410110000161
981420110001062
991430110001163
1001440110010064
1011450110010165
1021460110011066
1031470110011167
1041500110100068
1051510110100169
106152011010106A
107153011010116B
108154011011006C
109155011011016D
110156011011106E
111157011011116F
1121600111000070
1131610111000171
1141620111001072
1151630111001173
1161640111010074
1171650111010175
1181660111011076
1191670111011177
1201700111100078
1211710111100179
122172011110107A
123173011110117B
124174011111007C
125175011111017D
126176011111107E
127177011111117F
1282001000000080
1292011000000181
1302021000001082
1312031000001183
1322041000010084
1332051000010185
1342061000011086
1352071000011187
1362101000100088
1372111000100189
138212100010108A
139213100010118B
140214100011008C
141215100011018D
142216100011108E
143217100011118F
1442201001000090
1452211001000191
1462221001001092
1472231001001193
1482241001010094
1492251001010195
1502261001011096
1512271001011197
1522301001100098
1532311001100199
154232100110109A
155233100110119B
156234100111009C
157235100111019D
158236100111109E
159237100111119F
16024010100000A0
16124110100001A1
16224210100010A2
16324310100011A3
16424410100100A4
16524510100101A5
16624610100110A6
16724710100111A7
16825010101000A8
16925110101001A9
17025210101010AA
17125310101011AB
17225410101100AC
17325510101101AD
17425610101110AE
17525710101111AF
17626010110000B0
17726110110001B1
17826210110010B2
17926310110011B3
18026410110100B4
18126510110101B5
18226610110110B6
18326710110111B7
18427010111000B8
18527110111001B9
18627210111010BA
18727310111011BB
18827410111100BC
18927510111101BD
19027610111110BE
19127710111111BF
19230011000000C0
19330111000001C1
19430211000010C2
19530311000011C3
19630411000100C4
19730511000101C5
19830611000110C6
19930711000111C7
20031011001000C8
20131111001001C9
20231211001010CA
20331311001011CB
20431411001100CC
20531511001101CD
20631611001110CE
20731711001111CF
20832011010000D0
20932111010001D1
21032211010010D2
21132311010011D3
21232411010100D4
21332511010101D5
21432611010110D6
21532711010111D7
21633011011000D8
21733111011001D9
21833211011010DA
21933311011011DB
22033411011100DC
22133511011101DD
22233611011110DE
22333711011111DF
22434011100000E0
22534111100001E1
22634211100010E2
22734311100011E3
22834411100100E4
22934511100101E5
23034611100110E6
23134711100111E7
23235011101000E8
23335111101001E9
23435211101010EA
23535311101011EB
23635411101100EC
23735511101101ED
23835611101110EE
23935711101111EF
24036011110000F0
24136111110001F1
24236211110010F2
24336311110011F3
24436411110100F4
24536511110101F5
24636611110110F6
24736711110111F7
24837011111000F8
24937111111001F9
25037211111010FA
25137311111011FB
25237411111100FC
25337511111101FD
25437611111110FE
25537711111111FF

Powers of 2 in Octal

PowerDecimalOctal
2^011
2^122
2^244
2^3810
2^41620
2^53240
2^664100
2^7128200
2^8256400
2^95121000
2^1010242000
2^1120484000
2^12409610000
2^13819220000
2^141638440000
2^1532768100000
2^1665536200000
2^17131072400000
2^182621441000000
2^195242882000000
2^2010485764000000
2^21209715210000000
2^22419430420000000
2^23838860840000000
2^2416777216100000000
2^2533554432200000000
2^2667108864400000000
2^271342177281000000000
2^282684354562000000000
2^295368709124000000000
2^30107374182410000000000
2^31214748364820000000000
2^32429496729640000000000

Powers of 8 in Octal

PowerDecimalOctal
8^011
8^1810
8^264100
8^35121000
8^4409610000
8^532768100000
8^62621441000000
8^7209715210000000
8^816777216100000000
8^91342177281000000000
8^10107374182410000000000

Common Decimal Numbers in Octal

NumberDecimalOctalBinary
Subnet mask octet (/25)12820010000000
Subnet mask octet (/26)19230011000000
Subnet mask octet (/27)22434011100000
Subnet mask octet (/28)24036011110000
Subnet mask octet (/29)24837011111000
Subnet mask octet (/30)25237411111100
Subnet mask octet (/31)25437611111110
Subnet mask octet (/24)25537711111111
SSH port222610110
SMTP port253111001
DNS port5365110101
HTTP port801201010000
HTTPS port443673110111011
MySQL port33066352110011101010
PostgreSQL port5432124701010100111000
Alternate HTTP port8080176201111110010000
Loopback first octet1271771111111
Private IP first octet (10.x.x.x)10121010
Private IP first octet (192.168.x.x)19230011000000
Private IP second octet (192.168.x.x)16825010101000
Ten10121010
One hundred1001441100100
One thousand100017501111101000
Max signed 8-bit1271771111111
Max unsigned 8-bit25537711111111
Values in a byte256400100000000
One kibibyte1024200010000000000
Page size4096100001000000000000
Max signed 16-bit3276777777111111111111111
Max unsigned 16-bit655351777771111111111111111
Values in 16 bits6553620000010000000000000000
Max RGB hex FFFFFF1677721577777777111111111111111111111111
Max signed 32-bit2147483647177777777771111111111111111111111111111111
Max unsigned 32-bit42949672953777777777711111111111111111111111111111111
Days from 1970 to 2000109572531510101011001101
ASCII letter A651011000001
ASCII letter a971411100001
ASCII digit 04860110000
ASCII space3240100000
ASCII line feed10121010

Common chmod Modes: Decimal to Octal

DecimalOctal modeSymbolicUse
493755rwxr-xr-xExecutables, directories
420644rw-r--r--Regular files
511777rwxrwxrwxEveryone full access
384600rw-------Private file
448700rwx------Private directory or script
436664rw-rw-r--Group writable file
488750rwxr-x---Group can read and run
416640rw-r-----Group can read
292444r--r--r--Read only for all
509775rwxrwxr-xGroup writable directory

Decimal Fractions in Octal

DecimalOctalType
0.50.4Exact
0.250.2Exact
0.1250.1Exact
0.750.6Exact
0.3750.3Exact
0.6250.5Exact
1.51.4Exact
2.752.6Exact
10.62512.5Exact
0.10.06314631Repeats, cut at 8 digits
0.20.14631463Repeats, cut at 8 digits
0.30.23146314Repeats, cut at 8 digits
0.60.46314631Repeats, cut at 8 digits
3.141593.11037476Repeats, cut at 8 digits
2.718282.55760462Repeats, cut at 8 digits

Negative Numbers in Two's Complement Octal

DecimalPositive Octal8-bit Two's Complement16-bit Two's Complement32-bit Two's Complement
-1137717777737777777777
-2237617777637777777776
-3337517777537777777775
-5537317777337777777773
-81037017777037777777770
-101236617776637777777766
-162036017776037777777760
-324034017774037777777740
-6410030017770037777777700
-10014423417763437777777634
-12717720117760137777777601
-12820020017760037777777600
-200310not in range17747037777777470
-255377not in range17740137777777401
-10001750not in range17603037777776030

Technical Q&A / FAQ Matrix

Technical Developer QuestionExact Solution & Code Snippet
How do I convert decimal to octal in JavaScript?(493).toString(8)
How do I convert decimal to octal in Python?format(493, 'o')
How do I convert decimal to octal in Go?strconv.FormatInt(493, 8)
How do I convert decimal to octal in Java?Integer.toOctalString(493)
How do I convert decimal to octal in C#?Convert.ToString(493, 8)
How do I convert decimal to octal in PHP?echo decoct(493);
How do I convert decimal to octal in Rust?format!("{:o}", 493)
How do I convert decimal to octal on Linux?printf '%o\n' 493
How do I pad octal to 3 digits?JavaScript: (5).toString(8).padStart(3, '0'). Python: format(5, '03o'). Result: 005.
How do I convert decimal to octal by hand?Divide the number by 8 repeatedly and write down each remainder. Read the remainders from bottom to top. For 493: 493/8=61 r5, 61/8=7 r5, 7/8=0 r7, so 755.
How do I get a chmod mode from permissions?Add read 4, write 2 and execute 1 for each of owner, group and others. rwxr-xr-x is 7, 5, 5, so 755 in octal, which is 493 in decimal.
What is the largest number in 8, 16 and 32 bits?Unsigned: 255 (377), 65535 (177777) and 4294967295 (37777777777). Signed two's complement: 127 (177), 32767 (77777) and 2147483647 (17777777777).
How are negative numbers written in octal?With two's complement. -1 in 8 bits is 377, in 16 bits is 177777. For -5 in 8 bits: 005 inverted is 372, plus 1 is 373.
How do I convert a decimal fraction to octal?Multiply the fraction by 8 repeatedly and write down the integer part each time. For 0.625: 0.625 x 8 = 5.0, so 0.5.
Why is octal 0.1 not exact?Decimal 0.1 is 0.0631463146... in octal and never ends, so the tool cuts it at the chosen number of digits.
How do I convert octal back to decimal?JavaScript: parseInt('755', 8). Python: int('755', 8). Result: 493.