Skip to main content

Logarithm Calculator

Calculate the logarithm of a number with a specified base

Category: Mathematics

Logarithm Calculator Inputs

Enter values to calculate

The number to find the logarithm of

The base of the logarithm

Enable JavaScript for interactive calculation and step-by-step results.

Logarithm Calculator Formula

Equation

log_b(x)

Excel Formula

=log_b(x)

Variables

  • Number (x) — The number to find the logarithm of
  • Base (b) — The base of the logarithm

How the Logarithm Calculator Works

Logarithms are one of the most powerful mathematical tools, serving as the inverse operation to exponentiation. If $b^y = x$, then $\log_b(x) = y$. This fundamental relationship connects exponential and logarithmic functions, making logarithms essential for solving exponential equations, analyzing growth patterns, and understanding phenomena that span multiple orders of magnitude. From measuring earthquake intensity to calculating compound interest, logarithms provide a way to work with exponential relationships using addition and subtraction instead of multiplication and exponentiation.

The core relationship is log_b(x). Typical inputs include Number (x), Base (b).

Enter your values in the logarithm calculator above, review the step-by-step solution, and compare against the worked examples below so you can see how each input changes the result. This free online mathematics tool is built for homework, design checks, and professional verification.

Logarithm Calculator Theory & Explanation

Definition and Fundamental Relationship

A logarithm answers the question: "To what power must the base b be raised to produce x?" Mathematically, if b^y = x, then y = \log_b(x). The base b must be positive and not equal to 1, while x must be positive. This inverse relationship means that logarithmic and exponential functions undo each other: b^\log_b(x) = x and \log_b(b^x) = x. Understanding this connection is crucial for solving equations involving exponentials.

\textIf b^y = x \text, then y = \log_b(x) \\[0.5em] \textInverse properties: \\[0.3em] b^\log_b(x) = x \\[0.3em] \log_b(b^x) = x

Essential Properties of Logarithms (Product, Quotient, Power)

The algebraic properties of logarithms transform multiplication into addition, division into subtraction, and exponentiation into multiplication. These properties are derived from the laws of exponents and make complex calculations manageable. The product rule states that \log_b(xy) = \log_b(x) + \log_b(y), turning multiplication into addition. The quotient rule gives \log_b(x/y) = \log_b(x) - \log_b(y), converting division to subtraction. The power rule shows that \log_b(x^n) = n\log_b(x), transforming exponentiation into multiplication. These properties are fundamental to solving logarithmic equations and simplifying expressions.

\beginalign \textProduct Rule: & \log_b(xy) = \log_b(x) + \log_b(y) \\[0.5em] \textQuotient Rule: & \log_b((x)/(y)) = \log_b(x) - \log_b(y) \\[0.5em] \textPower Rule: & \log_b(x^n) = n\log_b(x) \\[0.5em] \textSpecial Values: & \log_b(1) = 0, \quad \log_b(b) = 1 \endalign

Change of Base Formula

The change of base formula is a powerful tool that allows us to convert logarithms from one base to another, enabling calculations with any base using only common logarithms (base 10) or natural logarithms (base e). This formula states that \log_a(x) = (\log_b(x))/(\log_b(a)) for any valid bases a and b. This is particularly useful because most calculators only provide log base 10 and natural log (ln). The formula is derived by setting y = \log_a(x), which means a^y = x, then taking \log_b of both sides: y\log_b(a) = \log_b(x), solving for y.

\log_a(x) = (\log_b(x))/(\log_b(a)) = (\ln(x))/(\ln(a)) = (\log(x))/(\log(a)) \\[0.5em] \textCommon applications: \\[0.3em] \log_2(x) = (\ln(x))/(\ln(2)) ≈ 1.4427 \ln(x)

Common Logarithmic Bases and Their Applications

Different bases are used in various fields based on their practical applications. The common logarithm (base 10) is denoted as \log(x) or \log_10(x) and is widely used in science for measuring quantities that span many orders of magnitude, such as the pH scale in chemistry, decibel levels in acoustics, and the Richter scale for earthquakes. The natural logarithm (base e ≈ 2.71828) is denoted as \ln(x) and appears naturally in calculus, continuous growth models, and probability theory. The binary logarithm (base 2) is denoted as \log_2(x) or \textlb(x) and is fundamental in computer science, information theory, and digital communications for measuring information content in bits.

\beginalign \textCommon: & \log_10(x) = \log(x) & \text(Science, pH, decibels) \\[0.5em] \textNatural: & \log_e(x) = \ln(x) & \text(Calculus, growth, e ≈ 2.71828) \\[0.5em] \textBinary: & \log_2(x) & \text(Computing, information theory) \endalign

