LOG Function (OpenOffice Calc)
The LOG function in OpenOffice Calc returns the logarithm of a number to a specified base. Learn syntax, domain rules, examples, and best practices.
Verification status: Consult the documentation and examples below. Native application testing has not been documented for this guide. How formula examples are checked
The LOG function in OpenOffice Calc returns the logarithm of a number using a specified base. This makes LOG extremely flexible for scientific calculations, data transformations, engineering formulas, and any scenario where logarithmic scaling is required.
What the LOG Function Does
- Computes logarithms with any base
- Supports base‑10, base‑2, natural logs, and custom bases
- Useful for scaling, data normalization, and scientific modeling
- Works across sheets
- Pairs naturally with POWER, LN, and EXP
LOG is ideal when you need custom logarithmic transformations.
Syntax
LOG(number; base)
Arguments:
- number — A positive numeric value
- base — A positive numeric value (≠1)
Domain Rules
| Input | Valid? | Notes |
|---|---|---|
| number > 0 | ✔ | Required |
| number = 0 | ✘ | Undefined |
| number < 0 | ✘ | Undefined |
| base > 0 and base ≠1 | ✔ | Required |
| base = 1 | ✘ | Undefined |
| base < 0 | ✘ | Undefined |
Mathematically:
[ \log_b(x) \text{ is defined only for } x > 0 \text{ and } b > 0, b \neq 1 ]
Basic Examples
Log base 10 (default)
=LOG(100)
Result: 2
Log base 2
=LOG(8; 2)
Result: 3
Log base e (natural log)
=LOG(A1; EXP(1))
Equivalent to LN(A1).
Log using cell references
=LOG(A1; B1)
Advanced Examples
Change of base formula
=LOG(A1; B1)
Equivalent to:
=LN(A1) / LN(B1)
Logarithmic scaling for charts
=LOG(A1; 10)
Convert exponential form to linear
Given:
[ y = a \cdot b^x ]
Linearize:
=LOG(y; b)
Solve for exponent
[ x = \log_b(y) ]
Calc:
=LOG(y; b)
Solve for base
[ b = y^{1/x} ]
Calc:
=POWER(y; 1/x)
LOG across sheets
=LOG(Sheet1.A1; 2)
Logarithmic normalization
=LOG(A1 + 1; 10)
Logarithmic regression (manual components)
=LOG(Y1:Y10; 10)
Confirm with Ctrl+Shift+Enter.
Common Errors and Fixes
LOG returns Err:502 (Invalid argument)
Occurs when:
- number ≤ 0
- base ≤ 0
- base = 1
- Input is text
- A malformed reference is used
LOG returns Err:503 (Numeric overflow)
Occurs when:
- number is extremely large
- base is extremely small
- Result exceeds Calc’s numeric limits
LOG returns unexpected results
Possible causes:
- Using percentages incorrectly (5% vs 0.05)
- Negative or zero values from formulas
- Base not what you intended
- Text numbers not converted to numeric
LOG ignores values you expected it to include
LOG ignores:
- Text numbers (
"123") - Empty cells
- Logical values
- Errors
LOG includes values you expected it to ignore
LOG includes:
- Dates
- Times
- Numeric results of formulas
Err:508 — Missing parenthesis
Usually caused by:
- Missing
) - Using commas instead of semicolons
Best Practices
- Use LOG for custom‑base logarithms
- Use LN for natural logs
- Use LOG10 for base‑10 logs (or LOG with omitted base)
- Validate inputs to avoid negative or zero values
- Convert imported text numbers to real numbers
- Use named ranges for cleaner formulas
- Use LOG for scaling, normalization, and scientific modeling