Log Calculator — Free Online Logarithm Calculator
Calculate logarithms in any base instantly including common log (base 10), natural log (ln), binary log (base 2), or any custom base with verification.
Formula
log_10(1,000.0000) = yResult
Calculation
log_10(1,000.0000) = 3.0000000000log base 10 of 1,000.0000 equals 3.0000000000. This means 10^3.0000000000 = 1,000.0000.
Common Log (base 10)
3.0000000000
Natural Log (ln)
6.9077552790
Binary Log (base 2)
9.9657842847
Antilog (base^result)
1,000.0000
How to Use the Log Calculator
- Select the logarithm base: Choose from four options in the dropdown: Common Log (base 10) for general-purpose calculations, Natural Log (base e) for calculus and continuous growth, Binary Log (base 2) for computer science, or Custom Base for any other base you need. Selecting Custom Base reveals an additional input field.
- Enter the value (x): Type the positive number whose logarithm you want to compute. This must be greater than zero — logarithms of zero and negative numbers are undefined in real number mathematics. You can enter any positive decimal number.
- Review the results: The result panel instantly displays the computed logarithm value to 10 decimal places, the formula showing your calculation, a verification statement (base raised to the result should equal your input), and comparison values showing the same number's logarithm in all three standard bases for reference.
The calculator also displays the antilog — the base raised to the power of the result — which should match your original input value. This verification feature helps confirm the answer and builds understanding of the inverse relationship between logarithms and exponentiation.
Logarithm Formulas and Properties
Logarithm Definition
If b^y = x, then log_b(x) = y Product Rule
log_b(x * y) = log_b(x) + log_b(y) Quotient Rule
log_b(x / y) = log_b(x) - log_b(y) Power Rule
log_b(x^n) = n * log_b(x) Change of Base Formula
log_b(x) = log_a(x) / log_a(b) Variables Explained
- b (Base): The base of the logarithm. Must be positive and not equal to 1. Common choices are 10 (common log), e = 2.71828 (natural log), and 2 (binary log). The base determines the scale of the logarithm.
- x (Value/Argument): The positive number you are taking the logarithm of. Also called the argument of the logarithm. Must be strictly greater than zero for real-valued results.
- y (Result): The computed logarithm, representing the power to which the base must be raised to produce x. Can be positive, negative, or zero (log_b(1) = 0 for any valid base).
Step-by-Step Example
Calculate log_10(5000):
- Express 5000 as a product: 5000 = 5 x 1000 = 5 x 10^3
- Apply the product rule: log_10(5000) = log_10(5) + log_10(10^3)
- Simplify: log_10(5) = 0.6990, and log_10(10^3) = 3
- Add: 0.6990 + 3 = 3.6990
Verification: 10^3.6990 = 5000 (approximately). This confirms our answer. The result tells us that 10 must be raised to approximately the 3.699th power to equal 5000.
Practical Examples
Example 1: Rachel Measures Sound Intensity in Decibels
Rachel, an acoustics engineer, needs to calculate the decibel level of a sound with intensity 0.001 W/m^2, using the reference intensity of 10^(-12) W/m^2. The decibel formula uses base-10 logarithms: dB = 10 x log_10(I/I_0):
- Intensity ratio: 0.001 / 10^(-12) = 10^9
- log_10(10^9) = 9
- dB = 10 x 9 = 90 decibels
The sound measures 90 dB, equivalent to a lawn mower or motorcycle at 25 feet. This logarithmic scale means that a 10 dB increase represents a 10-fold increase in sound intensity, which is perceived by humans as roughly a doubling of loudness.
Example 2: Tom Calculates Investment Doubling Time
Tom wants to know exactly how many years it takes for an investment to double at 6% annual compound interest. The doubling time formula uses natural logarithms: t = ln(2) / ln(1 + r):
- r = 0.06 (6% as decimal)
- ln(2) = 0.6931
- ln(1.06) = 0.0583
- t = 0.6931 / 0.0583 = 11.90 years
Tom's investment doubles in approximately 11.9 years at 6% annual return. Compare this to the Rule of 72 estimate: 72/6 = 12 years — very close to the exact answer. For detailed investment projections, try our compound interest calculator.
Example 3: Lisa Analyzes Algorithm Complexity
Lisa is a software developer analyzing a binary search algorithm on a database of 1 million records. Binary search has O(log_2 n) time complexity, so she wants to know the maximum number of comparisons needed:
- n = 1,000,000 records
- log_2(1,000,000) = 19.93
- Maximum comparisons: 20 (rounded up)
Binary search can find any record among 1 million entries in at most 20 comparisons. This is the power of logarithmic complexity — doubling the dataset only adds one more comparison. A linear search would require up to 1 million comparisons by contrast.
Example 4: Daniel Measures pH
Daniel, a chemistry student, has a solution with a hydrogen ion concentration of 3.2 x 10^(-5) mol/L and needs to calculate its pH. The pH formula is: pH = -log_10([H+]):
- [H+] = 3.2 x 10^(-5)
- log_10(3.2 x 10^(-5)) = log_10(3.2) + log_10(10^(-5)) = 0.505 + (-5) = -4.495
- pH = -(-4.495) = 4.495
The solution has a pH of approximately 4.5, making it mildly acidic (similar to tomato juice). The logarithmic pH scale means a one-unit decrease in pH represents a 10-fold increase in hydrogen ion concentration.
Common Logarithm Values Reference Table
| Value | log_10 | ln (base e) | log_2 | Application |
|---|---|---|---|---|
| 1 | 0 | 0 | 0 | Identity value |
| 2 | 0.3010 | 0.6931 | 1 | Doubling, binary |
| e (2.718) | 0.4343 | 1 | 1.4427 | Natural growth |
| 10 | 1 | 2.3026 | 3.3219 | Decimal system |
| 100 | 2 | 4.6052 | 6.6439 | Percentage base |
| 1,000 | 3 | 6.9078 | 9.9658 | Thousands |
| 1,000,000 | 6 | 13.8155 | 19.9316 | Binary search depth |
| 0.001 | -3 | -6.9078 | -9.9658 | Thousandths |
Tips and Complete Guide
Logarithmic Scales in Science
Many scientific measurements use logarithmic scales because the quantities they measure span enormous ranges. The Richter scale measures earthquake magnitude logarithmically — a magnitude 7 earthquake releases about 31.6 times more energy than a magnitude 6. The decibel scale measures sound intensity logarithmically because human hearing spans a trillion-fold range from the quietest to loudest sounds. The pH scale compresses hydrogen ion concentrations from 10^(-14) to 10^0 into a manageable 0-14 range. Without logarithms, these scales would be impractical to use.
Logarithms in Information Theory
Claude Shannon's information theory defines the bit as the fundamental unit of information using base-2 logarithms. The information content of an event with probability p is -log_2(p) bits. A fair coin flip (p = 0.5) carries -log_2(0.5) = 1 bit of information. A roll of a fair die (p = 1/6) carries -log_2(1/6) = 2.585 bits. Entropy, the average information content, is the basis for data compression algorithms. Understanding log_2 is essential for anyone working in data science, telecommunications, or cryptography.
The History of Logarithms
John Napier invented logarithms in 1614, calling them "artificial numbers" that converted multiplication into addition. Before electronic calculators, logarithm tables and slide rules were the primary computational tools for scientists, engineers, and navigators. Henry Briggs later developed common (base 10) logarithms, and the Euler number e (approximately 2.71828) gave rise to natural logarithms. The slide rule, which is essentially a physical logarithm table, was used by NASA engineers to design the Apollo spacecraft. Logarithms revolutionized calculation and remained the dominant computational method for over 350 years.
Connecting Logarithms to Exponential Growth
Logarithms are essential for solving exponential equations where the unknown is in the exponent. If you know that 1.05^t = 2 (when does a 5% annual growth lead to doubling?), take the logarithm of both sides: t x ln(1.05) = ln(2), so t = ln(2)/ln(1.05) = 0.6931/0.04879 = 14.21 years. This technique applies to compound interest, population growth, radioactive decay, and any exponential model. Logarithms turn the question "how long until this doubles?" into simple division.
Common Mistakes to Avoid
- Confusing log(a + b) with log(a) + log(b): The logarithm of a sum is NOT the sum of logarithms. log(a + b) has no simple expansion. The product rule states log(a x b) = log(a) + log(b), which applies to multiplication, not addition.
- Taking the log of zero or negative numbers: log(0) is undefined (approaches negative infinity), and log of negative numbers is not real. Always check that your argument is positive before computing logarithms.
- Mixing up bases: log_10 and ln give different results for the same input. log_10(100) = 2, but ln(100) = 4.605. Always specify which base you are using. If no base is written, convention varies: in pure math, log often means ln; in engineering and applied sciences, log usually means log_10.
- Forgetting that log_b(1) = 0 for any base: This follows from b^0 = 1. It is the logarithmic equivalent of the zero exponent rule and a useful quick check for your calculations.
- Incorrectly applying the power rule: log(x^n) = n x log(x) is correct, but log(n^x) = x x log(n), not n x log(x). The variable in the exponent and the base of the power behave differently. Pay attention to which quantity is the base and which is the exponent.
Frequently Asked Questions
A logarithm answers the question: to what power must the base be raised to produce a given number? In mathematical notation, if b^y = x, then log_b(x) = y. For example, log_10(1000) = 3 because 10^3 = 1000. Logarithms are the inverse of exponentiation. They transform multiplication into addition, which made them invaluable for computation before electronic calculators existed. Today, logarithms are essential in science, engineering, finance, and computer science for describing exponential relationships.
The three most common logarithm bases are 10 (common log, written log or log_10), e (natural log, written ln or log_e, where e is approximately 2.71828), and 2 (binary log, written log_2). Common logs are used in the Richter scale, decibels, and pH. Natural logs appear in calculus, continuous growth models, and physics. Binary logs are used in computer science for algorithm complexity and information theory. Our calculator supports all three plus any custom base you specify.
The logarithm of zero is undefined because no power of a positive base can ever equal zero (b^y approaches zero as y approaches negative infinity, but never reaches it). The logarithm of negative numbers is also undefined in real numbers because no real power of a positive base produces a negative result. In complex number theory, logarithms of negative numbers exist but involve imaginary components. Our calculator works with real numbers and returns undefined for zero or negative inputs.
The key logarithm properties are: Product rule (log(ab) = log(a) + log(b)), Quotient rule (log(a/b) = log(a) - log(b)), Power rule (log(a^n) = n x log(a)), Change of base (log_b(x) = log_a(x) / log_a(b)), and Identity (log_b(b) = 1). These properties allow you to simplify complex expressions and solve exponential equations. The product rule is why logarithmic scales convert multiplication into addition, which was the original motivation for their invention by John Napier in 1614.
Logarithms appear throughout science and everyday life. The pH scale measures acidity as -log_10 of hydrogen ion concentration. Sound intensity in decibels uses 10 x log_10(I/I_0). The Richter scale for earthquakes is logarithmic. In finance, the Rule of 72 for doubling time is derived from natural logarithms. Computer scientists use log_2 to describe algorithm efficiency (binary search is O(log n)). Population growth, radioactive decay, and compound interest all involve logarithmic relationships.
To solve equations involving logarithms, use the properties of logs to combine or separate terms, then convert to exponential form. For example, to solve log_2(x) = 5: convert to exponential form to get x = 2^5 = 32. For log(x) + log(x-3) = 1: combine using the product rule to get log(x(x-3)) = 1, then convert to 10^1 = x^2 - 3x, giving x^2 - 3x - 10 = 0, which factors to (x-5)(x+2) = 0. Since logarithms require positive arguments, x = 5 is the only valid solution.
The change of base formula allows you to compute a logarithm in any base using a different base: log_b(x) = log_a(x) / log_a(b). This is essential because most calculators only have buttons for log (base 10) and ln (base e). To find log_5(125) using base 10: log_10(125) / log_10(5) = 2.0969 / 0.6990 = 3. This works because 5^3 = 125. Our calculator handles any base directly, but understanding this formula helps when working by hand.
The natural logarithm (ln) uses the mathematical constant e (approximately 2.71828) as its base. It is special because the derivative of ln(x) is simply 1/x, making it fundamental to calculus. The natural logarithm appears naturally in continuous growth and decay processes: if a quantity grows continuously at rate r, the time to double is ln(2)/r. The constant e itself is defined as the limit of (1 + 1/n)^n as n approaches infinity. In physics, natural logarithms describe entropy, thermodynamics, and quantum mechanics.
Related Calculators
Exponent Calculator
Calculate any base raised to any power — the inverse of logarithms.
Root Calculator
Calculate square roots, cube roots, and nth roots of any number.
Scientific Calculator
Advanced calculations with built-in log and ln functions.
Golden Ratio Calculator
Explore the golden ratio and its logarithmic spiral connections.
Compound Interest Calculator
Investment growth calculations that rely on logarithmic doubling time.
Half-Life Calculator
Radioactive decay calculations using logarithmic decay models.
Disclaimer: This calculator is for informational and educational purposes only. Results are estimates and may not reflect exact values.
Last updated: February 23, 2026
Sources
- Khan Academy — Introduction to Logarithms: khanacademy.org
- Wolfram MathWorld — Logarithm: mathworld.wolfram.com
- NIST Digital Library of Mathematical Functions — Elementary Functions: dlmf.nist.gov