BIN2DEC Function in ONLYOFFICE Spreadsheet Editor: Syntax, Examples and Troubleshooting
Learn BIN2DEC in ONLYOFFICE Spreadsheet Editor: convert binary digits to decimal, vendor syntax, reproducible spreadsheet examples, advanced uses, errors, version/locale caveats and official references.
Verification status: See the evidence and test scope described in this guide. How formula examples are checked
Availability and version history
- Introduced: The original introduction version and date are not established by the official sources checked.
- Availability: Documented in the current ONLYOFFICE Spreadsheet Editor help; no final working-version endpoint is established.
- Scope: Docs and Desktop Editors release separately. This unversioned help does not establish availability in every older build, mobile client or deployment.
- Checked: October 14, 2026, against the official function reference. Documentation check; not a new native test.
Quick answer
Convert a binary numeral (base 2) to a decimal number (base 10), with each binary position representing a power of two. The formula is =BIN2DEC(number) according to the ONLYOFFICE BIN2DEC help article. All worked outputs below are mathematical expectations obtained independently; none is an observed result from a running copy of ONLYOFFICE.
What BIN2DEC does
Convert a binary numeral (base 2) to a decimal number (base 10), with each binary position representing a power of two. Each binary position is worth a power of 2, counted from the right (1, 2, 4, 8, 16, …). The official function reference categorizes BIN2DEC as an engineering function.
This is a base conversion, not a change to a worksheet’s number formatting. Keep original values alongside their converted equivalents so readers can audit the conversion. The expected results are decimal numbers (no fixed output width). Leading zeros in the input string are not preserved in the output.
Official syntax, argument order, types and defaults
=BIN2DEC(number)
| Argument | Required? | Type/input | Default | Meaning and cautions |
|---|---|---|---|---|
number |
Required | Binary numeral supplied as a formula argument or cell reference | — | Only 0 and 1; ONLYOFFICE documents a maximum of 10 characters. |
The argument order is one required number argument. This function has no optional width argument. Exact source: ONLYOFFICE BIN2DEC function, checked 2026-10-13.
Use at most 9 characters in the nonnegative examples so the reference’s undocumented signed high-bit interpretation is not implicitly asserted. Decimal-base integers are not automatically binary or hexadecimal strings just because they contain digit characters. A quoted formula literal such as "1010" prevents loss of leading zeros in the expression; cell data may require Text formatting. Do not assume that text coercion, whitespace, lowercase input, signed encodings, or fractional inputs behave exactly like Excel or another editor.
Reproduce the worksheet step by step
- Open a blank spreadsheet in the editor you plan to support and create headers A1 = Use case, B1 = Input, C1 = Formula / result. Treat these columns as a self-contained audit worksheet.
- Enter all B2:B17 as Text before typing the values to prevent loss of leading zeros and to preserve any A–F digits.
- Type the source values in column B exactly as shown. In C2, enter
=BIN2DEC(B2), and then fill down through C17. Verify the function name using the editor’s Formula tab, Insert Function dialog orShift+F3, as described in the official formula-entry guide. - Compare displayed values against the independent mathematical expectations below. Record the program edition, version, operating system and formula language if native results differ; this manuscript contains no native execution data.
- Keep the unconverted column unchanged so that original inputs remain available for comparison.
| Row | Use case (A) | Input (B) | Formula for C | Independent expected C |
|---|---|---|---|---|
| 2 | Zero flag | 0 (Text) |
=BIN2DEC(B2) |
0 |
| 3 | Single on bit | 1 (Text) |
=BIN2DEC(B3) |
1 |
| 4 | Two-state code | 10 (Text) |
=BIN2DEC(B4) |
2 |
| 5 | Three events | 11 (Text) |
=BIN2DEC(B5) |
3 |
| 6 | Five units | 101 (Text) |
=BIN2DEC(B6) |
5 |
| 7 | Eight-state threshold | 1000 (Text) |
=BIN2DEC(B7) |
8 |
| 8 | Ten items | 1010 (Text) |
=BIN2DEC(B8) |
10 |
| 9 | Fifteen units | 1111 (Text) |
=BIN2DEC(B9) |
15 |
| 10 | Sixteen units | 10000 (Text) |
=BIN2DEC(B10) |
16 |
| 11 | Alternating bits | 101010 (Text) |
=BIN2DEC(B11) |
42 |
| 12 | One hundred | 1100100 (Text) |
=BIN2DEC(B12) |
100 |
| 13 | Eight low bits set | 11111111 (Text) |
=BIN2DEC(B13) |
255 |
| 14 | Leading-zero label | 00000101 (Text) |
=BIN2DEC(B14) |
5 |
| 15 | Alternating byte | 01010101 (Text) |
=BIN2DEC(B15) |
85 |
| 16 | Bit mask | 10011001 (Text) |
=BIN2DEC(B16) |
153 |
| 17 | Inventory flags | 00101101 (Text) |
=BIN2DEC(B17) |
45 |
Ready-to-paste formulas
The following use literal inputs rather than cell references. Quotes mark a base representation as text where applicable; the expected results are calculated independently using powers of the base.
| Formula | Independent expected result |
|---|---|
=BIN2DEC("0") |
0 |
=BIN2DEC("1") |
1 |
=BIN2DEC("10") |
2 |
=BIN2DEC("11") |
3 |
=BIN2DEC("101") |
5 |
=BIN2DEC("1000") |
8 |
=BIN2DEC("1010") |
10 |
=BIN2DEC("1111") |
15 |
=BIN2DEC("10000") |
16 |
=BIN2DEC("101010") |
42 |
=BIN2DEC("1100100") |
100 |
=BIN2DEC("11111111") |
255 |
=BIN2DEC("00000101") |
5 |
=BIN2DEC("01010101") |
85 |
=BIN2DEC("10011001") |
153 |
=BIN2DEC("00101101") |
45 |
Mathematical verification method: For conversion to decimal, evaluate the position weights in base 2 or 16. For conversion from decimal, repeatedly divide by the target base and read remainders from right to left (or equivalently compute the exact integer base representation). For text width, add leading zeros without changing the magnitude. These are not tests executed by ONLYOFFICE.
Advanced applications and real-world interpretation
Decode an eight-character bit mask
In B2 store text 00101101. =BIN2DEC(B2) has independent expected result 45, because 32 + 8 + 4 + 1 = 45. Leading zeros do not change the positive mathematical value, but they are important if the code represents eight flags. This is not a claim about input coercion in a tested editor.
Round-trip and preserve width
For a binary identifier 00101101, =DEC2BIN(BIN2DEC("00101101")) independently yields 101101; leading zeros are lost in a minimal-width representation. Request an eight-character padded result with =DEC2BIN(BIN2DEC("00101101"),8), mathematically 00101101. The combined formula has not been run natively.
Separate numbers from identifiers
A value 00101 can represent the mathematical number 5 or a five-character fixed-width code. Store identifiers in Text-formatted cells, not as ordinary autoformatted numbers, to avoid losing zeros before applying the function. For reports, keep the original identifier in one column and the decoded numeric value in another.
Compare with general base conversion
=DECIMAL("101101",2) also has the mathematically expected result 45. DECIMAL has its own documented argument restrictions, so it is not proof that BIN2DEC accepts every long or signed string accepted by another function. Use the relevant official reference for each claim.
Errors, edge cases and troubleshooting
| Symptom / diagnostic formula | Evidence-based explanation and action |
|---|---|
=BIN2DEC("102") |
#NUM! for a character other than 0 or 1; explicitly documented. |
=BIN2DEC("11111111111") |
#NUM! for more than 10 characters; explicitly documented. |
| Formula name is not available | Check the function search under Formula > Insert Function for the installed edition; the current online help catalogue alone is not proof of support in an old build. See official function entry. |
| Formula is displayed instead of a computed value | Confirm the leading =, cell type and Show Formulas setting; use the editor’s Formula tab or the Function Arguments wizard. Vendor’s function-entry instructions. |
| Wrong zeros, unexpected text or unintended formatting | Confirm inputs were stored as intended, especially leading zeros; inspect quotes, numeric display format and the optional width, if applicable. Compare the underlying value separately from the displayed representation. |
| Locale-specific parsing or unknown function | The English examples use function names and commas from the official syntax entry; verify the installed formula language and regional separators under Advanced Settings. |
Do not infer undocumented limits. The official reference does not explain whether a 10-character binary value beginning with 1 is treated as signed. Signed two’s-complement behavior remains unverified in the intended ONLYOFFICE release. If a value is outside the clearly covered range, record it as needs native validation, not as a verified ONLYOFFICE output or an assumed error message. Invalid input can produce different errors depending on the case; this guide only attributes #NUM! to cases that the vendor explicitly documents.
Compatibility, languages, versions and editions
- Current reference scope: The official English, unversioned ONLYOFFICE Spreadsheet Editor catalogue lists BIN2DEC. The Insert Function documentation explains both typing formulas and choosing them from the function wizard. This is documentation confirmation, not a runtime test.
- Web/Docs versions: The ONLYOFFICE Docs changelog lists Docs 10.0.0, released 2026-10-10. This is the release context checked on 2026-10-13; it does not prove BIN2DEC was introduced then, nor establish its first-supported version.
- Desktop versions: The distinct ONLYOFFICE Desktop Editors changelog lists Desktop 9.4.0, released 2026-05-19 at the time of research. Desktop and web deployment version numbers cannot be interchanged. This source does not establish this function’s first Desktop release.
- Historical releases and editions: No full historical execution matrix was available. Do not claim working support in older Docs/Desktop builds or specific editions without a vendor release note or directly recorded native test.
- Locale and syntax: The Advanced Settings instructions say formula language and regional settings are configurable. The function-entry guide uses English names and comma argument separators. Localized function names, decimal separators, accepted text coercions, and display formatting have not been checked in a live editor.
- Excel/Sheets/LibreOffice compatibility: This page makes no execution claim about those products. Their formats, sign rules, size limits and error behaviour cannot substitute for ONLYOFFICE verification.
Related functions and checked references
Related ONLYOFFICE function documentation: DEC2BIN, BIN2HEX, HEX2DEC, BASE, DECIMAL. These vendor links were individually opened/checked on 2026-10-13.
For a base-independent representation, ONLYOFFICE documents BASE (number, radix, optional minimum length). For reading a text numeral in a specified radix, it documents DECIMAL (text, radix). These are related mathematical tools, not proof that their parameter limits or sign conventions equal those of BIN2DEC.
Sources and verification
| Claim | Authoritative source | Verified on | Evidentiary limit |
|---|---|---|---|
| Function purpose, name and exact argument order | Official BIN2DEC reference | 2026-10-13 | Unversioned English documentation, not native testing |
Documented #NUM! conditions in the error table |
Official BIN2DEC reference | 2026-10-13 | Only its expressly described situations; no invented error matrix |
| Formula wizard, leading equals sign, example separator | Official Insert Function guide | 2026-10-13 | User-interface instructions, not a test of every locale |
| Formula language and regional display/input settings | Official Advanced Settings | 2026-10-13 | Configuration guidance; no localized runtime test |
| Docs 10.0.0 release date | Official Docs changelog | 2026-10-13 | Product release context only; not first function support |
| Desktop 9.4.0 release date | Official Desktop changelog | 2026-10-13 | Product release context only; not first function support |
| Numerical values throughout this page | Independent positional-value arithmetic and exact integer radix conversion | 2026-10-13 | Not results observed in ONLYOFFICE |
Verification limitations: Native execution in Desktop or Docs web, localized formula entry, quote/text coercion, signed boundaries and runtime error capture were not performed. Check these cases in the intended version before relying on them.