The DEC2OCT function converts decimal numbers into octal numbers.

## Contents:

## Syntax

`= DEC2OCT(`*number, [places]*)

*number -* The decimal number you wish to convert to an octal number

[*places*] - Optional, number of significant digits to pad the octal number

### Explanation

The DEC2OCT function is part of the "Engineering" group of functions within Excel.

This function takes in decimal numbers and converts them into octal form.

The octal number can be up to 10 characters, or bits, in length. If the length exceeds this, a #NUM error will be returned.

This means the largest number than can be represented is "3777777777" in octal or 536,870,911 in decimal form.

When using the optional places argument, the places number will pad the returned octal number with zeros.

## What is a Decimal Number

A decimal number is a number expressed in the base-10 numeral system, also known as the decimal system, the most commonly used system worldwide.

Each digit is based on its position, or place value, which increases by a power of 10 as you move from right to left.

In this example, the number 102 is calculated by multiplying the ones place, "2", by 1, then the tens place by "0", and finally the hundreds place by "1", and adding the results together.

## What is an Octal Number

The octal number system uses base 8, and uses the standard 0-9 digits.

Because octals use a base 8, this means that the as the numbers of digits increase, their place value, increases by a power of 8. The first being 8^0 = 1, next being 8^1 = 8, 8^2 = 64, and so on.

If we look at it visually, it would look like this:

In this example, the octal number 146 is calculated by multiplying the first value , "6", by 1, the second value "4" by 8, and finally the third value "1" by 64, and then adding them all together to get 102.

### Examples

## How to Convert Decimal Number to Octal

Let's say we have table of decimal numbers, and need to convert them into octal.

The formula to convert from decimal to octal would be:

`= DEC2OCT(`*decimal_number*)

If we plug this formula into the table, the formula returns the correct octal number.

Using the DEC2OCT function in the right column lets us easily convert multiple decimal numbers at once.