📐
✓ Editorially reviewed by Derek Giordano, Founder & Editor · BA Business Marketing

Logarithm Calculator

Log, Ln & Custom Base

Last reviewed: May 2026

🧮
500 calculators, no signup required
Finance · Health · Math · Science · Business
nnng.com

Logarithm Calculator

Calculate logarithms in any base: common (10), natural (e), binary (2), and custom. Logarithms are the inverse of exponentiation and appear throughout science, finance, and computer science.1

Common Log Values

xlog(x)ln(x)log2(x)
20.3010.6931
1012.3033.322
10024.6056.644
100036.9089.966

Log Rules

RuleFormulaExample
Productlog(ab) = log(a) + log(b)log(200) = 2.301
Quotientlog(a/b) = log(a) - log(b)log(5) = 0.699
Powerlog(a^n) = n·log(a)log(8) = 3·log(2)
Change baselog_b(x) = log(x)/log(b)log2(10) = 3.322

What Are Logarithms?

A logarithm answers the question: "What power do I raise the base to in order to get this number?" Formally, log_b(x) = y means b^y = x. For example, log₁₀(1000) = 3 because 10³ = 1000. Logarithms are the inverse of exponentiation — they undo what exponents do, just as division undoes multiplication. This inverse relationship makes them essential for solving equations where the unknown is an exponent.

Types of Logarithms

Common logarithm (log₁₀ or simply "log"): Base 10. Used in decibel calculations, pH chemistry, earthquake magnitude (Richter scale), and engineering. log₁₀(100) = 2. Natural logarithm (ln or logₑ): Base e ≈ 2.71828. Used in calculus, compound interest, radioactive decay, population growth, and most scientific applications. ln(e) = 1. Binary logarithm (log₂): Base 2. Used in computer science for algorithm complexity, data structures, and information theory. log₂(256) = 8 (because 2⁸ = 256 — the number of values in a byte).

Logarithm Properties

Three rules make logarithm manipulation straightforward: Product rule: log(a × b) = log(a) + log(b) — multiplication becomes addition. Quotient rule: log(a ÷ b) = log(a) − log(b) — division becomes subtraction. Power rule: log(a^n) = n × log(a) — exponents become multipliers. These properties are why slide rules worked — adding log scales physically performed multiplication. They also explain why logarithmic graph scales compress large ranges: log(1) = 0, log(10) = 1, log(100) = 2, log(1000) = 3 — equal spacing represents 10× increases.

Real-World Logarithmic Scales

Richter scale: Each whole number increase represents 10× more ground motion and ~31.6× more energy. A magnitude 6.0 earthquake releases 31.6× more energy than a 5.0. Decibels: 10 dB increase = 10× more sound intensity. Normal conversation (60 dB) is 100× more intense than a whisper (40 dB). pH scale: Each unit represents a 10× change in hydrogen ion concentration. pH 4 is 10× more acidic than pH 5 and 100× more than pH 6. Photographic stops: Each stop doubles or halves the light exposure — a logarithmic scale that simplifies exposure calculations.

Solving Equations with Logarithms

The most common practical application: solving for time in compound growth/decay. "How long to double money at 8%?" becomes: 2 = 1.08^t → log(2) = t × log(1.08) → t = log(2)/log(1.08) = 0.301/0.0334 = 9.01 years. "When does a radioactive sample decay to 25% of its original amount with a half-life of 5 years?" 0.25 = 0.5^(t/5) → log(0.25) = (t/5) × log(0.5) → t = 5 × log(0.25)/log(0.5) = 10 years (two half-lives).

Logarithms in Finance and Growth

Logarithms transform multiplicative processes into additive ones, making growth analysis intuitive. Stock returns are often expressed as log returns: ln(P₂/P₁). Log returns are additive across time periods (unlike percentage returns), making them mathematically convenient for portfolio analysis. The natural log also appears in the continuous compounding formula: A = Pe^(rt), where the time to reach a target is t = ln(A/P)/r. To double money at 5% continuous compounding: t = ln(2)/0.05 = 13.86 years.

