Logarithm Calculator

Calculate logarithms with any base including natural log (ln) and common log. Get instant results with step-by-step explanations and visual graphs.

The base of the logarithm (must be positive and not equal to 1) Please enter a valid base greater than 0 and not equal to 1
The value to calculate the logarithm of (must be positive) Please enter a positive number

Quick Values

Result
0
Enter values and click Calculate
Step-by-Step Explanation

Steps will appear here after calculation

Logarithm Properties Calculator

Logarithm Properties

Enter values to see logarithm property calculations

Logarithm Equation Solver

Solve for x in the equation: logb(x) = y

Solution

Enter values to solve the equation

Common Logarithms (base 10)
log(1) =0
log(2) =0.301
log(3) =0.477
log(4) =0.602
log(5) =0.699
log(6) =0.778
log(7) =0.845
log(8) =0.903
log(9) =0.954
log(10) =1
Natural Logarithms (base e)
ln(1) =0
ln(2) =0.693
ln(e) =1
ln(3) =1.099
ln(5) =1.609
ln(10) =2.303
ln(e²) =2
ln(20) =2.996
ln(e³) =3
ln(100) =4.605

Logarithmic Curve Visualization

Understanding Logarithms: The Inverse of Exponents

Logarithms represent one of the most powerful and elegant concepts in mathematics, serving as the inverse operation of exponentiation and providing a fundamental tool for solving exponential equations, modeling growth and decay processes, simplifying complex calculations, and understanding relationships across vast scales of magnitude. A logarithm answers the question: "To what power must we raise a given base to obtain a specific value?" For example, log₁₀(100) asks "10 raised to what power equals 100?" The answer is 2, because 10² = 100. This inverse relationship between logarithms and exponents underlies their utility throughout mathematics, science, engineering, and countless practical applications from measuring earthquake intensity and sound levels to analyzing algorithms and calculating compound interest. Understanding logarithms opens doors to advanced mathematical concepts, enables sophisticated problem-solving techniques, and provides insight into the logarithmic patterns that appear throughout nature and human endeavor.

The Definition and Fundamental Concept of Logarithms

The logarithm of a number x to base b, written as log_b(x), is the exponent to which b must be raised to produce x. Mathematically, if log_b(x) = y, then b^y = x. This definition establishes logarithms as the inverse function of exponentiation: logarithms "undo" exponents just as subtraction undoes addition and division undoes multiplication. For the logarithm to be defined, the base b must be positive and not equal to 1 (since 1 raised to any power always equals 1, making the logarithm meaningless), and the argument x must be positive (since no real power of a positive base produces a negative or zero result). For example, logā‚‚(8) = 3 because 2³ = 8, log₁₀(1000) = 3 because 10³ = 1000, and logā‚…(25) = 2 because 5² = 25. This fundamental relationship allows us to convert between exponential and logarithmic forms, enabling us to solve equations and problems that would otherwise be intractable.

Common Logarithms and Natural Logarithms

Two bases are used so frequently that they have special notations and names. The common logarithm uses base 10 and is written simply as "log" without a subscript: log(x) means log₁₀(x). Common logarithms are ubiquitous in applications involving decimal systems, orders of magnitude, and human measurement scales like pH, decibels, and the Richter scale. The common logarithm tells us how many digits a number has: log₁₀(100) = 2 indicates 100 is a 3-digit number (10² has three digits when written as 100), while log₁₀(1000000) = 6 indicates 1,000,000 is a 7-digit number. The natural logarithm uses base e (approximately 2.71828) and is written as "ln": ln(x) means log_e(x). Natural logarithms arise naturally (hence the name) in calculus, exponential growth and decay, compound interest with continuous compounding, probability theory, and countless other areas. The number e itself emerges from the limit of (1 + 1/n)^n as n approaches infinity, representing continuous growth, and ln(x) has the elegant property that its derivative is 1/x, making it fundamental to calculus and mathematical analysis.

The Relationship Between Logarithms and Exponents

