Math

Logarithm Calculator Guide: log, ln & log Base Rules (2026)

By The hakaru Team·Last updated March 2026

Quick Answer

A logarithm answers: “What exponent produces this number?” logₕ(x) = y means by = x. Common log (log base 10) is used in science and engineering; natural log (ln, base e ≈ 2.718) is used in calculus, finance, and growth models. Example: log(1000) = 3 because 103 = 1000.

Try the Free Logarithm Calculator →

What Is a Logarithm?

A logarithm is the inverse of exponentiation. If exponentiation asks “what do I get when I raise b to the power y?” then a logarithm asks “what power y do I raise b to in order to get x?”

Formally: logₕ(x) = y means by = x, where b is the base, x is the argument (must be positive), and y is the exponent (the logarithm).

The concept was developed by Scottish mathematician John Napier in 1614 as a tool to simplify multiplication and division of large numbers—before calculators existed, astronomers and navigators used logarithm tables to convert tedious multiplication into addition. Per the Mathematical Association of America, Napier's logarithms shaved years off what had been decades of manual calculation in astronomy.

Today, logarithms are foundational in calculus, information theory, signal processing, chemistry, seismology, acoustics, and finance. Any time a quantity spans many orders of magnitude, a logarithmic scale makes it comprehensible.

log vs ln: What's the Difference?

The two most common logarithms are the common logarithm (log, base 10) and the natural logarithm (ln, base e). Here is how they compare:

PropertyCommon Log (log)Natural Log (ln)
Base10e ≈ 2.71828
Notationlog(x) or log₁₀(x)ln(x) or logₑ(x)
Primary useScience, engineering, pH, decibels, Richter scaleCalculus, growth/decay, finance, information theory
log(10) = ?1≈ 2.3026
log(e) = ?≈ 0.43431
Conversionlog(x) = ln(x) / ln(10)ln(x) = log(x) / log(e)

According to Khan Academy's precalculus curriculum, the natural log is preferred in calculus because the derivative of ln(x) is simply 1/x — a cleaner result than the derivative of log(x), which carries a factor of 1/ln(10). Whenever a formula involves continuous change, ln is almost always the right tool.

The 5 Key Logarithm Rules

These five rules let you simplify, expand, and rearrange any logarithmic expression. Per the College Board's AP Precalculus framework, all five are testable and foundational for calculus.

1. Product Rule

logₕ(a × b) = logₕ(a) + logₕ(b)

Multiplication inside a log becomes addition outside. Example: log(200) = log(2 × 100) = log(2) + log(100) = 0.301 + 2 = 2.301.

2. Quotient Rule

logₕ(a / b) = logₕ(a) − logₕ(b)

Division inside a log becomes subtraction outside. Example: log(50) = log(100/2) = log(100) − log(2) = 2 − 0.301 = 1.699.

3. Power Rule

logₕ(an) = n × logₕ(a)

An exponent inside a log moves to become a multiplier outside. Example: log(106) = 6 × log(10) = 6 × 1 = 6. This rule is why logarithms simplify compound interest and population growth calculations.

4. Change of Base Formula

logₕ(x) = log(x) / log(b) = ln(x) / ln(b)

This lets you compute any logarithm using only log or ln buttons. See the next section for a full worked example.

5. Special Values: log of 1 and log of the Base

logₕ(1) = 0 for any base b, because b0 = 1 always.
logₕ(b) = 1 for any base b, because b1 = b always.

These two identities serve as anchor points for checking your work.

How to Use the Change of Base Formula

Most physical calculators only offer log (base 10) and ln (base e). To compute a logarithm with any other base, use:

logₕ(x) = log(x) / log(b)

Worked example: What is log base 2 of 64?

  • log(64) / log(2) = 1.80618 / 0.30103 = 6
  • Check: 26 = 64. Correct.

Another example: What is log base 5 of 125?

  • log(125) / log(5) = 2.09691 / 0.69897 = 3
  • Check: 53 = 125. Correct.

You can use ln in place of log in both numerator and denominator — the ratio is identical because the conversion factor cancels out. This is verified in MIT OpenCourseWare's Single Variable Calculus notes (18.01SC).

Real-World Applications of Logarithms

Logarithms appear wherever a physical quantity spans several orders of magnitude. Here are six major domains:

Richter Scale (Seismology)

The Richter scale measures earthquake magnitude using log base 10 of the maximum seismic wave amplitude. A magnitude 7.0 earthquake releases 10 timesmore ground motion than a 6.0, and about 31.6 times more energy. Per the USGS, the 2011 Tōhoku earthquake (magnitude 9.0) was approximately 1,000 times more powerful in ground motion than a 6.0 event.

