Logarithm Calculator

Reviewed by CalcMulti Editorial Team·Last updated: February 2026

Use our free Logarithm Calculator to compute logarithms for any positive number in base 10, natural log (base e), or a custom base.

Result

Enter a valid number > 0

About Logarithms: A logarithm answers the question: "To what power must the base be raised, to produce a given number?" This calculator supports base 10, natural logarithm (base e), and any positive custom base.

Practical Applications: Useful in mathematics, physics, engineering, finance, and data analysis for exponential growth, sound intensity, and pH calculations.

What Are Logarithms?

A logarithm is the inverse operation of exponentiation. It answers the question: "To what power must a given base be raised to produce a specific number?" In mathematical notation, if b^y = x, then the logarithm base b of x equals y.

logb(x) = y   means   by = x

For example, log10(1000) = 3 because 10 raised to the 3rd power equals 1000. Logarithms are used extensively in science, engineering, and finance to handle quantities that span many orders of magnitude.

Fundamental Logarithm Rules

Three core rules govern how logarithms behave. Mastering these rules makes it possible to simplify and solve complex logarithmic expressions.

Product Rule: logb(x * y) = logb(x) + logb(y)

Quotient Rule: logb(x / y) = logb(x) - logb(y)

Power Rule: logb(xn) = n * logb(x)

Additionally, the Change of Base Formula lets you convert between bases: logb(x) = logk(x) / logk(b). This is particularly useful when your calculator only supports base-10 or natural logarithms.

Natural Log vs. Common Log

The two most widely used logarithm bases are 10 and e (approximately 2.71828). The common logarithm (log10, often written simply as "log") is used in everyday calculations and in fields like chemistry (pH scale) and acoustics (decibels). The natural logarithm (loge, written as "ln") is central to calculus, continuous growth models, and most branches of higher mathematics.

Common Logarithm Values

xlog10(x)ln(x)
100
20.30100.6931
e (2.718)0.43431
1012.3026
10024.6052
100036.9078

Real-World Applications of Logarithms

Logarithms are far from purely theoretical -- they appear in many practical contexts:

  • Richter Scale (Earthquakes): The Richter scale is logarithmic. An earthquake measuring 6.0 is ten times more powerful than one measuring 5.0, meaning each whole-number increase represents a tenfold increase in measured amplitude.
  • Decibels (Sound Intensity): Sound levels are measured in decibels using a logarithmic scale. A sound at 80 dB is ten times more intense than one at 70 dB. This allows a vast range of intensities to be expressed in manageable numbers.
  • pH Scale (Chemistry): The pH of a solution is defined as pH = -log10[H+], where [H+] is the hydrogen ion concentration. A pH change of 1 unit represents a tenfold change in acidity.
  • Compound Interest (Finance): The natural logarithm is used to calculate the time required for an investment to reach a target value under continuous compounding.

Step-by-Step Example: log₂(64)

Let's calculate log₂(64) — the power to which 2 must be raised to equal 64.

Step 1: Identify base = 2, number = 64

Step 2: Apply change of base formula: log₂(64) = ln(64) / ln(2)

Step 3: ln(64) = 4.1589, ln(2) = 0.6931

Step 4: 4.1589 / 0.6931 = 6

Verify: 2⁶ = 64 ✓

The answer is 6, because 2 must be raised to the 6th power to produce 64. You can verify any logarithm result by checking that base^result equals the original number.

Common Mistakes with Logarithms

Mistake 1: log(a + b) ≠ log(a) + log(b)

The product rule applies to multiplication, not addition. log(a + b) cannot be simplified further. Only log(a × b) = log(a) + log(b).

Mistake 2: Confusing log₁₀ and ln

In most textbooks, "log" without a base means log₁₀. In many programming languages and scientific contexts, "log" means the natural log. Always clarify which base is intended to avoid errors.

Mistake 3: Taking log of a negative number

log(x) is only defined for x > 0 in real numbers. Attempting to compute log(−5) will return an error or undefined. Check your equation setup if this occurs.

Mistake 4: log(x/y) = log(x) / log(y) — Wrong!

The quotient rule is log(x/y) = log(x) − log(y), not division of logs. log(x) / log(y) is actually the change of base formula for log_y(x).

Logarithm Quick Reference Table

Memorize these common values — they appear frequently in exams, engineering, and science.

ExpressionValueExplanation
log₁₀(1)010⁰ = 1
log₁₀(10)110¹ = 10
log₁₀(100)210² = 100
log₁₀(1000)310³ = 1,000
ln(1)0e⁰ = 1
ln(e)1e¹ = e
ln(2)≈ 0.693Doubling time rule: 0.693/r
log₂(8)32³ = 8 (3 bits = 8 values)
log₂(1024)102¹⁰ = 1,024 (1 KB = 2¹⁰ bytes)

Related Math Tools

Logarithms are closely related to exponents and appear throughout statistics and algebra.

Antilogarithm: Reversing the Logarithm

The antilogarithm (antilog) is the inverse operation of the logarithm. If logb(x) = y, then antilogb(y) = by = x. It answers: "What number has this logarithm?"

