Logarithm Calculator (log, ln, log₂)
Calculate logarithms in any base, convert between bases, and solve exponential equations. Covers log₁₀, natural log (ln), and log base 2 used in computing.
As an Amazon Associate and CJ Affiliate publisher we earn from qualifying purchases. Prices and availability may vary.
Logarithms Guide
What Logarithms Mean?
log_b(x) = y means b^y = x. The logarithm answers the question 'what power do I raise b to, to get x?' log₁₀(1000) = 3 because 10³ = 1000. ln(e²) = 2 because e^2 = e². log₂(8) = 3 because 2³ = 8. Key values: log₁₀(10) = 1, log₁₀(100) = 2, log₁₀(0.1) = −1. ln(e) = 1, ln(1) = 0. log_b(1) = 0 for any base (b⁰ = 1). log_b(b) = 1 for any base (b¹ = b). Logarithms of numbers between 0 and 1 are negative.
What should I know about Logarithm Laws?
Product rule: log(ab) = log(a) + log(b). Quotient rule: log(a/b) = log(a) − log(b). Power rule: log(aⁿ) = n × log(a). Change of base: log_b(x) = log(x)/log(b) = ln(x)/ln(b). Example: log₃(81) = log(81)/log(3) = 1.908/0.477 = 4 (because 3⁴ = 81). These laws allow complex logarithmic expressions to be simplified and equations to be solved. The log laws are identical in structure to the index laws (log ab = log a + log b ↔ aⁿ × aᵐ = aⁿ⁺ᵐ).
What's the key thing to understand about Natural Log and e?
The natural logarithm (ln) uses the irrational base e ≈ 2.71828. e arises naturally in continuous compound growth: if £1 is invested at 100% interest compounded continuously for 1 year, it grows to e = £2.718. e appears in: radioactive decay (N = N₀e^(−λt)), population growth, normal distribution probability density (e^(−x²/2)), Euler's formula e^(iπ) + 1 = 0. Derivatives: d/dx[eˣ] = eˣ (only function that is its own derivative — hence its ubiquity in differential equations). d/dx[ln x] = 1/x.
What should I know about Logarithm Applications?
pH = −log₁₀[H⁺] — each pH unit is a 10-fold change in hydrogen ion concentration. Decibels: dB = 10 × log₁₀(P/P₀) — the 10 dB rule means 10× the power, 20 dB means 100× the power. Richter scale: each unit is 10× the ground motion (30 in energy). Information theory: bits = log₂(number of possibilities) — a coin flip has log₂(2) = 1 bit of information. Computer science: O(log n) algorithms double their input to add one operation step. Music: pitch intervals are logarithmic — an octave always doubles the frequency, regardless of which note you start from, which is why musical scales are naturally described using logarithmic relationships.
What should I know about Change of Base?
Calculators and most programming languages only offer log base 10 (log) and base e (ln) directly, so to find a logarithm in any other base, use the change of base formula: log_b(x) = log(x) / log(b), using either base 10 or base e consistently on both parts. Example: log₂(50) = log(50)/log(2) = 1.699/0.301 ≈ 5.644. Check: 2^5.644 ≈ 50. This formula is essential whenever you need log base 2 (common in computer science for counting bits — log₂(1024)=10) or any non-standard base, since no calculator has a dedicated button for it. The formula works because of the underlying identity log_b(x) = ln(x)/ln(b) for any valid base, and the choice of ln or log₁₀ makes no difference to the final answer as long as the same base is used top and bottom.
What do I need to know about Solving Equations with Logarithms?
Logarithms let you solve for an exponent that's otherwise trapped. For 5^x = 200, take log of both sides: log(5^x) = log(200), then bring the exponent down using the power law: x·log(5) = log(200), so x = log(200)/log(5) = 2.301/0.699 ≈ 3.29. This is the standard method for compound interest problems (how many years until an investment doubles?) and radioactive decay problems (how long until a sample drops to 10% of its original activity?). For 0.5^t = 0.125, taking logs gives t·log(0.5) = log(0.125), so t = log(0.125)/log(0.5) = 3 — confirming that 0.5³ = 0.125 exactly, which is expected since halving three times gives 1/8. Always check whether the base itself is less than 1 (producing a decaying rather than growing function) since the sign conventions can trip up a quick mental estimate.
What should I know about Logarithms on the Richter and Decibel Scales?
The Richter scale for earthquake magnitude and the decibel scale for sound intensity are both logarithmic, which means each whole-number increase represents a tenfold (or similarly large) jump in the underlying physical quantity, not a simple additive one. A magnitude 6 earthquake releases roughly 10 times the ground motion of a magnitude 5 earthquake, and about 31.6 times the energy, because the Richter scale is defined using a base-10 logarithm of amplitude. Similarly, every 10 dB increase on the decibel scale represents a tenfold increase in sound intensity (power), so a 70 dB sound is 10 times more intense than a 60 dB sound, not just "slightly louder." Logarithmic scales like these are used specifically because they compress an enormous range of real-world values — from a whisper to a jet engine, or a minor tremor to a catastrophic quake — into a manageable, human-readable range of numbers.
Graphs of Logarithmic Functions: Shape, Domain and Asymptotes
The graph of y = logₐ(x) has a distinctive, consistent shape regardless of the base a (for any a > 1): it exists only for x > 0 (logarithms of zero or negative numbers are undefined for real numbers), it crosses the x-axis at exactly x = 1 (because logₐ(1) = 0 for every base), and as x approaches 0 from the positive side, y plunges toward negative infinity — the y-axis (x = 0) is a vertical asymptote the curve never touches or crosses. For x > 1 the curve rises, but ever more slowly, reflecting the fact that it takes increasingly large multiplicative jumps in x to produce the same additive jump in y. This shape is the mirror image of its inverse, the exponential curve y = aˣ, reflected across the line y = x — which is exactly what it means for two functions to be inverses of each other.
| x | log₁₀(x) | ln(x) |
|---|---|---|
| 0.1 | -1.00 | -2.303 |
| 1 | 0.00 | 0.000 |
| 2 | 0.301 | 0.693 |
| 10 | 1.00 | 2.303 |
| 100 | 2.00 | 4.605 |
| 1000 | 3.00 | 6.908 |
A Brief History: Logarithms and the Slide Rule
Logarithms were introduced by the Scottish mathematician John Napier in 1614, specifically to turn tedious multiplication and division into simple addition and subtraction — a huge practical time-saver for astronomers, navigators, and engineers doing calculations entirely by hand. The product rule, log(ab) = log(a) + log(b), meant that two numbers could be multiplied by looking up their logarithms in a printed table, adding the two looked-up values, and then looking up which number that sum corresponds to. This idea was mechanised in the slide rule, invented shortly after by William Oughtred, which used two sliding logarithmic scales so that physically sliding one scale against another performed the addition (and therefore the multiplication) instantly. Slide rules remained the standard calculation tool for engineers and scientists for over 300 years, right up until pocket electronic calculators made them obsolete in the mid-1970s — but the underlying logarithmic principle they relied on is exactly the same one used today in pH, decibels, and the Richter scale.
Worked Example: Radioactive Decay and Half-Life
Radioactive decay follows the formula N(t) = N₀ × (1/2)^(t/h), where N₀ is the starting quantity, h is the half-life, and N(t) is the amount remaining after time t. Logarithms are what let you solve this for time when you know how much has decayed. Suppose a sample with a half-life of 5,730 years (carbon-14) has decayed to 25% of its original amount — how old is it? Set up: 0.25 = (1/2)^(t/5730). Take the natural log of both sides: ln(0.25) = (t/5730) × ln(0.5). So t = 5730 × ln(0.25) / ln(0.5) = 5730 × (-1.3863) / (-0.6931) = 5730 × 2.000 = 11,460 years. This makes intuitive sense without even needing logs, since 25% remaining is exactly two half-lives (100% → 50% → 25%), but the same log-based method works for any decayed fraction that isn't a neat power of two — for example, decaying to 40% remaining gives t = 5730 × ln(0.4)/ln(0.5) = 5730 × (-0.9163)/(-0.6931) ≈ 7,575 years.
Worked Example: Solving a Compound-Interest 'How Long Until' Question
Logarithms answer 'how long until my money doubles' questions that ordinary algebra can't isolate, because the unknown time sits in an exponent. Using A = P(1 + r)^t with an annual rate r = 6% (0.06) and wanting to know how long until the principal doubles (A = 2P): 2P = P(1.06)^t, so 2 = (1.06)^t. Taking the natural log of both sides: ln(2) = t × ln(1.06). Solving for t: t = ln(2) / ln(1.06) = 0.6931 / 0.0583 ≈ 11.9 years. This is close to the well-known 'Rule of 72' shortcut (72 ÷ 6 = 12 years), which is itself just a quick approximation of this exact logarithmic calculation, accurate to within a few months at typical interest rates.