Logarithm Calculator
Enter a positive number and choose a logarithm base to compute the corresponding logarithm. Choose from base 10 (the common log used in science and engineering), base 2 (the binary log used in computer science), or base e ≈ 2.718 (the natural log used in calculus and growth models). The calculator also displays all three logarithm values simultaneously for easy comparison.
Advertisement
Calculator
See your Logarithm Calculator results
Enter your email to unlock results — free forever.
No spam, ever. Unsubscribe at any time.
Advertisement
Formula
logb(x) = ln(x) / ln(b)
A logarithm answers the question: 'to what power must the base be raised to produce this value?' log₁₀(100) = 2 because 10² = 100. The natural logarithm ln(x) uses the mathematical constant e ≈ 2.71828 as its base. The binary logarithm log₂(x) uses base 2. Any logarithm can be computed from the natural log using the change-of-base formula: logb(x) = ln(x) / ln(b). The three most common bases are 10 (science, decibels, pH), 2 (information theory, computer science), and e (calculus, continuous growth).
How to use the Logarithm Calculator
- 1
Enter your value
- 2
Enter your logarithm base
- 3
Read your results instantly
Results update in real time as you type.
Advertisement
The three common logarithm bases
Base 10 (the common logarithm, written log or log₁₀) was historically important for manual calculation — logarithm tables turned multiplication into addition. Today, base-10 logs appear in the decibel scale for sound intensity, the Richter scale for earthquake magnitude, the pH scale for acidity, and the stellar magnitude scale in astronomy. Each unit increase corresponds to a 10× change in the underlying quantity.
Base 2 (the binary logarithm, written log₂) is the natural logarithm of the digital world. The number of bits needed to represent n distinct values is ⌈log₂(n)⌉. Binary search on a sorted list of n items takes at most ⌈log₂(n)⌉ comparisons. Every doubling of n adds just one more step — the defining efficiency of logarithmic-time algorithms.
Base e (the natural logarithm, written ln) appears wherever continuous growth or decay is modeled. Compound interest, radioactive decay, population growth, and probability distributions all involve ln. It is the default base in calculus because the derivative of ln(x) is simply 1/x.
Logarithm rules and identities
Logarithms obey several powerful rules that simplify complex calculations:
Product rule: log(a × b) = log(a) + log(b). Multiplying inside a log becomes adding outside — the historical reason logarithms revolutionized computation.
Quotient rule: log(a / b) = log(a) − log(b). Division inside becomes subtraction outside.
Power rule: log(aⁿ) = n × log(a). Exponents become multipliers — useful for solving exponential equations.
Change-of-base formula: logb(x) = ln(x) / ln(b) = log(x) / log(b). Any logarithm can be rewritten using any other base, which is how calculators compute arbitrary-base logarithms using only ln or log₁₀ internally.
These rules together make logarithms a powerful tool for simplifying multiplicative relationships into additive ones.
Advertisement
Logarithms in science and engineering
The logarithmic scale is ubiquitous in science because many natural phenomena span many orders of magnitude, and logarithms compress these ranges into manageable numbers.
Decibels (dB) measure sound intensity: 0 dB is the threshold of hearing, 60 dB is normal conversation, 120 dB is a jet engine nearby. Each 10 dB increase is a 10× increase in intensity (and 20 dB = 100×). The formula is dB = 10 × log₁₀(I/I₀).
pH measures acidity: pH = −log₁₀([H⁺]). Each unit of pH change corresponds to a 10× change in hydrogen ion concentration. A pH of 4 is ten times more acidic than pH 5.
The Richter scale: each whole number increase represents roughly 31.6× more energy released. A magnitude-7 earthquake releases about 1000× more energy than a magnitude-5.
Tips & Insights
Use the change-of-base formula for any base
Most calculators only have buttons for ln and log₁₀. To compute log₇(50), calculate ln(50)/ln(7) ≈ 3.912/1.946 ≈ 2.011. You can also use log₁₀(50)/log₁₀(7). Both give the same answer.
Check with exponentiation
Verify any logarithm by exponentiation: if log₁₀(x) = y, then 10^y should equal x. For log₁₀(100) = 2, check: 10² = 100. ✓ This mental check catches sign errors and base confusions immediately.
The natural log and percentage changes
For small changes, ln(1 + r) ≈ r. This makes the natural log useful for continuous compounding: if an investment grows at rate r per year continuously, its value after t years is P × eʳᵗ, and the time to double is ln(2)/r ≈ 0.693/r. For r = 7%, doubling time ≈ 0.693/0.07 ≈ 9.9 years — the Rule of 70.
Worked Examples
pH calculation
log₁₀(0.001) = −3. pH = −(−3) = 3. A hydrogen ion concentration of 10⁻³ mol/L corresponds to pH 3, which is quite acidic (vinegar is about pH 2.5).
Bits needed for an alphabet
log₂(26) ≈ 4.7. Rounding up: 5 bits are needed to represent 26 distinct characters (5 bits can represent up to 2⁵ = 32 distinct values).
Advertisement
Frequently Asked Questions
What is the difference between log and ln?
'log' without a subscript usually means base 10 (common logarithm) in everyday math and engineering. 'ln' always means the natural logarithm (base e). In higher mathematics and many scientific papers, 'log' may mean natural log by convention — always check the context.
Can you take the logarithm of a negative number?
Not in the real numbers. Logarithms are only defined for positive inputs because no real power of a positive base yields a negative or zero result. In complex mathematics, ln(−1) = iπ, but that requires complex number arithmetic.
What is log of 1?
logb(1) = 0 for any base b > 0, b ≠ 1, because b⁰ = 1 always. This is a useful anchor: the logarithm of 1 is always zero regardless of base.
How do logarithms relate to exponentials?
Logarithms and exponentials are inverse functions. If y = bˣ, then x = logb(y). Graphically, y = log(x) is the reflection of y = 10ˣ across the line y = x.
Why does the natural log use base e?
The constant e ≈ 2.71828 arises naturally when studying continuous growth. The function eˣ is its own derivative, which makes it the simplest function for modeling processes that change proportionally to their current size — compound interest, radioactive decay, and population growth all follow eˣ models.
Advertisement