LOG10
LOG10(number) returns the base-10 logarithm, the order of magnitude of a number. Worked examples, the digit-count trick, and the #NUM! case. Matches Excel.
Syntax
LOG10(number) | Argument | Required | Description |
|---|---|---|
number | Required | A positive number. |
Examples
Every example below was executed against VisiGrid engine 0.54.0 — not
transcribed from another vendor's documentation. Reproduce any of them with vgrid calc.
| Formula | Result | Notes |
|---|---|---|
=LOG10(1000) | 3 | |
=LOG10(0.01) | -2 | |
=INT(LOG10(A2))+1 | 5 | The number of digits before the decimal point. |
=LOG10(-1) | #NUM! |
Same as LOG with no base
LOG10(x) and LOG(x) give the same answer. LOG10 says the base out loud,
which is worth something in a formula someone else will read.
Orders of magnitude
The integer part of LOG10 is how many powers of ten a number spans: 2 for
anything in the hundreds, 3 for the thousands. Adding one gives the digit count
of a positive whole number, which is handy for validating IDs that should all be
the same length:
=INT(LOG10(12345))+1 → 5
Values spread across several orders of magnitude — file sizes, city
populations, transaction amounts — are often easier to compare after taking
LOG10, because equal steps then mean equal ratios.
Excel compatibility
Matches Excel.