Decimal to Octal
Decimal (dec)
Octal (oct)
How it is calculated
The number is first converted to decimal as digits × radixⁿ, then to the selected base by division with remainder. Prefixes 0x, 0b, 0o and digit grouping with spaces or _ are allowed.
dec: digits 0 1 2 3 4 5 6 7 8 9, radix 10
oct: digits 0 1 2 3 4 5 6 7, radix 8
255 ÷ 8 = 31 remainder 7 (7)
31 ÷ 8 = 3 remainder 7 (7)
3 ÷ 8 = 0 remainder 3 (3)
255₁₀ = 377₈