Logarithmic Perception in Human Senses

Human perception of many stimuli is logarithmic — we perceive equal ratios of intensity as equal differences. The Weber-Fechner law describes this: doubling light intensity doesn't feel "twice as bright" — it feels like a modest increase. This is why audio volume controls use logarithmic potentiometers, camera exposure uses f-stops (each stop = 2× light), and musical pitch uses octaves (each octave = 2× frequency). A piano keyboard is a visual representation of logarithmic frequency spacing — each key represents a constant ratio of frequencies, not a constant difference.

Change of Base and Calculator Usage

Most calculators have only two logarithm buttons: log (base 10) and ln (base e). To calculate a logarithm with any other base, use the change of base formula: log_b(x) = log(x)/log(b) = ln(x)/ln(b). For example, log₂(64) = log(64)/log(2) = 1.806/0.301 = 6. This technique is essential for solving exponential equations with bases other than 10 or e — which arise frequently in computer science (base 2), information theory, and population modeling (arbitrary growth rates).

What Logarithms Actually Mean

A logarithm answers the question: "what exponent do I need?" If 2³ = 8, then log₂(8) = 3. The base (2) raised to the answer (3) produces the argument (8). This inverse relationship with exponents makes logarithms essential wherever exponential processes need to be reversed or linearized. When scientists say an earthquake measured 7.0 on the Richter scale, they mean the seismic amplitude was 10⁷ (10 million) times the reference level — the Richter scale is a base-10 logarithm. A magnitude 8.0 earthquake is not "a little bigger" than 7.0; it releases 31.6 times more energy. Similarly, the decibel scale for sound is logarithmic: 80 dB is 10 times the intensity of 70 dB, not 14% louder. Logarithms compress enormous ranges into manageable numbers, which is why they appear in any field that deals with quantities spanning many orders of magnitude.

Three Common Logarithm Bases

Most practical logarithm work uses one of three bases. The common logarithm (log₁₀ or simply "log") uses base 10 and measures orders of magnitude: log(1000) = 3 because 10³ = 1000. Chemistry's pH scale is a common logarithm: pH = -log[H⁺], so a pH of 3 means a hydrogen ion concentration of 10⁻³ = 0.001 moles/liter. The natural logarithm (ln, base e ≈ 2.71828) arises naturally in calculus because the derivative of eˣ is eˣ — a unique self-replicating property. Continuous compound interest, population growth models, radioactive decay, and the normal distribution all use natural logarithms. The binary logarithm (log₂) counts how many times you can halve a number: log₂(256) = 8 because 2⁸ = 256. Computer science uses binary logarithms extensively: a binary search through 1 million sorted items takes at most log₂(1,000,000) ≈ 20 comparisons. Converting between bases uses the change-of-base formula: log₂(x) = ln(x) ÷ ln(2) = log(x) ÷ log(2).

Logarithm Properties and Rules

Three fundamental rules govern all logarithm arithmetic. The product rule: log(ab) = log(a) + log(b). This is why slide rules worked — multiplying two numbers meant adding their logarithmic distances on the ruler. The quotient rule: log(a/b) = log(a) - log(b). The power rule: log(a^n) = n × log(a). Together, these rules convert multiplication, division, and exponentiation into addition, subtraction, and multiplication — a simplification that enabled astronomical calculations for centuries before electronic computers. A practical application: to estimate how long it takes an investment to double at r% annual return, use the Rule of 72 (which is a logarithmic approximation): years ≈ 72/r. At 8% return, doubling takes about 9 years. The exact formula is ln(2)/ln(1.08) = 9.006 years — the Rule of 72 is remarkably accurate for rates between 2-20%.

Logarithmic Scales in Data Visualization

