Math
LOG and LOG10: calculate custom-base logarithms, binary depth, and decibels
Compute base-10 orders of magnitude and decibels with LOG10, or binary/custom-base logarithms with LOG(number, base).
Choose LOG10 for powers of 10 and LOG(number, base) for any base
LOG10(number) returns the base-10 logarithm: LOG10(1000) = 3 because 10^3 = 1000. In acoustics and electronics, 10 * LOG10(P2 / P1) converts a power ratio into decibels (dB).
LOG(number, [base]) defaults to base 10 when base is omitted, and uses a positive base other than 1 when specified—such as LOG(256, 2) = 8 bits for 256 distinct states.
| PowerRatio (A) | NodeCount (B) | Decibels 10*LOG10(A) | TreeDepth LOG(B, 2) |
|---|---|---|---|
| 1000 | 256 | 30 dB | 8 |
Calculate decibel gain and base-2 bit depth
A 1000x power gain equals 10 * LOG10(1000) = 30 dB, and 256 addressable states require LOG(256, 2) = 8 bits.
=10 * LOG10(A2)Zero or negative arguments return #NUM!
Logarithms are defined only for strictly positive numbers (number > 0) and positive bases not equal to 1. Passing 0 or a negative value returns #NUM!.
=LOG10(0)Try the example
Use the original values or change them to test your understanding.