pH Scale (Chemistry)

pH = −log[H+], where [H+] is the molar concentration of hydrogen ions. A pH of 4 (vinegar) is 10 times more acidic than a pH of 5, and 100 times more acidic than pH 6 (black coffee). The negative sign flips the scale so that higher acidity gives lower pH numbers.

Decibels (Acoustics)

Sound intensity in decibels: dB = 10 × log(I / I₀), where I₀ is the threshold of human hearing. Normal conversation at 60 dB is 106 times more intense than the threshold. A jet engine at 140 dB is 1014 times more intense. The logarithmic scale matches how human ears perceive loudness.

Compound Interest and Doubling Time (Finance)

The exact formula for how long it takes money to double at rate r is: t = ln(2) / r ≈ 0.693 / r. At 7% annual return, doubling time = 0.693 / 0.07 ≈ 9.9 years. This is the mathematical basis for the Rule of 72 (which uses 72 / r% as an approximation). The natural log is essential here because continuously compounded growth uses A = Pert.

Information Entropy (Computer Science)

Claude Shannon's 1948 information theory paper defined entropy using log base 2: H = −∑ p(x) × log₂(p(x)). The result is measured in bits. A fair coin flip has entropy of 1 bit. A fair six-sided die has entropy of log₂(6) ≈ 2.58 bits. Log base 2 is the natural choice for binary systems and data compression algorithms.

Signal Processing (Engineering)

Gain in electronics is measured in decibels: gain(dB) = 20 × log(Vₑₐ₁/V𝒏ₙ). A gain of 20 dB means the output voltage is 10 times the input; 40 dB means 100 times. Filter attenuation, amplifier specs, and frequency response curves are all expressed logarithmically because the useful range of signals spans many powers of 10.

Common Logarithm Values to Memorize

These values appear repeatedly in science and math. Memorizing them speeds up mental estimation and exam work.

ExpressionExact ValueApproximate Decimal
log(1)00
log(2)0.3010
log(5)0.6990
log(10)11
log(100)22
log(1000)33
ln(1)00
ln(e)11
ln(2)0.6931
ln(10)2.3026

Notice that log(2) ≈ 0.301 and log(5) ≈ 0.699, and they sum to exactly 1 — which follows from the product rule: log(2 × 5) = log(10) = 1. Similarly, ln(2) ≈ 0.693 explains why the Rule of 72 works: 72 ≈ 100 × ln(2) = 69.3, rounded up for convenience.

Calculate any logarithm instantly

Try the Free Logarithm Calculator →

Frequently Asked Questions

What is a logarithm in simple terms?

A logarithm answers: what exponent do I need to raise a base to in order to get a specific number? For example, log base 10 of 1000 equals 3 because 103= 1000. It is the inverse operation of exponentiation — the same relationship that subtraction has to addition, or division has to multiplication.

What is the difference between log and ln?

log (without a specified base) means log base 10, the common logarithm. ln is the natural logarithm — log base e, where e ≈ 2.71828. Use log for pH, decibels, and the Richter scale. Use ln for calculus, continuous compound interest, and exponential growth or decay. To convert between them: log(x) = ln(x) / ln(10) ≈ ln(x) / 2.3026.

What are the main logarithm rules?

The five key rules: (1) Product rule — log(a × b) = log(a) + log(b). (2) Quotient rule — log(a/b) = log(a) − log(b). (3) Power rule — log(an) = n × log(a). (4) Change of base — logₕ(x) = log(x)/log(b). (5) Special values — logₕ(1) = 0 and logₕ(b) = 1.

How do I calculate log of any base on a regular calculator?

Use the change of base formula: logₕ(x) = log(x) / log(b). To find log base 2 of 32: log(32) / log(2) = 1.505 / 0.301 = 5. Works with any base. You can use ln instead of log in both numerator and denominator — the ratio is the same either way.

Where are logarithms used in real life?

Everywhere quantities span many orders of magnitude: the Richter scale (earthquakes), pH (acidity), decibels (sound), camera f-stops (light), stellar magnitudes (astronomy), and Benford's law (fraud detection). In finance, the natural log calculates doubling time and continuous compound growth. In computer science, log base 2 measures information entropy and sorting algorithm complexity.

What is log(0) and why is it undefined?

log(0) is undefined because no finite exponent raises a positive base to exactly zero. As x approaches 0 from the positive side, log(x) drops toward negative infinity — it never reaches a finite value. Logarithms of negative numbers are also undefined in the real number system. Both are domain restrictions, not calculator errors.