When data spans several orders of magnitude, a linear axis compresses most values into an unreadable cluster near zero while stretching extreme values. Logarithmic axes solve this by spacing each power of 10 equally: 1, 10, 100, 1000 receive equal visual spacing instead of the 1:10:100:1000 proportional spacing a linear axis would give. Stock market indices spanning decades use logarithmic y-axes to show percentage changes proportionally — a move from $100 to $200 (100% gain) occupies the same vertical space as $1,000 to $2,000 (also 100%), which linear axes would show as a tiny early blip followed by enormous later movements. COVID-19 case count charts used logarithmic axes to compare growth rates between countries regardless of absolute numbers: parallel lines on a log-scale chart meant identical growth rates, making it immediately visible which nations were flattening their curves. Any dataset where ratios matter more than absolute differences benefits from logarithmic presentation.

What is a log?
Inverse of exponentiation. log(1000)=3 because 10³=1000.

What Logarithms Actually Mean

A logarithm answers the question: "what exponent do I need?" If 2³ = 8, then log₂(8) = 3. The base (2) raised to the answer (3) produces the argument (8). This inverse relationship with exponents makes logarithms essential wherever exponential processes need to be reversed or linearized. When scientists say an earthquake measured 7.0 on the Richter scale, they mean the seismic amplitude was 10⁷ (10 million) times the reference level — the Richter scale is a base-10 logarithm. A magnitude 8.0 earthquake is not "a little bigger" than 7.0; it releases 31.6 times more energy. Similarly, the decibel scale for sound is logarithmic: 80 dB is 10 times the intensity of 70 dB, not 14% louder. Logarithms compress enormous ranges into manageable numbers, which is why they appear in any field that deals with quantities spanning many orders of magnitude.

Three Common Logarithm Bases

Most practical logarithm work uses one of three bases. The common logarithm (log₁₀ or simply "log") uses base 10 and measures orders of magnitude: log(1000) = 3 because 10³ = 1000. Chemistry's pH scale is a common logarithm: pH = -log[H⁺], so a pH of 3 means a hydrogen ion concentration of 10⁻³ = 0.001 moles/liter. The natural logarithm (ln, base e ≈ 2.71828) arises naturally in calculus because the derivative of eˣ is eˣ — a unique self-replicating property. Continuous compound interest, population growth models, radioactive decay, and the normal distribution all use natural logarithms. The binary logarithm (log₂) counts how many times you can halve a number: log₂(256) = 8 because 2⁸ = 256. Computer science uses binary logarithms extensively: a binary search through 1 million sorted items takes at most log₂(1,000,000) ≈ 20 comparisons. Converting between bases uses the change-of-base formula: log₂(x) = ln(x) ÷ ln(2) = log(x) ÷ log(2).

Logarithm Properties and Rules

Three fundamental rules govern all logarithm arithmetic. The product rule: log(ab) = log(a) + log(b). This is why slide rules worked — multiplying two numbers meant adding their logarithmic distances on the ruler. The quotient rule: log(a/b) = log(a) - log(b). The power rule: log(a^n) = n × log(a). Together, these rules convert multiplication, division, and exponentiation into addition, subtraction, and multiplication — a simplification that enabled astronomical calculations for centuries before electronic computers. A practical application: to estimate how long it takes an investment to double at r% annual return, use the Rule of 72 (which is a logarithmic approximation): years ≈ 72/r. At 8% return, doubling takes about 9 years. The exact formula is ln(2)/ln(1.08) = 9.006 years — the Rule of 72 is remarkably accurate for rates between 2-20%.

Logarithmic Scales in Data Visualization

When data spans several orders of magnitude, a linear axis compresses most values into an unreadable cluster near zero while stretching extreme values. Logarithmic axes solve this by spacing each power of 10 equally: 1, 10, 100, 1000 receive equal visual spacing instead of the 1:10:100:1000 proportional spacing a linear axis would give. Stock market indices spanning decades use logarithmic y-axes to show percentage changes proportionally — a move from $100 to $200 (100% gain) occupies the same vertical space as $1,000 to $2,000 (also 100%), which linear axes would show as a tiny early blip followed by enormous later movements. COVID-19 case count charts used logarithmic axes to compare growth rates between countries regardless of absolute numbers: parallel lines on a log-scale chart meant identical growth rates, making it immediately visible which nations were flattening their curves. Any dataset where ratios matter more than absolute differences benefits from logarithmic presentation.

