Logarithm Calculator: natural, base 10, any base, antilog

Calculate natural logarithm (ln), base 10 (log), any base and antilog. Change of base, properties, logarithmic scales. Pure evergreen mathematics.

Calculation parameters
Per log: deve essere > 0. Per antilog: qualsiasi numero reale
Deve essere > 0 e ≠ 1. Valori comuni: 10, e≈2,718, 2
Was this calculator useful?

What is a logarithm?

The logarithm is the inverse operation of exponentiation. If ab = c, then loga(c) = b. In words: the base-a logarithm of c is the exponent to which you must raise a to get c.

Example: 23 = 8, so log2(8) = 3.

Three most common bases

1. Common logarithm — base 10

log(x) or log₁₀(x): historical calculation tool, now used in acoustics (decibels), seismology (Richter), chemistry (pH), astronomy (magnitudes).

  • log(1) = 0
  • log(10) = 1
  • log(100) = 2
  • log(1000) = 3

2. Natural logarithm — base e

ln(x): where e ≈ 2.71828 is Euler's constant. Fundamental in calculus, probability, physics.

  • ln(1) = 0
  • ln(e) = 1
  • ln(10) ≈ 2.3026

3. Binary logarithm — base 2

log₂(x): essential in computer science (algorithm complexity, Shannon information theory).

  • log₂(1) = 0
  • log₂(2) = 1
  • log₂(8) = 3
  • log₂(1024) = 10

Fundamental properties

Valid for any base (b > 0, b ≠ 1):

1. Product rule

logb(x·y) = logb(x) + logb(y)

Transforms multiplication into addition. This property made logarithms revolutionary for astronomical and navigational calculations (Napier 1614).

2. Quotient rule

logb(x/y) = logb(x) − logb(y)

3. Power rule

logb(xn) = n · logb(x)

4. Change of base

logb(x) = logc(x) / logc(b)

5. Notable identities

  • logb(1) = 0
  • logb(b) = 1
  • logb(bn) = n
  • blogb(x) = x

Why e exists

The number e ≈ 2.71828 is the natural base of logarithms because:

d/dx ln(x) = 1/x (simplest possible derivative)

e emerges naturally in:

  • Continuous compound interest: lim(1 + 1/n)n = e (Bernoulli 1683)
  • Growth/decay differential equations
  • Normal distribution
  • Quantum mechanics

History of logarithms

  • ~1594-1614 — John Napier: develops logarithms, publishes Mirifici Logarithmorum Canonis Descriptio (1614). Revolutionizes astronomical calculations.
  • 1620 — Edmund Gunter: introduces slide rule
  • 1624 — Henry Briggs: publishes base-10 logarithm tables
  • 1683 — Jacob Bernoulli: discovers e in compound interest problem
  • 1748 — Leonhard Euler: introduces symbol e, proves irrationality
  • 1873 — Charles Hermite: proves e transcendental
  • 1970s — Electronic calculators: make slide rule obsolete

The slide rule

From 1620 to 1970, engineers used the slide rule: two logarithmic scales sliding against each other. Using log(xy) = log(x) + log(y), multiplication became physical addition of lengths.

Precision: 3-4 digits. Apollo 11 moon mission (1969) was calculated with slide rules.

Natural logarithmic scales

Earthquakes — Richter scale

Magnitude M = log₁₀(A/A₀). M6 earthquake is 10x stronger than M5, and 32x more energetic.

Sound — decibels (dB)

dB = 10·log₁₀(P/P₀). Conversation ~60 dB, rock concert ~120 dB. 60 dB difference = factor 1,000,000 in intensity!

Acidity — pH

pH = −log₁₀([H⁺]). pH 4 solution is 1,000x more acidic than pH 7.

Stars — magnitudes

Stellar magnitude scale is logarithmic. 5 magnitudes difference = 100x in brightness.

Music frequencies

We perceive notes logarithmically: doubling frequency = one octave (12 semitones).

Finance — log-returns

Quantitative finance prefers log-returns r = ln(Pt/Pt-1) because they're time-additive and symmetric.

Algorithm complexity

Logarithms describe efficient algorithm speed:

  • O(log n): binary search (halving search space each step)
  • O(n log n): efficient sorts (merge sort, quick sort average)
  • O(log log n): advanced data structures (Van Emde Boas)

O(log n) on 1 billion elements requires only ~30 operations.

Practical examples

Example 1 — Digits of a number

How many digits in 21000? log₁₀(21000) = 1000 · 0.30103 = 301.03. So 21000 has 302 digits.

Example 2 — Half-life time

Substance decays 5% yearly. How long to 50% reduction? t = ln(0.5)/ln(0.95) ≈ 13.5 years.

Example 3 — Compound interest

$10,000 at 6% annually, how long to double? t = ln(2)/ln(1.06) ≈ 11.9 years. Confirms Rule of 72: 72/6 = 12.

