Calc DEC2OCT function

The DEC2OCT function converts a decimal number to its octal equivalent.

Help CentreFunctions & Formulas

For a full list of available calculation functions, please read What calculation functions are supported.


Description

The DEC2OCT function converts a decimal number to its octal equivalent. This is useful in various applications, especially in computing and digital electronics, where octal representation is sometimes used.


Syntax

DEC2OCT(number, [places])


The DEC2OCT function syntax has the following arguments:

  • number Required. The decimal number you want to convert to octal. It must be an integer between -536870912 and 536870911.
  • places Optional. The number of characters to use for the octal result. If omitted, the function returns the minimum number of characters necessary to represent the number in octal.

Example

FormulaDescriptionResult
=DEC2OCT(8)Converts the decimal number 8 to octal.10
=DEC2OCT(64)Converts the decimal number 64 to octal.100
=DEC2OCT(-1)Converts the decimal number -1 to octal (two's complement representation).77777777777

Errors

For a full list of formula errors, please read Formula errors.


Related functions

See it working on your own data

Everything documented here ships with the platform – try the document tools free, or go live in 7 days.