Log vs ln?
log=base 10. ln=base e. In CS, log often=base 2.2

What Logarithms Actually Mean

A logarithm answers the question: "what exponent do I need?" If 2³ = 8, then log₂(8) = 3. The base (2) raised to the answer (3) produces the argument (8). This inverse relationship with exponents makes logarithms essential wherever exponential processes need to be reversed or linearized. When scientists say an earthquake measured 7.0 on the Richter scale, they mean the seismic amplitude was 10⁷ (10 million) times the reference level — the Richter scale is a base-10 logarithm. A magnitude 8.0 earthquake is not "a little bigger" than 7.0; it releases 31.6 times more energy. Similarly, the decibel scale for sound is logarithmic: 80 dB is 10 times the intensity of 70 dB, not 14% louder. Logarithms compress enormous ranges into manageable numbers, which is why they appear in any field that deals with quantities spanning many orders of magnitude.

Three Common Logarithm Bases

Most practical logarithm work uses one of three bases. The common logarithm (log₁₀ or simply "log") uses base 10 and measures orders of magnitude: log(1000) = 3 because 10³ = 1000. Chemistry's pH scale is a common logarithm: pH = -log[H⁺], so a pH of 3 means a hydrogen ion concentration of 10⁻³ = 0.001 moles/liter. The natural logarithm (ln, base e ≈ 2.71828) arises naturally in calculus because the derivative of eˣ is eˣ — a unique self-replicating property. Continuous compound interest, population growth models, radioactive decay, and the normal distribution all use natural logarithms. The binary logarithm (log₂) counts how many times you can halve a number: log₂(256) = 8 because 2⁸ = 256. Computer science uses binary logarithms extensively: a binary search through 1 million sorted items takes at most log₂(1,000,000) ≈ 20 comparisons. Converting between bases uses the change-of-base formula: log₂(x) = ln(x) ÷ ln(2) = log(x) ÷ log(2).

Logarithm Properties and Rules

Three fundamental rules govern all logarithm arithmetic. The product rule: log(ab) = log(a) + log(b). This is why slide rules worked — multiplying two numbers meant adding their logarithmic distances on the ruler. The quotient rule: log(a/b) = log(a) - log(b). The power rule: log(a^n) = n × log(a). Together, these rules convert multiplication, division, and exponentiation into addition, subtraction, and multiplication — a simplification that enabled astronomical calculations for centuries before electronic computers. A practical application: to estimate how long it takes an investment to double at r% annual return, use the Rule of 72 (which is a logarithmic approximation): years ≈ 72/r. At 8% return, doubling takes about 9 years. The exact formula is ln(2)/ln(1.08) = 9.006 years — the Rule of 72 is remarkably accurate for rates between 2-20%.

Logarithmic Scales in Data Visualization

When data spans several orders of magnitude, a linear axis compresses most values into an unreadable cluster near zero while stretching extreme values. Logarithmic axes solve this by spacing each power of 10 equally: 1, 10, 100, 1000 receive equal visual spacing instead of the 1:10:100:1000 proportional spacing a linear axis would give. Stock market indices spanning decades use logarithmic y-axes to show percentage changes proportionally — a move from $100 to $200 (100% gain) occupies the same vertical space as $1,000 to $2,000 (also 100%), which linear axes would show as a tiny early blip followed by enormous later movements. COVID-19 case count charts used logarithmic axes to compare growth rates between countries regardless of absolute numbers: parallel lines on a log-scale chart meant identical growth rates, making it immediately visible which nations were flattening their curves. Any dataset where ratios matter more than absolute differences benefits from logarithmic presentation.

Rules?
Product: log(ab)=log(a)+log(b). Power: log(a^n)=n·log(a). Change: log_b(x)=log(x)/log(b).

What Logarithms Actually Mean