The inverse relationship between logarithms and exponents is the key to understanding and applying logarithmic functions. If b^y = x, then log_b(x) = y, and conversely, if log_b(x) = y, then b^y = x. This bidirectional relationship means we can convert any exponential equation into a logarithmic one and vice versa. For instance, 2⁵ = 32 is equivalent to logā‚‚(32) = 5, and 10³ = 1000 is equivalent to log₁₀(1000) = 3. This conversion is essential for solving exponential equations: if we need to solve 2^x = 50, we can take the logarithm of both sides to get x = logā‚‚(50), which can be calculated using the change of base formula as log(50)/log(2) ā‰ˆ 5.644. The inverse relationship also means that b^(log_b(x)) = x for any positive x and log_b(b^x) = x for any real x, allowing us to simplify complex expressions and solve sophisticated equations throughout mathematics and its applications.

Fundamental Logarithm Properties and Rules

Logarithms obey several fundamental properties that make them powerful tools for simplification and calculation. The product rule states that the logarithm of a product equals the sum of the logarithms: log_b(xy) = log_b(x) + log_b(y). This property historically enabled rapid multiplication before calculators by converting multiplication into addition using logarithm tables. The quotient rule states that the logarithm of a quotient equals the difference of the logarithms: log_b(x/y) = log_b(x) - log_b(y), similarly converting division into subtraction. The power rule states that the logarithm of a power equals the exponent times the logarithm: log_b(x^n) = n Ɨ log_b(x), converting exponentiation into multiplication. These three rules, along with log_b(1) = 0 (since b⁰ = 1) and log_b(b) = 1 (since b¹ = b), form the foundation of logarithmic algebra. For example, log₁₀(200) can be calculated as log₁₀(2 Ɨ 100) = log₁₀(2) + log₁₀(100) = 0.301 + 2 = 2.301, and logā‚‚(32) can be found from logā‚‚(2⁵) = 5 Ɨ logā‚‚(2) = 5 Ɨ 1 = 5.

The Change of Base Formula

The change of base formula allows us to calculate logarithms in any base using logarithms in a different base, typically common logarithms (base 10) or natural logarithms (base e) available on calculators. The formula states that log_b(x) = log_a(x) / log_a(b), where a is the new base we're converting to. Most commonly, we convert to base 10: log_b(x) = log(x) / log(b), or to base e: log_b(x) = ln(x) / ln(b). For example, to calculate logā‚‚(50), which isn't directly available on most calculators, we use logā‚‚(50) = log(50) / log(2) = 1.699 / 0.301 ā‰ˆ 5.644. This formula is essential for practical calculations, theoretical proofs, and understanding the relationships between different logarithmic bases. It also reveals that logarithms in different bases differ only by a constant multiplier: log_b(x) = log_a(x) Ɨ (1 / log_a(b)), meaning logarithmic functions with different bases are scalar multiples of each other, which explains why all logarithmic graphs have the same basic shape but different horizontal scales.

Applications in pH and Acidity Measurement

The pH scale, measuring the acidity or alkalinity of solutions, is defined as pH = -log₁₀[H⁺], where [H⁺] represents the hydrogen ion concentration in moles per liter. This logarithmic scale compresses the enormous range of hydrogen ion concentrations found in nature (spanning 14 orders of magnitude from 10⁻¹⁓ to 1 M) into a manageable scale from 0 to 14. Pure water has pH 7 (neutral), with [H⁺] = 10⁻⁷ M; acids have pH less than 7 (lemon juice around pH 2, with [H⁺] = 10⁻² M); and bases have pH greater than 7 (bleach around pH 12, with [H⁺] = 10⁻¹² M). The logarithmic nature means each pH unit represents a tenfold change in acidity: pH 5 is ten times more acidic than pH 6, and pH 4 is one hundred times more acidic than pH 6. This logarithmic scale enables easy comparison and communication of acidity levels that would otherwise require unwieldy exponential notation, and it reflects how biological systems respond logarithmically to changes in hydrogen ion concentration.

The Richter Scale and Earthquake Magnitude

The Richter scale measures earthquake magnitude using a logarithmic formula based on the amplitude of seismic waves: M = log₁₀(A/Aā‚€), where A is the measured amplitude and Aā‚€ is a reference amplitude. Each whole number increase on the Richter scale represents a tenfold increase in measured amplitude and approximately 31.6 times more energy release. An earthquake of magnitude 6.0 releases about 31.6 times more energy than a magnitude 5.0 earthquake, and a magnitude 7.0 earthquake releases about 1,000 times more energy than a magnitude 5.0 earthquake (31.6² ā‰ˆ 1,000). The logarithmic scale is necessary because earthquake energies vary by factors of billions: the strongest earthquakes (magnitude 9+) release billions of times more energy than the weakest perceptible earthquakes (magnitude 3). Without the logarithmic compression, earthquake measurements would span from single digits to numbers in the billions, making comparison and communication impractical. The logarithmic scale also reflects how human perception of earthquake intensity responds logarithmically rather than linearly to the actual physical energy released.

