Sign up
📈

Logarithm

Logarithms, laws, graphs, and logarithmic scales.

Logarithm Inputs

Enter base and value.

Calculate log, ln, and custom base logarithms.

About this topic

Logarithm Definition The exponent needed to produce a given number.

A logarithm answers the question: 'To what power must we raise the base to get this number?' It is the inverse operation of exponentiation.

Key formulas & rules

  • •log_b(x) = y means bʸ = x
  • •Base b must be > 0 and b ≠ 1
  • •Domain: x > 0 only (no log of negatives)
  • •log_b(1) = 0 for any valid base
  • •log_b(b) = 1 (base to itself)
  • •log_b(0) is undefined (−∞ limit)

Examples

Input Output Note
log₂(8) 3 2³ = 8
log₁₀(100) 2 10² = 100
log₅(1) 0 Anything to power 0 = 1
log₃(27) 3 3³ = 27

Real-world uses

Solving exponential equations Signal decibels Earthquake magnitude
Logarithm Laws Rules that turn multiplicative problems into additive ones.

Logarithm laws convert multiplication into addition, division into subtraction, and powers into multiplication. These are the fundamental algebraic tools for working with logs.

Key formulas & rules

  • •Product: log_b(xy) = log_b(x) + log_b(y)
  • •Quotient: log_b(x/y) = log_b(x) − log_b(y)
  • •Power: log_b(xⁿ) = n · log_b(x)
  • •Root: log_b(ⁿ√x) = log_b(x) / n
  • •Change of base: log_b(x) = logₖ(x) / logₖ(b)
  • •Identity: b^(log_b(x)) = x

Examples

Input Output Note
log(2·5) log(2) + log(5) Product rule
log(100/4) log(100) − log(4) Quotient rule
log(2⁵) 5·log(2) Power rule
log₂(100) log(100)/log(2) Change of base

Real-world uses

Signal processing Data compression Algorithm analysis
Natural Logarithm (ln) Logarithm with base e ≈ 2.71828.

The natural log uses Euler's number e as its base. It appears everywhere in calculus, physics, and finance because it has the simplest derivative (d/dx ln(x) = 1/x).

Key formulas & rules

  • •ln(x) = log_e(x) where e ≈ 2.71828
  • •ln(e) = 1
  • •ln(1) = 0
  • •Inverse of eˣ: ln(eˣ) = x
  • •Derivative: d/dx ln(x) = 1/x
  • •Integral: ∫ (1/x) dx = ln|x| + C

Examples

Input Output Note
ln(e) 1 Base to itself
ln(1) 0 Identity
ln(e³) 3 Inverse of exp
ln(10) 2.3026 Common constant

Real-world uses

Continuous compound interest Population growth Entropy calculations
Common Logarithm (base 10) Logarithm with base 10 — used for scientific notation.

The common log uses base 10 and is written as log(x). It measures the number of digits in a number (roughly) and is the basis for the decibel and pH scales.

Key formulas & rules

  • •log(x) = log₁₀(x)
  • •log(10) = 1, log(100) = 2, log(1000) = 3
  • •log(1) = 0
  • •Approximates the digit-count minus 1
  • •Basis of pH scale: pH = −log[H⁺]
  • •Basis of decibel: dB = 10·log(P₁/P₂)

Examples

Input Output Note
log(100) 2 3 digits → 2
log(1000) 3 4 digits → 3
log(0.01) −2 Small numbers → negative
log(7) 0.8451 Non-power of 10

Real-world uses

Scientific notation pH calculations Sound intensity (dB)
Logarithmic Scales Compress huge ranges into small ranges.

A logarithmic scale uses the log of a quantity instead of the quantity itself. This is essential when values span many orders of magnitude — like earthquakes, sound, or star brightness.

Key formulas & rules

  • •Equal distances = equal ratios (not differences)
  • •Common in scientific visualization
  • •Compresses large ranges dramatically
  • •Richter: each unit = 10× more energy
  • •Decibel: +10 dB = 10× more power
  • •pH: −1 = 10× more acidic