A logarithm answers the question: "what exponent do I need?" If 2³ = 8, then log₂(8) = 3. The base (2) raised to the answer (3) produces the argument (8). This inverse relationship with exponents makes logarithms essential wherever exponential processes need to be reversed or linearized. When scientists say an earthquake measured 7.0 on the Richter scale, they mean the seismic amplitude was 10⁷ (10 million) times the reference level — the Richter scale is a base-10 logarithm. A magnitude 8.0 earthquake is not "a little bigger" than 7.0; it releases 31.6 times more energy. Similarly, the decibel scale for sound is logarithmic: 80 dB is 10 times the intensity of 70 dB, not 14% louder. Logarithms compress enormous ranges into manageable numbers, which is why they appear in any field that deals with quantities spanning many orders of magnitude.

Three Common Logarithm Bases

Most practical logarithm work uses one of three bases. The common logarithm (log₁₀ or simply "log") uses base 10 and measures orders of magnitude: log(1000) = 3 because 10³ = 1000. Chemistry's pH scale is a common logarithm: pH = -log[H⁺], so a pH of 3 means a hydrogen ion concentration of 10⁻³ = 0.001 moles/liter. The natural logarithm (ln, base e ≈ 2.71828) arises naturally in calculus because the derivative of eˣ is eˣ — a unique self-replicating property. Continuous compound interest, population growth models, radioactive decay, and the normal distribution all use natural logarithms. The binary logarithm (log₂) counts how many times you can halve a number: log₂(256) = 8 because 2⁸ = 256. Computer science uses binary logarithms extensively: a binary search through 1 million sorted items takes at most log₂(1,000,000) ≈ 20 comparisons. Converting between bases uses the change-of-base formula: log₂(x) = ln(x) ÷ ln(2) = log(x) ÷ log(2).

Logarithm Properties and Rules

Three fundamental rules govern all logarithm arithmetic. The product rule: log(ab) = log(a) + log(b). This is why slide rules worked — multiplying two numbers meant adding their logarithmic distances on the ruler. The quotient rule: log(a/b) = log(a) - log(b). The power rule: log(a^n) = n × log(a). Together, these rules convert multiplication, division, and exponentiation into addition, subtraction, and multiplication — a simplification that enabled astronomical calculations for centuries before electronic computers. A practical application: to estimate how long it takes an investment to double at r% annual return, use the Rule of 72 (which is a logarithmic approximation): years ≈ 72/r. At 8% return, doubling takes about 9 years. The exact formula is ln(2)/ln(1.08) = 9.006 years — the Rule of 72 is remarkably accurate for rates between 2-20%.

Logarithmic Scales in Data Visualization

When data spans several orders of magnitude, a linear axis compresses most values into an unreadable cluster near zero while stretching extreme values. Logarithmic axes solve this by spacing each power of 10 equally: 1, 10, 100, 1000 receive equal visual spacing instead of the 1:10:100:1000 proportional spacing a linear axis would give. Stock market indices spanning decades use logarithmic y-axes to show percentage changes proportionally — a move from $100 to $200 (100% gain) occupies the same vertical space as $1,000 to $2,000 (also 100%), which linear axes would show as a tiny early blip followed by enormous later movements. COVID-19 case count charts used logarithmic axes to compare growth rates between countries regardless of absolute numbers: parallel lines on a log-scale chart meant identical growth rates, making it immediately visible which nations were flattening their curves. Any dataset where ratios matter more than absolute differences benefits from logarithmic presentation.

Why useful?
Compress ranges (Richter, pH, dB), solve exponentials. See our Compound Interest Calculator.3

What Logarithms Actually Mean

A logarithm answers the question: "what exponent do I need?" If 2³ = 8, then log₂(8) = 3. The base (2) raised to the answer (3) produces the argument (8). This inverse relationship with exponents makes logarithms essential wherever exponential processes need to be reversed or linearized. When scientists say an earthquake measured 7.0 on the Richter scale, they mean the seismic amplitude was 10⁷ (10 million) times the reference level — the Richter scale is a base-10 logarithm. A magnitude 8.0 earthquake is not "a little bigger" than 7.0; it releases 31.6 times more energy. Similarly, the decibel scale for sound is logarithmic: 80 dB is 10 times the intensity of 70 dB, not 14% louder. Logarithms compress enormous ranges into manageable numbers, which is why they appear in any field that deals with quantities spanning many orders of magnitude.

