Log of a number in any base.
log_b(x) = ln(x) / ln(b)
The logarithm log_b(x) asks: 'What exponent do I need to raise b to, in order to get x?' The general formula uses the change-of-base rule, which lets you evaluate any logarithm using the natural log (ln) or common log (log₁₀) that appear on most calculators and in most software:
log_b(x) = ln(x) / ln(b)
This is mathematically equivalent to:
log_b(x) = log₁₀(x) / log₁₀(b)
Both expressions yield the same result. The answer tells you the exponent to which base b must be raised to produce x.
log₃(81) = ln(81) / ln(3) = 4.39445 / 1.09861 ≈ 4
Result: log₃(81) = 4
The result 4 means that 3 raised to the power of 4 equals 81 (3⁴ = 3 × 3 × 3 × 3 = 81). You can always verify a logarithm result by checking that b^(result) = x. In this case, 3⁴ = 81 ✓. If your result is a decimal (for example, log₁₀(50) ≈ 1.69897), it simply means the base must be raised to that fractional power to reach the argument.
A logarithm is the inverse operation of exponentiation. If you know that 10² = 100, then log₁₀(100) = 2. The logarithm 'undoes' the exponent.
| Base | Name | Notation | Common Use | |------|------|----------|------------| | 10 | Common log | log(x) or log₁₀(x) | Engineering, pH, decibels | | e ≈ 2.71828 | Natural log | ln(x) | Calculus, growth/decay models | | 2 | Binary log | log₂(x) | Computer science, information theory |
The logarithm is only defined for x > 0 and b > 0, b ≠ 1. Attempting to take the log of zero or a negative number produces an undefined (or complex) result in standard real-number math.
On most scientific calculators, the 'log' key computes log base 10, while the 'ln' key computes the natural logarithm (log base e). This calculator lets you specify any base, so you can replicate both by entering 10 or e as the base.
The natural log is used to solve for time in the continuous compound interest formula. If A = Pe^(rt), then t = ln(A/P) / r. This tells you how long it takes for an investment to reach a target value.
log₂(n) tells you how many times you can halve a dataset of size n before reaching a single element. This is why binary search and balanced binary tree operations run in O(log₂ n) time — it represents the number of decision steps needed.
Yes. To solve an equation like 5^x = 200, take the log of both sides: x = log₅(200) = ln(200)/ln(5) ≈ 3.292. Logarithms are the standard algebraic tool for isolating exponents.
A base between 0 and 1 produces a decreasing (negative-slope) logarithm. For example, log_(0.5)(8) = −3, because (0.5)^(−3) = 2³ = 8. The result is negative when x > 1 and positive when 0 < x < 1.
log₁₀(1000) = 3, because 10³ = 1000.
The natural log, written ln(x), is the logarithm with base e (≈ 2.71828). The 'common log', written log(x), uses base 10. They are related by ln(x) = log(x) / log(e) ≈ log(x) / 0.43429.
Yes. Enter your number in the Number field and type 2 as the base. For example, log₂(1024) = 10.
There is no real-number exponent you can raise a positive base to and get a negative result. For example, 10^x is always positive regardless of x, so log₁₀(−5) has no real solution.
A result of 0 means the argument equals 1, because b⁰ = 1 for any valid base b. So log_b(1) = 0 always.
Raise the base to the power of your result and check if you get the original number. If log_b(x) = y, then b^y should equal x. For example, log₅(125) = 3, and 5³ = 125 ✓.
Only sources that have been reviewed are shown. Unverified citations are never published.