LOG Function in ONLYOFFICE Spreadsheet Editor: Base Choice, Syntax and Examples
Calculate logarithms for an explicitly chosen base or default base 10 in ONLYOFFICE, with data checks and realistic applications.
Verification status: Official documentation referenced; example outcomes independently reasoned or arithmetically checked where stated. Not executed in ONLYOFFICE Spreadsheet Editor. How formula examples are checked
Quick answer: LOG returns the logarithm of a positive number to a chosen base. The second argument lets you work in base 2, base 10, base 3 or another mathematically valid base. If the second argument is omitted, ONLYOFFICE explicitly documents base 10 as the default.
Verification: Outputs are independently calculated mathematical expectations. Native Desktop/web execution, localized parsing, runtime errors and file round trips were not tested.
What LOG does and when to use it
The base determines the unit scale: base 10 counts powers of ten, base 2 counts powers of two. An omitted base is an intentional choice of 10 in ONLYOFFICE, not an unspecified implementation detail.
For x>0, b>0, b≠1: LOG_b(x)=LN(x)/LN(b). For integer b greater than 1, LOG(b^k,b)=k mathematically.
Official syntax and argument order
=LOG(number, [base])
| Argument | Required? | Type and meaning |
|---|---|---|
number |
Required | Positive numeric value whose logarithm is requested. |
base |
Optional | The logarithm base; documented default is 10 when omitted. |
The official reference explicitly gives base = 10 when omitted. Square brackets in documentation indicate optional notation; never type the brackets as literal formula characters.
The spelling, argument order and documented defaults above follow the ONLYOFFICE LOG function reference, accessed 2026-10-13. No argument-order assumptions were borrowed from another spreadsheet product.
Enter the function in ONLYOFFICE
- Open a blank spreadsheet and select an empty result cell.
- Type a formula beginning with
=, or use Formula → Function, search forLOG, then enter the required arguments. - For the following examples, use the English function name, a decimal point, and commas where multiple arguments appear, matching ONLYOFFICE’s documented English formula examples.
- Confirm the result, then use the cell’s number format to display six decimal places when comparing fractional expected values.
- If a formula is rejected, check File → Advanced Settings for formula language and regional settings. ONLYOFFICE lets you change formula language and decimal/grouping separators; the exact punctuation for each locale has not been tested. Do not blindly replace commas with semicolons without checking the target installation.
Reproducible worksheet example
Enter the following number/base pairs in A2:B7. In C2 type =LOG(A2,B2) and copy down where a base is supplied. For the row marked “omit base,” use =LOG(A5) instead. Format C2:C7 to six decimal places to compare with expected figures.
| Row | A: number | B: base | C: formula | Expected C |
|---|---|---|---|---|
| 2 | 8 |
2 |
=LOG(A2,B2) |
3.000000 |
| 3 | 81 |
3 |
=LOG(A3,B3) |
4.000000 |
| 4 | 125 |
5 |
=LOG(A4,B4) |
3.000000 |
| 5 | 1000 |
(omit) |
=LOG(A5) |
3.000000 |
| 6 | 0.25 |
2 |
=LOG(A6,B6) |
-2.000000 |
| 7 | 27 |
3 |
=LOG(A7,B7) |
3.000000 |
Verification method: table outputs above are numerical expectations computed independently with Python’s math library, formatted to six decimal places. They are not asserted as ONLYOFFICE screenshots, native execution results or exact display strings. The vendor’s reference verifies the formula form but not the sample rows.
Additional formulas you can reproduce
The following formulas use literal numeric values, so they can be pasted into any blank result cell of a scratch workbook. Results are six-decimal mathematical expectations (unless the underlying calculation is an exact integer).
| Formula to enter in a blank cell | Independently calculated expected value (six decimals) |
|---|---|
=LOG(8,2) |
3.000000 |
=LOG(81,3) |
4.000000 |
=LOG(125,5) |
3.000000 |
=LOG(1000) |
3.000000 |
=LOG(0.25,2) |
-2.000000 |
=LOG(27,3) |
3.000000 |
=LOG(100,2) |
6.643856 |
=LOG(100000) |
5.000000 |
=LOG(1000,10) |
3.000000 |
=ROUNDUP(LOG(1000,2),0) |
10.000000 |
=LN(1000)/LN(2) |
9.965784 |
Avoid mistaking a displayed rounded value for exact mathematical equality. A visible 0.000000 may arise from cell formatting when the internal value is merely small.
Advanced use: comparing orders of magnitude
For A2=100000, =LOG(A2) returns the base-10 exponent 5. For A2=100, =LOG(A2,2) returns approximately 6.643856; the same numeric input tells a different story in another base.
Bits required to encode a range of possibilities
If A2=1000 is the count of equally possible outcomes, enter:
=LOG(A2,2)
The expected information measure is 9.965784 bits (mathematical ideal, not a storage allocation). If you need a whole number of binary digits for IDs numbered 0 through 999, use =ROUNDUP(LOG(A2,2),0) → 10. The whole-number conclusion assumes every ID must fit, while the entropy interpretation assumes equally likely outcomes.
Change-of-base identity
=LN(A2)/LN(2) gives the same mathematical value as =LOG(A2,2) for positive A2. This identity is useful when comparing spreadsheets, but equivalence in a particular build still needs native execution verification.
Match LOG with LOG10 and LN
For A2=1000: =LOG(A2) (default base 10) and =LOG10(A2) both have expected output 3; =LN(A2) has expected output about 6.907755. No cross-editor result is assumed from this mathematical comparison.
Errors, restrictions and troubleshooting
| Symptom or issue | Check and correction | Evidence status |
|---|---|---|
| LOG returns an unexpected fraction | Check the chosen base: LOG(8,2) is 3, while LOG(8) uses base 10. |
Official default + mathematics |
| Value is zero or negative | Official documentation requires number > 0. |
Official reference |
| Base is 1, 0 or negative | A real logarithm requires a positive base other than 1. Verify exact ONLYOFFICE error behaviour natively; the reference does not specify a base-domain error message. | Mathematical domain / native pending |
| Missing optional argument | =LOG(100) deliberately uses base 10; it does not use the system locale as the base. |
Official default |
| A cell contains text | Replace with numeric values. Text conversion and exact error codes are untested. | Native pending |
| Locale punctuation mismatch | Follow the documented English syntax and check Formula Language and regional settings in your editor. | Official interface + locale guide |
Limits and precision
Official LOG documentation confirms number > 0 and base 10 on omission, but does not state a first-supported version or enumerate all invalid-base errors. In real-number mathematics, an alternative base must be >0 and !=1. Do not present an expected #NUM! / #VALUE! or coercion rule as an observed ONLYOFFICE fact without native execution.
For a comparative spreadsheet tutorial, note that other spreadsheet editors may expose identically named functions, but naming alone does not prove equivalent coercion, domain error codes, or release support. Formula portability must be tested in the actual target software and version. No such third-party result is used to establish ONLYOFFICE behaviour here.
ONLYOFFICE Desktop, web and language compatibility
- Documentation scope: The current ONLYOFFICE Help Center function reference lists
LOGin the Math and Trigonometry catalogue and gives the syntax above. The page does not identify the first supported Desktop, Docs server or self-hosted release. The listing is evidence of present documentation, not an execution test across editions. - Desktop/web: The separate Desktop Editors changelog and browser-oriented Spreadsheet Editor guide exist, but a specific minimum version for
LOGwas not established. Do not label all historical versions compatible. - Locale: ONLYOFFICE advanced settings documents formula language and regional numeric formatting. The formulas here use English names and decimal-point notation. Localized formula names, separators and translated errors remain pending native verification.
- File exchange: These examples are designed around workbook formulas and simple numeric cells; saved-file round trips and cross-application differences were not executed.
Related ONLYOFFICE documentation and verified source links
| Evidence | Official ONLYOFFICE source | Accessed (UTC) | Version qualification |
|---|---|---|---|
| log-syntax-default: LOG(number, [base]), numeric number >0, optional base defaults to 10. | https://helpcenter.onlyoffice.com/functions/log.aspx | 2026-10-13 | Current unversioned Help Center reference; no first-supported version inferred |
| ln-contrast: LN(number) is natural logarithm and requires positive number. | https://helpcenter.onlyoffice.com/functions/ln.aspx | 2026-10-13 | Current unversioned Help Center reference; no first-supported version inferred |
| log10-contrast: LOG10(number) computes a base-10 logarithm. | https://helpcenter.onlyoffice.com/functions/log10.aspx | 2026-10-13 | Current unversioned Help Center reference; no first-supported version inferred |
| regional: Formula language and locale formatting settings are configurable. | https://helpcenter.onlyoffice.com/docs/userguides/spreadsheet_editor/AdvancedSettings.aspx | 2026-10-13 | Current unversioned Help Center reference; no first-supported version inferred |
| Function-insertion process | https://helpcenter.onlyoffice.com/docs/userguides/spreadsheet_editor/InsertFunction.aspx | 2026-10-13 | Current unversioned guide; Desktop/web steps may vary |
| Formula language and formatting | https://helpcenter.onlyoffice.com/docs/userguides/spreadsheet_editor/AdvancedSettings.aspx | 2026-10-13 | Current unversioned guide; region-specific entry untested |
Verification limitations
Native Desktop/web execution, text/blank coercion, invalid-argument errors, regional formula entry, historical release support and workbook round trips remain unverified.