Three Common Logarithm Bases

Most practical logarithm work uses one of three bases. The common logarithm (log₁₀ or simply "log") uses base 10 and measures orders of magnitude: log(1000) = 3 because 10³ = 1000. Chemistry's pH scale is a common logarithm: pH = -log[H⁺], so a pH of 3 means a hydrogen ion concentration of 10⁻³ = 0.001 moles/liter. The natural logarithm (ln, base e ≈ 2.71828) arises naturally in calculus because the derivative of eˣ is eˣ — a unique self-replicating property. Continuous compound interest, population growth models, radioactive decay, and the normal distribution all use natural logarithms. The binary logarithm (log₂) counts how many times you can halve a number: log₂(256) = 8 because 2⁸ = 256. Computer science uses binary logarithms extensively: a binary search through 1 million sorted items takes at most log₂(1,000,000) ≈ 20 comparisons. Converting between bases uses the change-of-base formula: log₂(x) = ln(x) ÷ ln(2) = log(x) ÷ log(2).

Logarithm Properties and Rules

Three fundamental rules govern all logarithm arithmetic. The product rule: log(ab) = log(a) + log(b). This is why slide rules worked — multiplying two numbers meant adding their logarithmic distances on the ruler. The quotient rule: log(a/b) = log(a) - log(b). The power rule: log(a^n) = n × log(a). Together, these rules convert multiplication, division, and exponentiation into addition, subtraction, and multiplication — a simplification that enabled astronomical calculations for centuries before electronic computers. A practical application: to estimate how long it takes an investment to double at r% annual return, use the Rule of 72 (which is a logarithmic approximation): years ≈ 72/r. At 8% return, doubling takes about 9 years. The exact formula is ln(2)/ln(1.08) = 9.006 years — the Rule of 72 is remarkably accurate for rates between 2-20%.

Logarithmic Scales in Data Visualization

When data spans several orders of magnitude, a linear axis compresses most values into an unreadable cluster near zero while stretching extreme values. Logarithmic axes solve this by spacing each power of 10 equally: 1, 10, 100, 1000 receive equal visual spacing instead of the 1:10:100:1000 proportional spacing a linear axis would give. Stock market indices spanning decades use logarithmic y-axes to show percentage changes proportionally — a move from $100 to $200 (100% gain) occupies the same vertical space as $1,000 to $2,000 (also 100%), which linear axes would show as a tiny early blip followed by enormous later movements. COVID-19 case count charts used logarithmic axes to compare growth rates between countries regardless of absolute numbers: parallel lines on a log-scale chart meant identical growth rates, making it immediately visible which nations were flattening their curves. Any dataset where ratios matter more than absolute differences benefits from logarithmic presentation.

Log(0)?
Undefined (approaches -∞). Negative numbers: undefined in reals.4

How to Use This Calculator

  1. Enter value — Number to log.
  2. Select base — 10, e, 2, or custom.
  3. See result — Log value with explanation.

Tips and Best Practices

log answers: 10^what = x? Core concept.

ln for calculus. Continuous growth, derivatives, integrals.

log2 for CS. Binary search, tree depth, bits.

Change of base converts any log. To a base your calculator supports.

See also: Exponent · Scientific · Compound Interest

📚 Sources & References
  1. [1] Khan Academy. "Logarithms." KhanAcademy.org
  2. [2] Wolfram. "Logarithm." MathWorld
  3. [3] NIST. "Math Functions." DLMF.NIST.gov
  4. [4] OpenStax. "Logarithms." OpenStax.org
Editorial Standards — Every calculator is built from peer-reviewed formulas and official data sources, editorially reviewed for accuracy, and updated regularly. Read our full methodology · About the author