Logarithm Calculator
Enter a number and a base to find its logarithm, along with the natural log, log base 10, and log base 2.
pH uses hydrogen-ion activity. Concentration is an ideal approximation, assuming a unit activity coefficient. IUPAC
Check the active inputs and the formula domain. Blank, malformed or out-of-range values clear every result.
x=bʸ; ln(ab)=ln(a)+ln(b); ln(a/b)=ln(a)−ln(b); L=10log₁₀(I/I₀); pH=−log₁₀(aH⁺); t=ln(2)/ln(1+r/100).
Approximate results show up to 12 significant digits. Decimal fields use a dot, up to 12 digits on each side, an exponent from −24 to 24 and absolute values up to 10¹². Rational intermediate numerators and denominators are limited to 512 bits. Integer and scientific-notation exceptions are specified below. logᵦx=ln(x)/ln(b); x,b > 0; b ≠ 1.
How logarithms work
The logarithm log_b(x) answers the question: to what power must b be raised to get x? This calculator uses the change-of-base formula, log_b(x) = ln(x) / ln(b), to compute the logarithm for any valid base.
Natural log (ln) uses base e (≈2.71828), common log uses base 10, and binary log uses base 2 — all three are shown automatically since they're the most frequently used in math, science, and computing.
Frequently asked questions
Why must x be greater than 0?
Logarithms are only defined for positive real numbers — there's no real power you can raise a base to that produces zero or a negative number.
Why can't the base equal 1?
Any power of 1 is always 1, so log base 1 could never reach any value other than 1, making it undefined as a logarithm base.
What's the difference between log and ln?
"log" conventionally refers to log base 10 (the common logarithm), while "ln" specifically means the natural logarithm, log base e.
How we verified this calculator
The calculator is checked against 3 reference cases computed independently from the sources below. Last passed: .
| # | Inputs | Expected result |
|---|---|---|
| 1 |
Mode = Logarithms
Number (x) = 1000
Base (b) = 10
|
Result: 3
ln(x): 6.90775527898
log₁₀(x): 3
log₂(x): 9.96578428466
|
| 2 |
Mode = Logarithms
Number (x) = 50
Base (b) = 3
|
Result: 3.56087679501
ln(x): 3.91202300543
log₁₀(x): 1.69897000434
log₂(x): 5.64385618977
|
| 3 |
Mode = Logarithms
Number (x) = 0.125
Base (b) = 2
|
Result: -3
ln(x): -2.07944154168
log₁₀(x): -0.903089986992
log₂(x): -3
|