Log Calculator
How This Converter Works
Calculates the logarithm of a number x to a supplied base b using the change-of-base rule. For a real finite result, x must be positive and b must be positive and not 1. There is no explicit validation; JavaScript NaN or Infinity results are displayed as such, without rounding.
Formula or rule
log_b(x) = ln(x) / ln(b), implemented as Math.log(x) / Math.log(b)
Example
- Input
- Number 100; base 10
- Calculation
- Math.log(100) / Math.log(10)
- Result
- 2