Related Function:

The DEC2OCT function accepts

### Syntax

=DEC2OCT(number,[places])

Note: Hexadecimal (base 16), decimal (base 10), octal (base 8), and binary (base 2) are the most commonly used numeral systems in engineering and computing. Therefore, Excel has provided functions to convert numeric values to and from each of these systems.

#### Arguments

Argument Description
number The decimal integer you want to convert

 • If number is negative, [places] is ignored and DEC2OCT returns a 10-character (30-bit) octal number • The most significant bit of number is the sign bit • The remaining 29 bits are magnitude bits • Negative numbers are represented using two’s-complement notation
[places] Optional. Defines the number of characters to use

 • If [places] is omitted, DEC2OCT uses the minimum number of characters necessary • [places] is useful for padding the return value with leading 0s (zeros)

#### Examples

A B C
1 Formula Result Notes
2 =DEC2OCT(58,3) 072 Converts decimal 58 to octal
3 =DEC2OCT(-100) 7777777634 Converts decimal -100 to octal
4 =DEC2OCT(18) 22 Converts decimal 18 to octal

#### Common Function Error(s)

Problem What went wrong
#VALUE! Occurs if either:

 • the supplied number argument is not numeric • the supplied [places] argument is not numeric
#NUM! Occurs if either:

 • the supplied [places] argument ≤ 0 • the result of DEC2OCT requires more than the number of [places] characters specified • the number argument is < -536,870,912 or > 536,870,911
#NAME? Occurs when Analysis ToolPak add-in is not enabled