Base-10 antilog

antilog₁₀(y) = 10ʸ

antilog₁₀(3) = 10³ = 1,000

Natural antilog

antiln(y) = eʸ

antiln(2) = e² ≈ 7.389

LogarithmValue (y)Antilog = b^y
log₁₀(x) = 2210² = 100
log₁₀(x) = 3.53.510^3.5 ≈ 3,162
ln(x) = 11e¹ ≈ 2.718
ln(x) = 44e⁴ ≈ 54.60

Doubling Time and Half-Life Using ln

Natural logarithm is the key to calculating how long exponential processes take to double or halve. Two of the most useful formulas in science and finance:

Doubling Time

T₂ = ln(2) / r ≈ 0.693 / r

Also expressed as the Rule of 72: T₂ ≈ 72 / (r × 100)

Half-Life

T½ = ln(2) / λ ≈ 0.693 / λ

Used for radioactive decay, drug clearance, and exponential decay processes.

ScenarioRate (r)Doubling TimeFormula
S&P 500 (avg ~10%)10%/yr~7.3 yearsln(2)/0.10
Savings account (5%)5%/yr~13.9 yearsln(2)/0.05
E. coli doubling~100%/20 min20 minutesln(2)/ln(2) × 20 min
Carbon-14 decaydecay constant λ5,730 yearsln(2)/λ

Logarithmic Scales: Richter, Decibels, and pH

Many measurement systems use logarithmic scales because the phenomena they measure span many orders of magnitude. A linear scale would require enormous numbers to represent the full range.

ScaleFormula+1 unit meansExample
Richter (earthquakes)M = log₁₀(A/A₀)10× more wave amplitudeM7 is 10× stronger than M6
Decibels (sound)dB = 10·log₁₀(I/I₀)~26% more intensityJet engine: 140 dB vs library: 40 dB (10¹⁰ more intense)
pH (acidity)pH = −log₁₀[H⁺]10× more acidicLemon (pH 2) is 100× more acidic than coffee (pH 4)

pH Worked Example

If [H⁺] = 0.001 mol/L (10⁻³), then pH = −log₁₀(10⁻³) = −(−3) = 3. This corresponds to vinegar — strongly acidic. At pH 7 (neutral water), [H⁺] = 10⁻⁷ mol/L. The 4-unit difference means vinegar has 10⁴ = 10,000 times more hydrogen ions than water.

Binary Logarithm (log₂) in Computer Science

Base-2 logarithm is fundamental in computer science and algorithm analysis. It answers: "How many bits are needed?" and "How many times can you halve this?"

Algorithm Complexity (Big O)

Binary search takes log₂(n) steps to find an element in a sorted list of n items. For a list of 1,024 items: log₂(1024) = 10 comparisons maximum. For 1,000,000 items: log₂(10⁶) ≈ 20 comparisons.

Bit Count

To store n different values you need ⌈log₂(n)⌉ bits. For 256 values: log₂(256) = 8 bits (1 byte). For 65,536 values: log₂(65,536) = 16 bits (2 bytes). For 1,000 values: ⌈log₂(1000)⌉ = ⌈9.97⌉ = 10 bits.

n valueslog₂(n) bitsBinary search stepsUse case
21 bit1Boolean (true/false)
2568 bits8ASCII characters (1 byte)
65,53616 bits16Basic Unicode (2 bytes)
1,000,000≈20 bits20Large database lookup

Logarithm vs Exponent: Inverse Operations

Logarithms and exponents are inverse operations — each undoes the other. Understanding this relationship is the key to solving exponential equations.

QuestionUse exponentUse logarithm
What is 2 to the power 10?2¹⁰ = 1,024
How many doublings to reach 1,024?log₂(1024) = 10
$1,000 growing at 7% for 20 years?1000×1.07²⁰ = $3,870
How long to reach $3,870 at 7%?ln(3.87)/ln(1.07) ≈ 20 yrs

Common Logarithm Values — Quick Reference Table

log₁₀ (common log), ln (natural log, base e ≈ 2.71828), and log₂ (binary log) for frequently used numbers.

xlog₁₀(x)ln(x)log₂(x)Note
0.1−1−2.3026−3.321910⁻¹
0.5−0.3010−0.6931−1½
1000Always 0
20.30100.69311Key value
e ≈ 2.7180.434311.4427ln(e) = 1
30.47711.09861.5850
40.60211.38632
50.69901.60942.3219
70.84511.94592.8074
80.90312.07943
1012.30263.3219log₁₀=1 always
161.20412.772642⁴
201.30102.99574.3219
251.39793.21894.6439
501.69903.91205.6439
10024.60526.643910²
1,00036.90789.965810³
10,00049.210313.287710⁴
1,000,000613.815519.931610⁶

Antilogarithm Quick Reference

antilog₁₀(1) =10
antilog₁₀(2) =100
antilog₁₀(0.5) =≈ 3.162
antilog₁₀(3) =1,000
antilog(ln)(1) =e ≈ 2.718
antilog(ln)(0) =1

Frequently Asked Questions

Related Calculators