Examples

Input Output Note
Richter 5 vs 7 100× more energy 2 units = 10²
pH 3 vs 5 100× more acidic Lower = more acidic
60 dB vs 80 dB 100× more power 20 dB difference
Magnitude 6 vs 8 1000× 10^1.5(2)

Real-world uses

Earthquake magnitude Sound levels Acid/base chemistry
Real-World Applications Where logarithms solve real problems.

Logarithms appear in every field that deals with multiplicative processes, exponential growth, or extremely large/small numbers. They are one of the most practically useful mathematical tools.

Key formulas & rules

  • •Finance: solve for time in compound interest
  • •Biology: radioactive decay half-life
  • •Chemistry: pH and pKa calculations
  • •Physics: entropy, sound, earthquake magnitude
  • •Computer Science: algorithm complexity (log n)
  • •Statistics: log-likelihood, log-odds

Examples

Input Output Note
t = ln(2)/r Doubling time Exponential growth
pH = −log[H⁺] Acidity measure Chemistry
O(log n) Binary search Fast algorithms
Half-life t = ln(2)/λ Decay

Real-world uses

Bioinformatics Machine learning Cryptography

Modes & formulas

1

Basic Log

• Enter a base and a number x. • The calculator computes log_b(x) = ln(x) / ln(b). • Invalid inputs (base ≤ 0, base = 1, x ≤ 0) are rejected.
log_b(x) = ln(x) / ln(b)

The base must be positive and not equal to 1. The argument x must be positive, since no positive base raised to any real power gives a non-positive result.

2

Log Laws

• Enter two positive numbers A and B. • The tool demonstrates the product and quotient laws numerically. • Product rule: log(AB) = log(A) + log(B). Quotient rule: log(A/B) = log(A) − log(B).
log(AB) = log(A) + log(B) | log(A/B) = log(A) − log(B)

These laws convert multiplication into addition and division into subtraction, which is why logarithms were historically used as a computational shortcut.

3

Graph

• Adjust the base between 1.1 and 10. • The graph shows y = log_b(x) with its vertical asymptote at x = 0. • Key points (1, 0) and (b, 1) are marked.
log_b(1) = 0 | log_b(b) = 1 | log_b(0) → −∞

The logarithm is defined only for x > 0. The graph grows without bound but very slowly. A base greater than 1 gives an increasing curve; a base between 0 and 1 gives a decreasing curve.

4

Log Scales

• Interpret decibel, Richter, and pH values. • See how each scale unit corresponds to a multiplicative change in the underlying quantity. • Use these to understand real-world measurements.
dB = 10·log(P₁/P₂) | pH = −log[H⁺] | Richter: 10^(1.5·M)

Logarithmic scales compress huge ranges into small ranges. A difference of 10 dB is a 10× power ratio, and a difference of 1 pH unit is a 10× change in hydrogen-ion concentration.

How to use it

Choose the Basic, Laws, Graph, or Scale tab. Enter your values. The result updates instantly, and the graph shows the shape of the logarithm for the chosen base.

Frequently asked questions

What is ln(x)?
The natural logarithm, using base e ≈ 2.71828. It's the logarithm with the simplest derivative: d/dx ln(x) = 1/x.
Why can't you take the log of a negative number?
Because no positive base raised to any real power produces a negative result. Logs of negatives are complex.
What is a logarithm?
A logarithm is the inverse operation to exponentiation. It answers the question: "To what power must the base be raised to produce a given number?"
What is a natural logarithm (ln)?
A logarithm with the base e (Euler’s number, approximately 2.71828). It is heavily used in calculus because its derivative is simply 1/x.
What is a common logarithm (log)?
A logarithm with base 10. It is used in scientific notation, the pH scale, and the Richter scale.
Why can’t I take the log of a negative number?
Because no positive base raised to any real power will ever yield a negative result. Logs of negative numbers involve complex (imaginary) numbers.

Related calculators

Read the full Logarithm guide — examples & 18 FAQs