The Log10 function returns the common logarithm (base 10) of a numeric value. It is frequently used in engineering units like decibels (dB), pH levels, or any system where data scales by powers of 10.
For the best precision, use the Single data type. Note: Similar to the natural log, the input value B must be greater than zero ($B > 0$).
Example
Dim A As Single Dim B As Single B = 100.0 A = Log10(B) ' Returns 2.0 (because 10^2 = 100)
See also Log