OCT2DEC Function

Converts an octal number to decimal.

Category

Engineering

Available in

All versions, Microsoft 365

Returns

A number

Want to practice OCT2DEC in a real spreadsheet? Open a blank sheet in our Practice Sandbox and try it with live data, with the AI Excel tutor beside you. No Excel needed — just a free account.Try it free in the Sandbox

Overview

OCT2DEC converts a octal number into decimal. Octal (base 8) uses the digits 0–7. Decimal (base 10) is the everyday number system.

Negative numbers use a fixed 10-character form called two's complement: the first digit acts as the minus sign. For example −1 is 1111111111 in binary, 7777777777 in octal and FFFFFFFFFF in hex. So OCT2DEC reads a 10-character octal value starting with 4–7 as negative.

Syntax

=OCT2DEC(number) Explain

Arguments

ArgumentRequired?What it does
numberYesThe octal number to convert, as text or a number — up to 10 characters.

Examples

Example 1 — Octal to decimal

Each row converts the value in column A.

B2fx=OCT2DEC(A2)
AB
1OctalDecimal
2755493
3644420
410064
57777777634-100
=OCT2DEC(A2) Explain

Example 2 — Read a permission code

Turn a chmod value back into the decimal number a script stores.

=OCT2DEC(755) Explain

Returns 493.

Common mistakes

  • #NUM! The text isn't valid octal (for example a 2 in binary), it's longer than 10 characters.

Notes

  • The answer is a real number you can calculate with.
  • Related functions: DEC2OCT, OCT2BIN, OCT2HEX, DECIMAL.
Kyle Stott

Author

Kyle Stott

Certified Microsoft Excel Expert

Kyle has worked professionally with Microsoft Excel for over a decade and has consulted on and taught Excel best practices to over 400 companies across 30+ countries.