Decibels and Sound Intensity Measurement

The decibel (dB) scale measures sound intensity using a logarithmic formula: L = 10 Ɨ log₁₀(I/Iā‚€), where I is the sound intensity and Iā‚€ is the reference intensity (the threshold of human hearing, approximately 10⁻¹² W/m²). This logarithmic scale compresses the enormous range of sound intensities humans can perceive—spanning over 12 orders of magnitude from the faintest detectable sound to sounds that cause immediate damage—into a practical scale from 0 dB (threshold of hearing) to about 140 dB (threshold of pain). A whisper measures about 30 dB, normal conversation about 60 dB, a lawnmower about 90 dB, and a jet engine about 140 dB. Each 10 dB increase represents a tenfold increase in actual sound intensity: 70 dB is ten times more intense than 60 dB, and 80 dB is one hundred times more intense than 60 dB. The logarithmic scale reflects the Weber-Fechner law, which states that perceived loudness increases logarithmically with actual intensity, matching how human hearing actually responds to sound.

Logarithms in Compound Interest and Finance

Logarithms are essential for solving compound interest problems, particularly for determining how long it takes for an investment to reach a target value. The compound interest formula A = P(1 + r/n)^(nt) gives the final amount A given principal P, annual rate r, compounding frequency n, and time t in years. To solve for time when we know the other values, we need logarithms: t = ln(A/P) / (n Ɨ ln(1 + r/n)). For example, to find how long it takes for $1,000 to grow to $2,000 at 7% annual interest compounded annually, we solve 2000 = 1000(1.07)^t, giving t = log(2) / log(1.07) ā‰ˆ 10.24 years. The Rule of 72 provides a quick approximation: dividing 72 by the interest rate percentage gives approximately the doubling time (72/7 ā‰ˆ 10.3 years for 7%). This rule emerges from the logarithmic relationship in the exact formula. Logarithms also appear in present value calculations (determining today's value of future money), continuous compounding (where the formula becomes A = Pe^(rt)), and calculating effective annual rates for different compounding frequencies.

Logarithmic Scales in Science and Engineering

Many scientific and engineering measurements use logarithmic scales to handle quantities spanning multiple orders of magnitude. The magnitude scale in astronomy measures star brightness logarithmically, where each magnitude represents a brightness ratio of about 2.512 (chosen so five magnitudes equal a brightness ratio of exactly 100). Information theory uses logarithms to measure information content and entropy: the information content of an event with probability p is -logā‚‚(p) bits. Computer scientists measure algorithm efficiency using Big-O notation, where logarithmic time complexity O(log n) indicates algorithms (like binary search) whose runtime grows logarithmically with input size—incredibly efficient for large datasets. Engineers use logarithmic scales for frequency response (Bode plots), signal processing (dynamic range in dB), and electronics (logarithmic amplifiers). Biology uses logarithmic scales for population models, dose-response curves, and Weber-Fechner laws of perception. Physics employs logarithms in entropy calculations, radioactive decay measurements, and describing inverse-square law relationships. These applications share the need to compress vast ranges of values and often reflect how humans perceive or measure phenomena logarithmically rather than linearly.

Solving Logarithmic and Exponential Equations

Logarithms provide the key to solving exponential equations where the variable appears in the exponent. The general approach involves taking the logarithm of both sides of the equation and applying logarithm properties to isolate the variable. To solve 5^x = 200, we take logarithms of both sides: log(5^x) = log(200), which becomes x Ɨ log(5) = log(200) using the power rule, giving x = log(200) / log(5) ā‰ˆ 3.292. For more complex equations like 3^(2x+1) = 50, we get (2x + 1) Ɨ log(3) = log(50), leading to 2x + 1 = log(50) / log(3) ā‰ˆ 3.561, so x ā‰ˆ 1.281. Logarithmic equations (where the variable appears inside a logarithm) require different techniques. To solve logā‚‚(x) + logā‚‚(x - 6) = 4, we use the product rule: logā‚‚(x(x - 6)) = 4, which means x(x - 6) = 2⁓ = 16, giving the quadratic equation x² - 6x - 16 = 0, with solutions x = 8 or x = -2. Since logarithms require positive arguments, only x = 8 is valid. These solution techniques are essential for modeling and analyzing real-world phenomena involving exponential growth, decay, and scaling.

Logarithmic Functions and Their Graphs

The logarithmic function f(x) = log_b(x) has distinctive properties and a characteristic graph shape. The function is defined only for positive x (domain: x > 0), has a vertical asymptote at x = 0 (the function decreases without bound as x approaches 0 from the right), passes through the point (1, 0) since log_b(1) = 0 for any base, and increases slowly without bound as x increases (range: all real numbers). The graph is concave down, meaning the function increases at a decreasing rate—the logarithm grows very slowly for large x values. For bases greater than 1, larger bases produce flatter curves (log₁₀(x) grows more slowly than logā‚‚(x)), while for bases between 0 and 1, the function is decreasing rather than increasing. The logarithmic function is the reflection of the exponential function b^x across the line y = x, visually demonstrating their inverse relationship. Key points include (1, 0), (b, 1), and (1/b, -1). Understanding the behavior of logarithmic functions helps in analyzing growth rates, comparing different logarithmic bases, and recognizing logarithmic patterns in data and natural phenomena.

The Relationship Between Logarithms and Calculus

Logarithms play a central role in calculus, both in differentiation and integration. The derivative of ln(x) is 1/x, one of the most important derivatives in calculus, enabling the integration of 1/x, which equals ln|x| + C (the absolute value handles negative x values). This relationship makes logarithms essential for solving differential equations, finding antiderivatives, and analyzing growth rates. The derivative of log_b(x) is 1/(x Ɨ ln(b)), showing that natural logarithms (base e) have the simplest derivative. The natural logarithm also appears in the integrals of many functions through logarithmic integration techniques and integration by parts. Logarithmic differentiation provides a powerful method for differentiating complex products, quotients, and powers by taking the natural logarithm of both sides before differentiating. L'HĆ“pital's rule, used to evaluate limits of indeterminate forms, often employs logarithms. The exponential function e^x, the inverse of ln(x), is the unique function equal to its own derivative, making it fundamental to differential equations and mathematical modeling of continuous growth and decay processes.

Common Mistakes and Misconceptions with Logarithms

Several common errors arise when working with logarithms, often from misapplying properties or misunderstanding the function's definition. A frequent mistake is thinking that log(a + b) equals log(a) + log(b)—this is false; logarithms of sums cannot be simplified using logarithm properties. Instead, log(ab) = log(a) + log(b) (product rule) and log(a/b) = log(a) - log(b) (quotient rule). Another error is forgetting that logarithms are only defined for positive arguments: log(-5) is undefined in real numbers, and log(0) is undefined (it would be negative infinity). Students sometimes confuse the base: ln(e) = 1 and log(10) = 1, but ln(10) ā‰ˆ 2.303 and log(e) ā‰ˆ 0.434. When solving logarithmic equations, it's crucial to check that solutions produce positive arguments; algebraic solutions may be mathematically correct but invalid if they yield negative or zero arguments in the original logarithmic expressions. Understanding these pitfalls helps avoid calculation errors and deepens conceptual understanding of how logarithms truly behave.

Why Use Our Logarithm Calculator?

Our comprehensive online logarithm calculator provides a powerful, intuitive tool for computing logarithms with any base, understanding logarithmic relationships, and solving logarithmic problems accurately. Unlike basic calculators limited to common and natural logarithms, our calculator handles custom bases, computes antilogs (inverse logarithms), applies the change of base formula to show conversions between different bases, evaluates logarithm properties and rules, solves logarithmic equations, and visualizes logarithmic curves with interactive graphs. Whether you're a student learning logarithmic concepts, a scientist performing calculations involving pH, decibels, or the Richter scale, an engineer analyzing logarithmic data, a finance professional calculating compound interest timeframes, or anyone working with exponential and logarithmic functions, our calculator combines computational accuracy with educational value. The step-by-step explanations help you understand not just the answer but the underlying mathematical process, the visual graph provides intuitive understanding of logarithmic behavior, the reference tables offer quick access to common values, and the properties calculator demonstrates logarithm rules in action. The calculator handles natural logarithms (ln), common logarithms (log base 10), and custom bases with equal ease, presenting results clearly with detailed explanations, making it an invaluable resource for mathematical computation, scientific analysis, and logarithmic learning.