The Natural Logarithm and Euler's Number

The natural logarithm, denoted \ln(x), uses Euler's number e ≈ 2.71828 as its base. This special number arises naturally in many mathematical contexts: it is the limit of (1 + 1/n)^n as n approaches infinity, the base for which the exponential function equals its own derivative, and appears in the formula for continuous compound interest. The natural logarithm has unique properties in calculus: the derivative of \ln(x) is simply 1/x, and the integral of 1/x is \ln|x| + C. These elegant properties make the natural logarithm essential in mathematical analysis, differential equations, and modeling continuous growth and decay processes.

e = \lim_n \to ∞(1 + (1)/(n))^n ≈ 2.71828 \\[0.5em] (d)/(dx)\ln(x) = (1)/(x), \quad ∫ (1)/(x)dx = \ln|x| + C \\[0.5em] \textContinuous growth: A(t) = A_0 e^rt \Rightarrow t = (\ln(A/A_0))/(r)

Logarithmic Scales and Order of Magnitude

Logarithmic scales compress wide-ranging data into manageable intervals, making them ideal for representing quantities that span many orders of magnitude. Each unit on a logarithmic scale represents a multiplication by the base (often 10), rather than addition. For example, the pH scale measures acidity on a logarithmic scale where pH = -log₁₀[H⁺], so each unit decrease in pH represents a tenfold increase in hydrogen ion concentration. The decibel scale for sound intensity uses dB = 10\log_10(I/I_0), where a 10 dB increase represents 10 times more intensity. The Richter scale for earthquakes is also logarithmic, where each whole number increase represents a tenfold increase in amplitude. These scales allow us to compare vastly different magnitudes on a single, comprehensible scale.

\beginalign \textpH: & pH = -\log_10[H^+] \\[0.5em] \textDecibels: & dB = 10\log_10((I)/(I_0)) \\[0.5em] \textRichter: & M_L = \log_10(A) - \log_10(A_0) \endalign

Solving Exponential Equations Using Logarithms

Logarithms are the primary tool for solving equations where the variable appears in an exponent. To solve an exponential equation like b^x = c, we take the logarithm of both sides: \log(b^x) = \log(c), then apply the power rule: x\log(b) = \log(c), and finally solve for x: x = (\log(c))/(\log(b)). This technique works for any base and is essential in applications involving compound interest, population growth, radioactive decay, and other exponential processes. For more complex equations, we may need to use multiple logarithmic properties in combination.

\textTo solve b^x = c: \\[0.5em] \beginalign b^x &= c \\[0.3em] \log(b^x) &= \log(c) \\[0.3em] x\log(b) &= \log(c) \\[0.3em] x &= (\log(c))/(\log(b)) = \log_b(c) \endalign

Logarithmic Growth vs Exponential Growth

Logarithmic and exponential functions represent opposite extremes of growth behavior. Exponential functions like f(x) = b^x grow extremely rapidly, doubling repeatedly as x increases linearly. In contrast, logarithmic functions like f(x) = \log_b(x) grow very slowly, requiring x to be multiplied repeatedly to achieve linear increases in the output. This inverse relationship is evident in their graphs: exponential functions curve upward ever more steeply, while logarithmic functions curve upward with decreasing slope. In practical terms, exponential growth can model unchecked population growth or compound interest, while logarithmic growth often describes learning curves, sensory perception (Weber-Fechner law), and algorithms with logarithmic time complexity.

\textExponential: y = b^x \quad (\textrapid growth) \\[0.5em] \textLogarithmic: y = \log_b(x) \quad (\textslow growth) \\[0.5em] \textComparison: doubling x \text adds constant to \log(x)

Real-World Applications

Logarithms appear throughout science, engineering, and finance. In chemistry, pH measures acidity logarithmically. In acoustics, decibels measure sound intensity on a log scale. Seismology uses the Richter scale to compare earthquake magnitudes. In finance, logarithms help calculate compound interest and investment growth over time. Computer science uses binary logarithms to analyze algorithm complexity (e.g., O(log n) for binary search). In biology, logarithms model population growth with limiting factors. Information theory uses logarithms to quantify information content and entropy. The half-life of radioactive substances is calculated using natural logarithms. These diverse applications demonstrate the fundamental importance of logarithms across disciplines.

\beginalign \textCompound Interest: & t = (\ln(A/P))/(\ln(1 + r)) \\[0.5em] \textHalf-life: & t_1/2 = (\ln(2))/(\lambda) \\[0.5em] \textInformation: & H = -Σ p_i \log_2(p_i) \text bits \endalign

