Contact

Zoho Sheet OCT2HEX Function: Octal to Hexadecimal with Examples

Number Conversion Intermediate Zoho Sheet

Convert octal values to hexadecimal in Zoho Sheet with exact datasets, place-value checks, documented limits and practical examples.

Verification status: See the evidence and test scope described in this guide. How formula examples are checked

OCT2HEX converts a octal representation into hexadecimal. For the positive integer 42, the source numeral is 52 and the converted result is 2A. The base changes; the represented quantity does not. Use a width argument when a receiving report needs leading zeroes.

Syntax and availability

OCT2HEX(octal_number; [num_of_digits])

Zoho’s official OCT2HEX entry was checked on October 15, 2026. It describes the rolling web service. The first supported release and last functioning version are unknown; current documentation is separate from those historical endpoints. Mobile/offline parity is unverified. Results below are independent integer calculations, not native Zoho execution.

The required source contains at most ten characters, using only 0 through 7. Numeric literals in the examples are digit sequences in the source base, not ordinary decimal quantities. The checked entry does not fully specify signed interpretation of maximum-width values; these examples use small positive values and make no unsigned or two’s-complement promise at that boundary.

The second argument chooses the output width. When the representation is shorter, Zoho pads its left side with zeroes; an insufficient width is an error, not permission to cut off significant digits. Use positive integer widths here. Fractional widths, blank inputs and Boolean coercion are not verified.

Square brackets mark an optional argument and are not typed into a formula. Omitting width gives the unpadded representation in the ordinary positive examples. Follow your workbook’s locale separator; these formulas use semicolons.

Visible official control

Zoho explicitly gives =OCT2HEX(77;5) with result 0003F. This provides a compact starting control before working with cell references. Other vendor examples refer to cells whose inputs are not visible in the extracted help; the complete worksheet below supplies its own inputs rather than inventing those hidden cells.

Complete reproducible worksheet

Create Conversions with Source in A1, Decimal_check in B1, Converted in C1, and Padded in D1. Enter the following values in A2:B7. Enter the source numerals exactly as shown, without grouping commas or base prefixes. Column B is an independent explanatory value, not an argument to the conversion formula.

Row A: source B: decimal check C: expected D: expected width 5
2 1 1 1 00001
3 7 7 7 00007
4 17 15 F 0000F
5 52 42 2A 0002A
6 77 63 3F 0003F
7 377 255 FF 000FF

Enter C2 =OCT2HEX(A2) and fill through C7. Fill D2 =OCT2HEX(A2;5) through D7. The zeroes in D belong to the representation, not to a larger numeric value.

In a copy change A5 from 52 to 53 and update its explanatory B5 to 43. C5 becomes 2B and D5 becomes 0002B. Other records remain unchanged. This gives a one-unit sensitivity check with a fully specified input.

Advanced: compare an octal word with a hex register display

Put 651 in G2 and =OCT2HEX(G2;3) in H2. The expected result is 1A9. The octal value is 6×64+5×8+1=425, while the hexadecimal value is 1×256+10×16+9=425.

Two boundary controls make the grouping change visible. =OCT2HEX(377;3) produces 0FF, representing 255; =OCT2HEX(400;3) produces 100, representing 256. Their decimal difference is one even though both displayed representations change multiple positions. A width of two is insufficient for the second result.

Change G2 to 652 in a copy. H2 becomes 1AA, representing 426. The two A characters mean ten in separate hexadecimal positions; they are not missing values or alphabetic categories. Preserve the source octal code as well as the converted display when comparing an instrument report with a register specification. Conversion does not establish byte order, sign interpretation or the meaning of individual flags in that specification.

Errors and troubleshooting

The documented #NUM! cases include an output that needs more places than the requested width, and width zero or negative. For example, =OCT2HEX(377;1) cannot hold FF in one position. Increasing the width preserves the whole representation; shortening the source value would change the data.

An invalid source digit also produces the documented #NUM! error; OCT2HEX(8) is an invalid-digit control. Do not remove an error merely to make a report appear complete: retain the raw value and investigate the format or width rule.

The shared help glossary mentions name, type and reference errors without defining a complete coercion matrix for this function. Check the source base, legal characters, cell type and literal quotation before investigating more complex formulas. Do not add 0x, 0b or other programming-language prefixes unless a product reference explicitly permits them.

Keep conversion and arithmetic separate. A nondecimal display can look like a decimal number, yet ordinary subtraction on that display need not measure the intended change. Preserve raw identifiers, document the source’s sign and width convention, and verify exported leading zeroes in the receiving system. Matching function names across spreadsheet products do not establish identical limits or behavior.