📊 Logarithm Calculator
Enter any number and choose a base - log₁₀, natural log (ln), log₂, or any custom base - to get the exact answer with a full step-by-step solution. Includes antilogarithm, change of base conversion between any two bases, all logarithm laws with worked examples, and an interactive graph.
📊 Logarithm Calculator
📋 Logarithm Reference Table
Click any row to calculate. Values rounded to 6 decimal places.
| x | log₁₀(x) | ln(x) | log₂(x) | √x |
|---|
📈 Logarithm Graph
📐 Logarithm Rules & Properties
Definition
logₙ(x) = y means nʸ = x. The logarithm is the inverse of the exponential.
ln(e²) = 2 because e² = e²
log₂(8) = 3 because 2³ = 8
Product Rule
Example: log(6) = log(2×3) = log(2) + log(3)
= 0.3010 + 0.4771 = 0.7781
Quotient Rule
Example: log(5) = log(10/2) = log(10) − log(2)
= 1 − 0.3010 = 0.6990
Power Rule
Example: log(1000) = log(10³) = 3 × log(10) = 3
Change of Base Formula
Convert between any logarithm bases.
Example: log₅(25) = log(25)/log(5) = 1.3979/0.6990 = 2
Verify: 5² = 25 ✓
Special Values
log(b) = 1 (log of the base itself = 1)
log(0) = undefined (−∞ approaching)
log(−x) = undefined (in real numbers)
ln(e) = 1 (e ≈ 2.71828...)
ln(1) = 0
log₂(2) = 1
Antilogarithm
Antilog(ln) = eˣ
Antilog₂(x) = 2ˣ
Example: antilog₁₀(3) = 10³ = 1000
If log(x) = 2.5, then x = 10^2.5 = 316.23
Real-World Applications
Decibels: dB = 10×log₁₀(P₁/P₀) (sound)
pH scale: pH = −log₁₀([H⁺]) (acidity)
Compound int: t = ln(A/P) / (r) (finance)
Binary search: steps = log₂(n) (computing)
Info theory: bits = log₂(1/p) (entropy)
❓ Frequently Asked Questions
Logarithm Calculator - log₁₀, ln, log₂ and Every Log Law Explained
Logarithms are the inverse of exponentiation - and once that simple idea clicks, everything else about them follows naturally. Every logarithm question asks: "what power produces this result?" Every log law is a consequence of how powers behave. This calculator computes any logarithm instantly and shows the reasoning behind each step.
The Three Most Important Logarithm Bases
log₁₀ - Common Logarithm
- Base 10 - written as "log" without subscript in most contexts
- pH scale: pH = −log₁₀[H⁺] (acid/base chemistry)
- Decibel scale: dB = 10 × log₁₀(P₁/P₂) (sound intensity)
- Richter scale: each step = 10× earthquake energy
- Historically used for manual calculation (log tables)
- log₁₀(10) = 1, log₁₀(100) = 2, log₁₀(1000) = 3
ln - Natural Logarithm (base e)
- Base e ≈ 2.71828 (Euler's number)
- The "natural" base - appears in continuous growth and decay
- Continuous compound interest: A = Pe^(rt)
- Fundamental in calculus: d/dx[ln(x)] = 1/x
- Probability distributions (normal, exponential)
- ln(e) = 1, ln(e²) = 2, ln(1) = 0 for all log bases
The Four Core Logarithm Laws - With Proofs
Every log law follows from how exponents work. Understanding the connection makes the rules memorable rather than arbitrary:
- Product Rule: log(a × b) = log(a) + log(b) - Because when you multiply powers, you add exponents: 10^m × 10^n = 10^(m+n). Taking log of both sides gives log(a×b) = log(a) + log(b). This is why logarithms turned multiplication into addition - dramatically simplifying calculation before calculators existed.
- Quotient Rule: log(a ÷ b) = log(a) − log(b) - Dividing powers subtracts exponents: 10^m ÷ 10^n = 10^(m−n).
- Power Rule: log(aⁿ) = n × log(a) - Taking something to the nth power is multiplying n copies: log(a×a×...×a) = n × log(a) by the product rule.
- Change of Base: log_b(x) = log(x) ÷ log(b) = ln(x) ÷ ln(b) - Lets you compute any logarithm using only log₁₀ or ln. This is the formula used by scientific calculators, which only have log and ln keys.
Special Values Every Student Should Know
- log_b(1) = 0 - For any base: anything raised to the power 0 equals 1. So the log of 1 is always 0, regardless of base.
- log_b(b) = 1 - The log of the base itself is always 1 (b¹ = b). log₁₀(10) = 1, ln(e) = 1, log₂(2) = 1.
- log_b(b^n) = n - Log and exponent cancel: log₂(2⁵) = 5, log₁₀(10³) = 3. These are inverse operations.
- b^(log_b(x)) = x - Raising the base to a log also cancels: 10^(log₁₀(37)) = 37.
- log(0) is undefined - No real power of any base gives exactly 0. The log function approaches −∞ as x approaches 0 from the positive side.
- log of negative numbers is undefined (for real numbers) - No real power of a positive base gives a negative number. Negative logarithms require complex numbers.
Logarithms in Computer Science - log₂ and Bit Counts
Base-2 logarithms are fundamental to computer science and algorithm analysis. Key applications:
- Bits needed to represent n values: ⌈log₂(n)⌉ bits. To represent 256 values: log₂(256) = 8 bits. This is why 8-bit bytes hold values 0–255.
- Binary search complexity: A sorted list of n items takes at most ⌈log₂(n)⌉ comparisons. For 1 million items: log₂(1,000,000) ≈ 20 comparisons maximum.
- Tree depth: A balanced binary tree with n nodes has depth ⌈log₂(n)⌉. This is why log₂ is everywhere in data structure analysis.
- Information theory: A message with probability p contains −log₂(p) bits of information (Shannon entropy).