Logarithm Calculator
Compute the logarithm of any positive number for any base. By default it uses base 10 (common logarithm), but you can set any base such as 2 (binary log) or e (natural log) to find the exponent that produces your value.
- Natural log ln(x)
- 6.907755
- Common log log10(x)
- 3
The logarithm log_b(value) answers "to what power must the base be raised to get the value?" Both value and base must be positive, and the base must not equal 1.
What the Logarithm Calculator Does and Who It's For
This logarithm calculator finds the logarithm of a positive number for any base you choose. Enter the value (x) and the base (b), and it returns log_b(x) โ the exponent to which the base must be raised to produce your number.
It's useful for students working through algebra and precalculus, engineers and scientists dealing with decibels, pH, or signal scales, and anyone who needs a quick log without a scientific calculator. You can compute common logs (base 10), binary logs (base 2), or the natural logarithm, which uses the constant e (about 2.71828).
How Logarithms Work: The Formula
A logarithm answers the question: "What power do I raise the base to in order to get this number?" Formally:
log_b(x) = y means b^y = x
So log_b(x) is the inverse of exponentiation. The base b must be positive and not equal to 1, and the value x must be positive. Logarithms of zero or negative numbers are undefined in the real numbers.
Calculators usually store only base-10 (log) and base-e (ln) functions, so to find any other base they apply the change-of-base formula:
log_b(x) = ln(x) / ln(b) = log(x) / log(b)
Worked Example with Real Numbers
Suppose you want log_2(32) โ the power of 2 that gives 32. Since 2^5 = 32, the answer is exactly 5.
Now try a value that isn't a clean power, such as log_2(50). Using change of base: log_2(50) = ln(50) / ln(2) = 3.91202 / 0.69315 = 5.6439. You can check it: 2^5.6439 is approximately 50.
For a natural log, log_e(20) = ln(20) = 2.9957, because e^2.9957 is about 20. For a common log, log_10(1000) = 3, since 10^3 = 1000.
Key Logarithm Rules That Affect the Result
Knowing a few identities helps you sanity-check answers and simplify expressions before calculating:
- log_b(1) = 0 for any valid base, because b^0 = 1.
- log_b(b) = 1, since b^1 = b.
- Product rule: log_b(xยทy) = log_b(x) + log_b(y).
- Quotient rule: log_b(x/y) = log_b(x) - log_b(y).
- Power rule: log_b(x^n) = n ยท log_b(x).
Common Mistakes and Practical Tips
The most frequent error is confusing log (base 10) with ln (base e). On many calculators "log" means base 10, so always confirm the base you actually want before reading the result.
Another mistake is entering a non-positive value. Because no real power of a positive base yields zero or a negative number, log_b(0) and logs of negatives have no real answer. Also remember the base cannot be 1, since 1 raised to any power is always 1.
If you only have base-10 or natural log buttons, use the change-of-base formula above โ it works with either built-in log, and both give the same answer. Finally, watch significant figures: small rounding in ln(b) can shift the final digit, so keep extra decimals during intermediate steps.
Frequently asked questions
What does the logarithm tell me?
It gives the exponent the base must be raised to in order to produce your value. For example, log base 10 of 1000 is 3 because 10^3 = 1000.
How do I compute a natural logarithm?
Set the base to e (about 2.71828). The natural log is also shown directly as a supporting output.
Why must the value and base be positive?
Logarithms are only defined for positive values, and the base must be positive and not equal to 1. Other inputs are undefined.
What is log base 2 used for?
Base 2 logarithms (binary logs) are common in computing and information theory, measuring how many times a value can be halved or the number of bits needed.