Logarithm Calculator Worked Examples

Worked Example

Inputs

  • number: 100
  • base: 10

Result: 2

Explanation

To find \log_10(100), we ask: "To what power must 10 be raised to get 100?" Since 10^2 = 100, the answer is 2. Using the change of base formula: \log_10(100) = (\ln(100))/(\ln(10)) = (4.605170)/(2.302585) = 2.000000. This demonstrates that logarithms essentially "count" how many times we multiply the base to reach the target number.

Second Scenario

Inputs

  • number: 75
  • base: 10

Result: 2

Explanation

This scenario uses different inputs (number = 75, base = 10) to show how changing one variable affects the logarithm result. Run the calculator above with these values to get the exact updated output with step-by-step work.

Common Logarithm Calculator Use Cases

  • Homework and exam practice
  • Engineering and science coursework
  • Quick verification of hand calculations
  • Logarithm homework and study
  • Logarithm design and analysis

Logarithm Calculator FAQs

What is the natural logarithm and why is it special?

The natural logarithm (ln or \log_e) uses Euler's number e ≈ 2.71828 as its base. It's "natural" because it arises organically in calculus: the derivative of e^x is e^x, and the derivative of \ln(x) is 1/x. This makes it essential for solving differential equations, modeling continuous growth/decay, and analyzing compound interest. Natural logarithms appear in formulas for entropy, half-life calculations, and probability distributions.

Why can't I calculate the logarithm of zero or negative numbers?

Logarithms are only defined for positive real numbers because no positive base raised to any real power can produce zero or a negative result. Mathematically, if b^y = x where b > 0, then x must be positive. For negative numbers and zero, logarithms can be extended to the complex number system, but this requires imaginary numbers and is beyond basic logarithm operations.

What are the special logarithm values I should memorize?

Key values to remember: \log_b(1) = 0 (any base to the power 0 equals 1), \log_b(b) = 1 (any base to the power 1 equals itself), \log_10(10) = 1, \log_10(100) = 2, \log_10(1000) = 3, \ln(e) = 1, \ln(1) = 0, \log_2(2) = 1, \log_2(8) = 3, \log_2(1024) = 10. These values help with quick mental calculations and understanding logarithmic patterns.

How do I solve equations with logarithms?

For equations like \log_b(x) = c, convert to exponential form: x = b^c. For equations like b^x = c, take the logarithm of both sides: x\log(b) = \log(c), so x = (\log(c))/(\log(b)). Use logarithm properties to simplify: combine \log(a) + \log(b) = \log(ab), separate \log(a/b) = \log(a) - \log(b), and bring down exponents: \log(a^n) = n\log(a).

What's the difference between log, ln, and lg?

These notations represent different logarithmic bases: "log" typically means \log_10 (base 10, common logarithm) in engineering and sciences, though in pure mathematics it might mean any logarithm. "ln" always means \log_e (natural logarithm, base e ≈ 2.71828). "lg" sometimes denotes \log_2 (binary logarithm, base 2) in computer science, though this notation is less common. Always check context to be sure of the intended base.

How are logarithms used in real-world applications?

Logarithms are ubiquitous in science and engineering: measuring sound intensity in decibels (dB = 10\log_10(I/I_0)), earthquake magnitude on the Richter scale, pH levels in chemistry (pH = -\log_10[H^+]), calculating compound interest and investment growth, analyzing algorithm complexity in computer science (O(log n)), measuring information in bits, modeling radioactive decay and half-life, compression in data storage and transmission, and representing wide-ranging data like star brightness and population growth.

Can a logarithm be negative? What does that mean?

Yes, logarithms can be negative! \log_b(x) < 0 when 0 < x < 1. This means the base must be raised to a negative power to produce x. For example, \log_10(0.01) = -2 because 10^-2 = 0.01. Negative logarithms commonly appear when dealing with numbers between 0 and 1, such as probabilities, concentrations in chemistry, and signal attenuation in electronics. The magnitude tells you how many times smaller the number is compared to the base.

What is the change of base formula and when do I use it?

The change of base formula is \log_a(x) = (\log_b(x))/(\log_b(a)) for any valid bases a and b. Use it to calculate logarithms with bases your calculator doesn't have (most calculators only have log₁₀ and ln). For example, to find \log_2(50), calculate (\ln(50))/(\ln(2)) = (3.912)/(0.693) ≈ 5.644. This formula is essential for solving exponential equations with arbitrary bases and comparing logarithms with different bases.