Free to Use

Logarithm Calculator

Calculate logarithms with any base, natural logs, common logs, and solve exponential equations. Perfect for students, engineers, scientists, and anyone working with logarithmic functions.

Select Calculation Mode

Calculate the logarithm of a number x with a custom base b. The result y satisfies by = x.

Given a base b and a result x, find the exponent y such that by = x. This is equivalent to y = logb(x).

Calculate the natural logarithm ln(x), which is the logarithm with base e (Euler's number, approximately 2.71828).

Real-World Logarithm Examples

🌍 Earthquake Magnitude (Richter Scale)

The Richter scale uses base-10 logarithms. An earthquake measuring 6.0 is log₁₀(106) = 6.

A 6.0 earthquake is 10 times more powerful than a 5.0 earthquake because log₁₀(10⁶ ÷ 10⁵) = log₁₀(10) = 1

Each whole number increase on the Richter scale represents a tenfold increase in amplitude.

🧪 Chemistry: pH Scale

pH = -log₁₀[H⁺], where [H⁺] is hydrogen ion concentration.

If [H⁺] = 1.0 × 10⁻⁷ M (pure water): pH = -log₁₀(1.0 × 10⁻⁷) = 7.0

The pH scale is logarithmic, so a pH of 3 is 10,000 times more acidic than a pH of 7.

💰 Compound Interest

To find how long it takes for an investment to double at 5% annual interest compounded continuously: t = ln(2) / 0.05

ln(2) = 0.6931, so t = 0.6931 / 0.05 = 13.86 years

Natural logarithms are essential in continuous growth and decay calculations.

🔊 Sound Intensity (Decibels)

Decibels (dB) = 10 × log₁₀(I / I₀), where I is sound intensity and I₀ is the reference threshold.

If a sound is 1000 times more intense than the threshold: dB = 10 × log₁₀(1000) = 10 × 3 = 30 dB

Every 10 dB increase represents a tenfold increase in sound intensity.

🧬 Biology: Bacterial Growth

A bacterial culture doubles every hour. Starting with 100 bacteria, after t hours: N = 100 × 2t.

To reach 12,800 bacteria: log₂(12,800 ÷ 100) = log₂(128) = 7 hours

Binary logarithms (base 2) are commonly used in population growth models.

Understanding Logarithms

logb(x) = y  ⇔  by = x
A logarithm answers: "To what exponent must base b be raised to get x?"

Key Logarithm Properties

1
Product Rule: logb(xy) = logb(x) + logb(y)
2
Quotient Rule: logb(x/y) = logb(x) - logb(y)
3
Power Rule: logb(xn) = n × logb(x)
4
Change of Base: logb(x) = ln(x) / ln(b) = log₁₀(x) / log₁₀(b)
5
Identity: logb(b) = 1   and   logb(1) = 0

Special Logarithms

🌿 Natural Log ln(x)

Base e (≈ 2.71828). Used in calculus, compound interest, population growth, and physics.

🔟 Common Log log₁₀(x)

Base 10. Used in the Richter scale, pH, decibels, and scientific notation.

💻 Binary Log log₂(x)

Base 2. Used in computer science, information theory, and data structures (binary search).

How to Use the Calculator

1
Choose a mode: Select from logb(x), solve by = x, or natural log ln(x).
2
Enter values: Input the base and/or number depending on your selected mode.
3
Calculate: Click the calculate button to get the logarithm value plus conversions to ln, log₁₀, and log₂.
4
Review steps: Read the step-by-step solution to understand how the result was derived.
🧮
Three Calculation Modes
Choose between log base b of x, solving exponential equations, or natural logarithms — all in one tool.
🔄
Multi-Base Conversions
See your result automatically converted to natural log, common log (base 10), and binary log (base 2).
📚
Step-by-Step Solutions
Follow detailed steps showing the change-of-base formula and how each result is computed.
🎯
High Precision
Calculations with up to 6 decimal places for accurate scientific and engineering use cases.

What is a Logarithm?

A logarithm is the inverse operation of exponentiation. If by = x, then the logarithm of x with base b is y, written as logb(x) = y. In simple terms, a logarithm tells you what exponent you need to raise a base number to in order to get another number.

For example, since 23 = 8, we know that log₂(8) = 3. This means the logarithm of 8 with base 2 is 3, because 2 raised to the power of 3 equals 8. Logarithms are the key to understanding how numbers grow exponentially and are essential in fields ranging from acoustics to astronomy.

There are three commonly used logarithms: natural logarithms (ln, base e ≈ 2.71828), common logarithms (log₁₀, base 10), and binary logarithms (log₂, base 2). Each has its own domain of application, but they all share the same fundamental properties and rules.

Why Are Logarithms Important?

Logarithms are one of the most powerful tools in mathematics because they transform exponential relationships into linear ones. This makes complex calculations involving growth, decay, and scaling much more manageable. In science and engineering, logarithms appear in formulas for earthquake magnitude (Richter scale), sound intensity (decibels), acidity (pH), radioactive decay, and population growth models. In finance, natural logarithms are used to calculate continuous compound interest and investment growth rates.

Properties of Logarithms

Understanding the properties of logarithms is essential for simplifying complex logarithmic expressions and solving logarithmic equations. These properties follow directly from the laws of exponents and form the foundation of all logarithmic calculations.

logb(xy) = logb(x) + logb(y)
The Product Rule: The log of a product equals the sum of the logs.
logb(x/y) = logb(x) - logb(y)
The Quotient Rule: The log of a quotient equals the difference of the logs.
logb(xn) = n × logb(x)
The Power Rule: The log of a power equals the exponent times the log.

The change of base formula is perhaps the most practical property: logb(x) = ln(x) / ln(b) = log₁₀(x) / log₁₀(b). This formula allows you to calculate logarithms with any base using only natural or common logarithms, which is exactly how our calculator computes your results. For example, to calculate log₃(81), you can compute ln(81) / ln(3) = 4.389 / 1.099 = 4, confirming that 3⁴ = 81.

Applications of Logarithms

Logarithms appear in nearly every scientific and technical field. Here are some of the most important real-world applications:

🌍 Seismology

The Richter scale uses base-10 logarithms to measure earthquake energy. A magnitude 7 earthquake is 10 times more powerful than a magnitude 6.

🔊 Acoustics

Decibels (dB) measure sound intensity on a logarithmic scale. A 20 dB increase means sound intensity has increased by a factor of 100.

🧪 Chemistry

The pH scale is the negative logarithm of hydrogen ion concentration. Each pH unit represents a tenfold change in acidity.

💻 Computer Science

Binary logarithms (log₂) are used in algorithm analysis (Big O notation), binary search trees, and information theory (bits).

💰 Finance

Natural logarithms model continuous compound interest, investment returns, and economic growth rates over time.

📊 Data Visualization

Logarithmic scales help visualize data spanning many orders of magnitude, such as population growth, stock prices, and viral spread.

Frequently Asked Questions

What is the difference between log, ln, and log₁₀?
log without a specified base can be ambiguous, but in mathematics it often means base 10. ln is the natural logarithm with base e (Euler's number, ≈ 2.71828). log₁₀ explicitly indicates base 10. Each type has its own applications: ln is used in calculus and continuous growth models, log₁₀ is used in scientific scales like pH and the Richter scale, and log₂ is used in computer science and information theory. Our calculator shows all three conversions for every result.
What is the change of base formula and how do I use it?
The change of base formula states: logb(x) = ln(x) / ln(b) or equivalently logb(x) = log₁₀(x) / log₁₀(b). This is useful when you need to calculate a logarithm with a base that isn't available on your calculator. For example, to calculate log₅(100), you can compute ln(100) ÷ ln(5) = 4.60517 ÷ 1.60944 = 2.86135. Our calculator uses this formula internally to compute logarithms with any base you specify.
Can I take the logarithm of zero or a negative number?
No. Logarithms are only defined for positive real numbers (x > 0). The logarithm of zero is undefined because no finite exponent can make a positive base equal zero. Similarly, logarithms of negative numbers are undefined in the real number system (they exist in complex analysis using imaginary numbers, but that's beyond the scope of this calculator). If you try to calculate the log of a non-positive number, our calculator will show an error message.
What does it mean when a logarithm equals 0 or 1?
A logarithm equals 0 when the argument is 1, because any base raised to the power of 0 equals 1: logb(1) = 0 for any valid base b. A logarithm equals 1 when the argument equals the base, because b¹ = b: logb(b) = 1. These are fundamental identities that follow directly from the definition of logarithms and are useful for checking your calculations.
How do I solve logarithmic equations?
Solving logarithmic equations typically involves isolating the logarithm and then converting to exponential form. For example, to solve log₂(x) = 5, rewrite as 2⁵ = x, so x = 32. For more complex equations like log(x) + log(x-3) = 1, use the product rule: log(x(x-3)) = 1, then convert to exponential form: x(x-3) = 10¹, and solve the resulting quadratic equation. Always check your solutions in the original equation to ensure they don't produce logs of negative numbers.
Where are logarithms used in real life?
Logarithms are used extensively in real-world applications: Seismology (Richter scale for earthquakes), Acoustics (decibel scale for sound), Chemistry (pH scale for acidity), Astronomy (apparent magnitude of stars), Finance (compound interest and investment growth), Computer Science (algorithm complexity and binary search), Biology (population growth models), Psychology (Weber-Fechner law of sensory perception), and Data Science (logarithmic transformations for data analysis). The common thread is that logarithms help us work with quantities that span many orders of magnitude.

⚠️ Important Note: Logarithm calculations require positive arguments. The base must be positive and not equal to 1, and the argument (x) must be greater than zero. While our Logarithm Calculator provides accurate mathematical results, always verify critical calculations — especially in scientific, financial, or engineering contexts — with appropriate domain knowledge or professional consultation.