Logarithm Calculator (Any Base)
Enter a number and a base to compute log_b(x). It also shows the natural log ln, common log log10, and binary log log2, with a curve graph.
Last updated:
Input
Enter the number x (greater than 0) and the base b (greater than 0 and not 1) to compute the logarithm log_b(x).
A positive number greater than 0
Greater than 0 and not equal to 1
Result
log base 2
3
Change of base
log_b(8) = ln(8) ÷ ln(2)
Natural log ln (base e)
2.07944154
Common log log10
0.90308999
Binary log log2
3
A logarithm with any base is found by the change of base formula log_b(x) = ln(x) divided by ln(b). The number must be positive and the base must be a positive value other than 1.
How it works
- The logarithm log_b(x) is the exponent to which the base b must be raised to produce the number x. For example log_2(8) equals 3 because 2 raised to the power 3 is 8.
- A logarithm with any base is computed from the change of base formula log_b(x) = ln(x) divided by ln(b). This tool uses that formula.
- The number x must be greater than 0. Real logarithms are undefined for values that are 0 or negative.
- The base b must be greater than 0 and not equal to 1. When the base is 1 the divisor ln(b) becomes 0 and the result is undefined.
- The natural log ln uses base e (about 2.71828), the common log log10 uses base 10, and the binary log log2 uses base 2.
Frequently asked questions
- How is log_b(x) computed?
- log_b(x) is the exponent to which the base b must be raised to get x. Any base is computed with the change-of-base formula log_b(x)=ln(x)÷ln(b); for example, log_2(8)=3.
- What is the difference between ln, log10, and log2?
- Natural log ln uses base e (about 2.71828), common log log10 uses base 10, and binary log log2 uses base 2. This tool shows all three at once.
- Are there values I cannot enter for x or the base?
- The argument x must be greater than 0, since logs of non-positive numbers are not real. The base b must be greater than 0 and not equal to 1, because a base of 1 makes ln(b) zero and the calculation impossible.
Reviews
Tell us what you think of this calculator.
Write a review
Found an incorrect result or a problem? Turn this on to report it.
Rating