A logarithm answers a fundamental question: "To what power must a base be raised to produce a given number?" Written mathematically, if bx = y, then logb(y) = x. The logarithm is the exponent — it undoes exponentiation just as subtraction undoes addition.
Concrete examples:
The three types of logarithms you'll encounter most frequently:
| Type | Symbol | Base | Primary Use |
|---|---|---|---|
| Common logarithm | log or log₁₀ | 10 | pH, decibels, Richter scale |
| Natural logarithm | ln or logₑ | e ≈ 2.71828 | Calculus, growth/decay, statistics |
| Binary logarithm | log₂ or lb | 2 | Computer science, information theory |
Our calculator computes all three simultaneously, plus any custom base you specify. Simply enter your number and (optionally) a custom base — log₁₀ and ln are always shown automatically.
Six fundamental rules govern how logarithms behave. Mastering these properties is the key to simplifying complex expressions and solving logarithmic equations.
| Law | Formula | Example (log₁₀) |
|---|---|---|
| Product rule | log(A × B) = log A + log B | log(100×10) = log 100 + log 10 = 2+1 = 3 |
| Quotient rule | log(A ÷ B) = log A − log B | log(1000÷10) = 3−1 = 2 |
| Power rule | log(Aⁿ) = n × log A | log(10⁵) = 5 × log 10 = 5 |
| Change of base | logb(x) = log(x) ÷ log(b) | log₂(8) = log(8)÷log(2) = 0.903÷0.301 = 3 |
| log of 1 | logb(1) = 0 for any base b | log(1) = 0 |
| log of base | logb(b) = 1 | log₁₀(10) = 1, ln(e) = 1 |
Two additional important identities:
A key application of the product rule: solving for unknown exponents. To find how long it takes an investment to double at 7% annual growth: 2 = 1.07n. Take log of both sides: log(2) = n × log(1.07), so n = log(2)/log(1.07) = 0.301/0.0294 ≈ 10.2 years (the famous Rule of 72: 72/7 ≈ 10.3 years).
Euler's number e ≈ 2.71828182845… is one of the most important constants in mathematics. It arises naturally from the problem of continuous compounding: if you invest $1 at 100% annual interest, compounding n times per year, the result approaches e as n → ∞.
The natural logarithm ln(x) = loge(x) is the inverse of ex, making it the natural companion to exponential functions in calculus. The key property: d/dx[ln(x)] = 1/x — simpler than the derivative for any other logarithm base.
| Expression | Value | Application |
|---|---|---|
| ln(1) | 0 | Starting point (e⁰ = 1) |
| ln(e) | 1 | Definition of natural log |
| ln(2) | ≈ 0.6931 | Doubling time = ln(2)/r |
| ln(10) | ≈ 2.3026 | Convert log₁₀ to ln: ln(x) = 2.3026 × log₁₀(x) |
| ln(0.5) | ≈ −0.6931 | Half-life = ln(0.5)/−λ |
| ln(100) | ≈ 4.6052 | Common in statistical calculations |
Natural log in practice:
The common logarithm (base 10) is used in most measurement scales involving orders of magnitude. This table gives reference values from 0.001 to 10,000.
| Number (x) | log₁₀(x) | ln(x) | log₂(x) |
|---|---|---|---|
| 0.001 | −3.000 | −6.908 | −9.966 |
| 0.01 | −2.000 | −4.605 | −6.644 |
| 0.1 | −1.000 | −2.303 | −3.322 |
| 1 | 0.000 | 0.000 | 0.000 |
| 2 | 0.301 | 0.693 | 1.000 |
| 5 | 0.699 | 1.609 | 2.322 |
| 10 | 1.000 | 2.303 | 3.322 |
| 50 | 1.699 | 3.912 | 5.644 |
| 100 | 2.000 | 4.605 | 6.644 |
| 500 | 2.699 | 6.215 | 8.966 |
| 1,000 | 3.000 | 6.908 | 9.966 |
| 10,000 | 4.000 | 9.210 | 13.288 |
Logarithms appear wherever exponential processes need to be measured on a human-readable linear scale. They compress enormous ranges of values into manageable numbers.
<h3>pH and Chemistry</h3>
<p>pH = −log₁₀[H⁺], where [H⁺] is the hydrogen ion concentration in moles per liter. Each unit change in pH represents a 10× change in acidity. pH 4 (tomato juice) is 1,000 times more acidic than pH 7 (pure water). Battery acid at pH 1 is 1,000,000 times more acidic than neutral water.</p>
<h3>Richter and Moment Magnitude Scales</h3>
<p>Earthquake magnitude M is logarithmic. Each integer increase in magnitude = 10× more ground motion amplitude and roughly 31.6× more energy released. A magnitude 9 earthquake (rare) releases about 1,000× the energy of a magnitude 7 earthquake.</p>
<h3>Decibels (Sound and Electronics)</h3>
<p>Sound intensity in decibels: dB = 10 × log₁₀(P₂/P₁). A 10 dB increase = 10× the acoustic power (but perceived as roughly twice as loud). Human hearing spans a range of about 10<sup>12</sup> in intensity, compressed into a 0–120 dB scale.</p>
<h3>Computer Science and Algorithm Analysis</h3>
<p>Binary search runs in O(log₂ n) time. Searching through one million sorted items: log₂(1,000,000) ≈ 20 comparisons. Sorting n items with merge sort: O(n log n). The number of bits needed to represent n distinct values: ⌈log₂(n)⌉ bits.</p>
<h3>Finance: The Rule of 72</h3>
<p>An investment doubles in approximately 72/r years, where r is the annual return percentage. This comes directly from logarithms: doubling time = ln(2)/r ≈ 0.693/r. Multiplying by 100 gives the rule of 72 (approximately). At 8% annual growth: 72/8 = 9 years to double.</p>
Logarithmic equations appear in finance, science, and engineering. Here are four common equation types with solutions.
| Equation Type | Example | Solution Method | Answer |
|---|---|---|---|
| Find exponent | 2ˣ = 32 | x = log₂(32) = log(32)/log(2) | x = 5 |
| Find time to double | e^(0.06t) = 2 | 0.06t = ln(2); t = 0.693/0.06 | t ≈ 11.6 yrs |
| Combine logs | log(x) + log(x−3) = 1 | log[x(x−3)] = 1; x²−3x = 10 | x = 5 |
| Change base | log₈(x) = 2 | x = 8² = 64 | x = 64 |
General strategy: isolate the logarithm on one side, then convert to exponential form (if logb(x) = c, then x = bc). Check your answer — logarithms require positive arguments, so extraneous solutions can arise.
Logarithms and exponentials are inverse operations — each undoes the other, just as multiplication and division are inverses.
On a scientific calculator:
Log transformations are a powerful tool in statistics for dealing with skewed data and multiplicative relationships.
log₁₀(1000) = 3, because 10³ = 1,000. In general, log₁₀(10ⁿ) = n for any integer n. This is why the common logarithm is so useful for counting digits: log₁₀(x) tells you roughly how many digits the number has — a 6-digit number like 500,000 has log₁₀(500,000) ≈ 5.7.
ln(1) = 0. This is because e⁰ = 1. In general, the logarithm of 1 in any base equals 0, since b⁰ = 1 for any valid base b. This is the starting point on the natural log scale — every number greater than 1 has a positive natural log, and every number between 0 and 1 has a negative natural log.
log₂(64) = 6, because 2⁶ = 64. You can also use the change of base formula: log₂(64) = log(64) ÷ log(2) = 1.806 ÷ 0.301 = 6. Or simply ask: how many times do you double 1 to reach 64? 1→2→4→8→16→32→64 — that's 6 doublings.
Euler's number e is the unique base for which the derivative of bˣ is simply bˣ itself (not c × bˣ with some constant c ≠ 1). This makes e the natural choice for calculus. Additionally, e arises from the limit of (1 + 1/n)ⁿ as n → ∞, directly from continuous compound interest — it appears whenever you model continuous growth or decay.
On a scientific calculator, "log" typically means log base 10 (common logarithm), while "ln" means log base e (natural logarithm). However, in higher mathematics and some programming languages (Python, JavaScript, MATLAB), log() returns the natural logarithm by default. Always verify what base is being used in your specific context.
No — not in real numbers. The logarithm of a negative number or zero is undefined in real arithmetic because no real exponent of a positive base produces a negative result. In complex analysis, logs of negative numbers are defined using complex numbers: ln(−1) = iπ (Euler's famous identity: eiπ + 1 = 0).
log(0) is undefined — it approaches negative infinity as the argument approaches zero from the positive side: lim(x→0⁺) log(x) = −∞. This is because 10^(−∞) = 0: you need an infinitely negative exponent to reach zero, so the logarithm has no finite value at zero.
Use the conversion factor ln(10) ≈ 2.302585: ln(x) = log₁₀(x) × 2.302585. Conversely: log₁₀(x) = ln(x) / 2.302585 = ln(x) × 0.434294. Example: log₁₀(50) = 1.699; ln(50) = 1.699 × 2.303 = 3.912.
The antilog reverses a logarithm. Antilog₁₀(x) = 10^x. Antilog_e(x) = e^x. If log₁₀(N) = 2.5, then N = 10^2.5 ≈ 316.23. On a calculator: press 10^x after entering your value. The antilog is essential when converting logarithmic measurements (like decibels or pH) back to linear quantities.
Musical pitch uses logarithmic relationships. Each octave doubles the frequency, and there are 12 semitones per octave. The frequency of note n semitones above concert A (440 Hz) is: f = 440 × 2^(n/12). To find how many semitones separate two frequencies: semitones = 12 × log₂(f₂/f₁). The equal temperament tuning system is built on these logarithmic relationships.
Logarithms were invented in 1614 by Scottish mathematician John Napier, independently developed by Jost Bürgi, and popularized through logarithm tables that dramatically reduced the computational burden for astronomers, navigators, and engineers. Before calculators, multiplying large numbers required only adding their logarithms — transforming days of arithmetic into minutes.
John Napier's definition differed from the modern convention, using a base closer to 1/e. Henry Briggs (working with Napier) introduced the common logarithm (base 10) in 1617, publishing 14-digit log tables for 1 to 20,000 and 90,000 to 100,000 in 1624. These tables were used for 300+ years until electronic calculators made them obsolete in the 1970s.
The slide rule — a mechanical analog computer used from the 17th to 20th centuries — is a physical implementation of logarithm addition. Multiplying A × B on a slide rule means setting one scale at log(A), adding log(B), and reading off antilog(log(A)+log(B)) = A×B. NASA engineers used slide rules to calculate trajectories for the Apollo missions.
Key logarithm milestones:
Students and professionals alike make predictable errors when working with logarithms. Being aware of these pitfalls prevents costly mistakes in calculations:
Checking your work: verify log calculations by checking the inverse. If you claim log₂(64) = 6, verify: 2⁶ = 64. ✓ If you claim ln(x) = 2.5, verify: e^2.5 ≈ 12.18, so x must be 12.18. Always sanity-check with the exponential inverse, especially in exam settings or critical engineering calculations.
One of logarithms' most powerful features is their ability to express vastly different quantities on the same scale. Here are comparisons across several logarithmic scales that highlight how the log compression works:
| Quantity | Value | log₁₀(value) | Interpretation |
|---|---|---|---|
| Diameter of a proton | 10⁻¹⁵ m | −15 | femtometer scale |
| DNA strand width | 2×10⁻⁹ m | −8.7 | nanometer scale |
| Human hair diameter | 7×10⁻⁵ m | −4.15 | 0.07 mm |
| Human height | 1.75 m | 0.243 | meter scale |
| Earth circumference | 4×10⁷ m | 7.6 | 40,000 km |
| Distance to Moon | 3.84×10⁸ m | 8.58 | 384,000 km |
| Distance to Sun | 1.5×10¹¹ m | 11.18 | 150 million km |
| Distance to nearest star | 4×10¹⁶ m | 16.6 | 4.24 light-years |
| Observable universe | 8.8×10²⁶ m | 26.94 | 93 billion light-years |
The log₁₀ column spans from −15 to +27 — a range of just 42 units that represents a range of physical sizes spanning 42 orders of magnitude (10⁴²). Without logarithms, plotting the size of a proton and the size of the observable universe on the same chart would be physically impossible. This is why physicists, cosmologists, and astronomers rely on log scales as a fundamental visualization and calculation tool.
In everyday life, the decibel scale (sound), earthquake magnitude scale, star brightness magnitude scale (astronomy), and pH scale (chemistry) all use logarithms for exactly this reason: compressing enormously wide ranges into intuitive single-digit or double-digit numbers that humans can easily compare and communicate. Every time you read "a magnitude 6 earthquake is 10 times stronger than magnitude 5," you're using logarithmic reasoning — and now you know the math behind it. Logarithms are also fundamental to machine learning: the cross-entropy loss function (used in neural network training) is defined as −Σ yᵢ × log(pᵢ), where pᵢ are predicted probabilities. Training a large language model, an image classifier, or a recommendation system all ultimately involves minimizing a logarithmic loss function. Every modern AI product you interact with daily — from search engines to chatbots — was trained using logarithmic mathematics.