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: See the evidence and test scope described in this guide. How formula examples are checked
LOG returns a logarithm in a chosen base. For example, LOG(8,2) is 3 because 2 raised to the third power is 8. Omitting the base uses 10, according to ONLYOFFICE’s reference.
Availability and version history
- Introduced: The original introduction version and date are not established by the checked sources.
- Availability: Documented in the current ONLYOFFICE Spreadsheet Editor help; no final supported-version endpoint is established.
- Scope: Docs and Desktop Editors release separately. The unversioned help does not establish identical support in older builds, mobile clients or every deployment.
- Checked: October 14, 2026, against the official LOG reference and related function entries. Examples were independently calculated; these formulas have not been run in the native application.
Syntax and defaults
=LOG(number, [base])
| Argument | Meaning |
|---|---|
number |
Required positive numeric input. |
base |
Optional logarithm base; omission defaults to 10. |
Brackets indicate an optional argument; do not type them. The official LOG reference specifies the positive-input rule and default base. Mathematically, a real logarithm also requires a positive base other than 1; the reference does not enumerate the corresponding runtime errors.
LOG10 uses base ten explicitly. LN uses base e. Choosing a base changes the question being answered.
A worksheet with explicit and omitted bases
Create LogLab using A1:E7. Label A:E Number, Base, Logarithm, Recovered number and Difference. Enter the inputs below; leave B5 genuinely empty.
| Row | A: number | B: base | Formula for C | Expected C |
|---|---|---|---|---|
| 2 | 8 | 2 | =LOG(A2,B2) |
3 |
| 3 | 81 | 3 | =LOG(A3,B3) |
4 |
| 4 | 125 | 5 | =LOG(A4,B4) |
3 |
| 5 | 1000 | leave empty | =LOG(A5) |
3 |
| 6 | 0.25 | 2 | =LOG(A6,B6) |
-2 |
| 7 | 27 | 3 | =LOG(A7,B7) |
3 |
Enter the formulas in C individually, or fill =LOG(A2,B2) through C7 and then replace C5 with =LOG(A5). Omitting the argument is different from passing a reference to an empty cell.
In D2 enter =POWER(B2,C2) and fill through D7; replace D5 with =POWER(10,C5). In E2 enter =D2-A2 and fill through E7. D should reconstruct the original six inputs, and E has a mathematical target of zero, subject to precision.
Use G1:H6 for labels and these controls:
| Cell | Formula | Expected result |
|---|---|---|
| H2 | =LOG(100,2) |
6.6438561898 |
| H3 | =LOG(100000) |
5 |
| H4 | =LOG(1000,10) |
3 |
| H5 | =LN(1000)/LN(2) |
9.9657842847 |
| H6 | =LN(1000) |
6.9077552790 |
The change-of-base identity is LOG(number,base)=LN(number)/LN(base). It explains why H5 and =LOG(1000,2) have the same mathematical value.
Reproduce the vendor example
Create VendorLOG. Put 56 in A1, 5 in A2 and =LOG(A1,A2) in C1. The official illustration displays 2.50109163.
Calculate the binary width of an ID
Create BinaryIds using A1:E8. Use headers Number of IDs, Log base two, Whole bits, Capacity and Unused codes. Enter the counts below in A2:A8. In B2 enter =LOG(A2,2), C2 =ROUNDUP(B2,0), D2 =POWER(2,C2) and E2 =D2-A2. Fill B2:E2 through row 8.
| Row | Number of IDs | Expected B | Expected C | Expected D | Expected E |
|---|---|---|---|---|---|
| 2 | 2 | 1 | 1 | 2 | 0 |
| 3 | 3 | 1.5849625007 | 2 | 4 | 1 |
| 4 | 4 | 2 | 2 | 4 | 0 |
| 5 | 5 | 2.3219280949 | 3 | 8 | 3 |
| 6 | 1000 | 9.9657842847 | 10 | 1024 | 24 |
| 7 | 1024 | 10 | 10 | 1024 | 0 |
| 8 | 1025 | 10.0014081944 | 11 | 2048 | 1023 |
For IDs 0 through 999, ten binary digits provide 1024 possible codes. The fractional logarithm is also the information measure for 1000 equally likely outcomes, but it is not a whole-bit storage allocation. These are mathematical targets; if exact-power boundary rounding matters in a production workbook, check the unrounded logarithm and resulting integer capacity in the target build.
Compare different bases without replacing the data
Create BaseComparison using A1:E2. Put 1000 in A2 and headers Input, Default LOG, Explicit base ten, LOG10 and Natural log across A1:E1.
- B2:
=LOG(A2)→ 3. - C2:
=LOG(A2,10)→ 3. - D2:
=LOG10(A2)→ 3. - E2:
=LN(A2)→ approximately 6.9077552790.
There is no locale-selected default base. Omission deliberately requests ten. Use POWER to reconstruct values from a chosen base and exponent.
Troubleshooting and limits
- Supply a number greater than zero. For real-valued calculations use a base greater than zero and unequal to one.
- Values between zero and one can legitimately produce negative logarithms when the base exceeds one.
- An empty base cell is not the omission case demonstrated by
=LOG(A5). - The current page does not establish text/blank coercion, exact invalid-base error tokens, extreme precision limits or client-specific differences.
- Examples use English function names, decimal points and commas. Number formatting may hide decimals without changing the stored result.