Converts a decimal number to signed octal format. Learn more
DEC2OCT is a function used in Google Sheets to convert a decimal number into its octal equivalent. Octal is a base-8 number system, meaning it uses eight digits (0-7) to represent numbers, whereas decimal is a base-10 number system, using ten digits (0-9).
The DEC2OCT function takes two arguments: the decimal number you want to convert and an optional argument for the number of significant digits to include in the resulting octal number. If you omit the second argument, the function will return the full octal representation of the decimal number.
For example, the decimal number 42 would be represented as 52 in octal (58^1 + 28^0 = 42). To convert this using the DEC2OCT function in Excel, you would enter =DEC2OCT(42) in a cell, and the result would be 52. If you wanted to limit the number of significant digits to 3, you would enter =DEC2OCT(42,3), which would return 052.