Example 4 — Earthquake magnitude

Japan 2011 M9.1. How much more energetic than M5.0? 109.1−5 × 32(9.1−5) ≈ 31,623 in amplitude, ~5.6 million in energy.

Example 5 — Shannon information

How many bits for 1000 equiprobable states? log₂(1000) ≈ 9.97. Need 10 bits (2^10 = 1024 ≥ 1000).

Logarithms in equations

Equation 3x = 50 solves with logarithms:

x · log(3) = log(50) → x = log(50)/log(3) ≈ 3.561

Used for population growth, pharmacokinetics, radioactive decay, compound finance.

Logarithm integrals

∫ ln(x) dx = x·ln(x) − x + C

∫ (1/x) dx = ln|x| + C (fundamental!)

1/x has no elementary antiderivative except the logarithm. This is the true mathematical reason for ln's importance.

Complex logarithm

Extended to complex numbers via Euler's formula:

eiθ = cos θ + i·sin θ

Surprising consequence: ln(−1) = iπ

Euler's identity: eiπ + 1 = 0. Considered math's most beautiful formula (Feynman, Russell).

Antilogarithm

The antilogarithm is the inverse operation: if logb(x) = y, then antilog = by = x. Simply the exponential function.

Excel / Sheets / Python functions

Excel / Google Sheets

  • =LOG(x): log₁₀(x) in Excel, natural log in Sheets (caution!)
  • =LOG10(x): always base 10 (both)
  • =LN(x): natural logarithm
  • =LOG(x, base): any base
  • =EXP(x): ex
  • =10^x: antilog base 10

Python (math, numpy)

import math
math.log(100)          # 4.605 (ln)
math.log10(100)        # 2.0
math.log2(8)           # 3.0
math.log(100, 10)      # 2.0
math.exp(1)            # 2.718...

import numpy as np
np.log(np.array([1, 10, 100]))

Common mistakes

  • log(0): undefined, tends to −∞
  • log(negative): undefined in reals
  • "log" ambiguity: in pure math often = ln; engineering = log₁₀; CS = log₂
  • log(x+y) ≠ log(x) + log(y): common error! Only for multiplication
  • Forgetting properties: log(x²) = 2·log(x), not log(x)²

FAQ

Why are logarithms useful?

Transform exponential growth into linear scales, multiplication into addition, powers into multiplication. Essential when variables span many orders of magnitude.

log or ln: which to use?

Context-dependent. ln in theoretical math/physics (simple derivatives). log₁₀ in engineering. log₂ in computer science.

How to read log-log plot?

Both axes logarithmic. A straight line in log-log represents power law y = axk.

Why is e called "Napier's number"?

Actually Napier didn't discover it: used a close base but wasn't aware of the constant. Euler named it e in 1748.

Updated July 2026

Frequently Asked Questions

What is a logarithm?

The logarithm is the inverse operation of exponentiation: log_b(x) = y means b^y = x. In simple terms, it answers 'to what exponent must I raise base b to get x?'. For example log₁₀(1000) = 3 because 10³ = 1000.

What is the natural logarithm (ln)?

The natural logarithm is the logarithm to base e, where e ≈ 2.71828 is Euler's number. It is written ln(x). It appears naturally in calculus, in exponential growth and decay and in physics, because the derivative of ln(x) is simply 1/x.

What is the base-10 logarithm?

It is the common logarithm, written log₁₀ or simply log. It shows to what power to raise 10 to get the number: log₁₀(1000) = 3. Its integer part plus one gives the number of digits: log₁₀(452) ≈ 2.66, so 452 has 3 digits. It is used in logarithmic scales.

What is the change of base formula?

It lets you compute a logarithm in any base from natural or common logarithms: log_b(x) = ln(x)/ln(b) = log(x)/log(b). For example, log₂(8) = ln(8)/ln(2) = 3. It is essential because calculators only have ln and log₁₀.

What are the properties of logarithms?

The three fundamental properties turn complex operations into simpler ones: log(x·y) = log(x)+log(y) (product to sum), log(x/y) = log(x)−log(y) (quotient to difference), log(xⁿ) = n·log(x) (power to product). They were the basis of log tables and the slide rule.

What is the antilogarithm?

It is the inverse operation of the logarithm: if log_b(x) = y, the antilogarithm returns x = bʸ. In practice it is raising the base to a power. For example, the antilog base 10 of 3 is 10³ = 1000. It goes back from the logarithm to the original number.

What are logarithms used for?

They are everywhere in science: in the pH scale in chemistry, in decibels for sound, in the Richter scale for earthquakes, in computing (log₂ gives the bits needed) and in algorithm analysis. Invented by Napier in 1614, they simplified calculations by turning multiplications into additions.

Comments (0)

No comments yet. Be the first!