ΣCALCULATORWizard171+ Calculators

Log Calculator

Calculate logarithms for any base, log base 10, natural log (ln), log base 2, and more. Instant results with step-by-step solutions.

Common bases
Base 10 Base e (ln) Base 2 Base 3 Base 5
log10(1000) =
3
Check: 10³ = 1,000 ✓
3
Result
10³
Exponential
2.303
ln(1000)
9.966
log₂(1000)

Step-by-step solution

log₁₀(1000) = ln(1000) / ln(10)
= 6.9078 / 2.3026
= 3.0000
Natural log ln(x)
ln(x)
log₁₀(x)
log₂(x)
Ratio ln/log₁₀
Common examples
10³ 10⁶ 2⁸ 10⁻²
Antilog result b^y
Result
Scientific
log₁₀(result)
ln(result)
💡

Why Logarithms Matter Beyond the Classroom

Logarithms convert multiplicative relationships into additive ones, and that single property drives their usefulness across science, finance, and engineering. The compound interest formula A = Pe^(rt) uses the natural log to solve for time: t = ln(A/P) / r. To double your money at 7% continuous growth, t = ln(2) / 0.07 = 9.9 years. This is why the Rule of 72 works, it approximates ln(2) ≈ 0.693. The Richter scale, decibel scale, pH scale, and f-stop scale in photography are all logarithmic. Each unit represents a multiplicative change, not an additive one. A magnitude 7.0 earthquake releases about 31.6 times more energy than a 6.0, not 1.6 times more. Understanding this distinction prevents costly misinterpretations in science and engineering. In computer science, log base 2 determines algorithm efficiency. Binary search finds any item in a sorted list of one billion in just 30 comparisons (log₂(1,000,000,000) ≈ 30). Sorting algorithms run in O(n log n) time. Every time you interact with a search engine or streaming service, logarithmic mathematics is doing the heavy lifting.

CalculatorWizard Team Updated: 2026-04-15
Affiliate Recommendation
Expert Pick
Top Pick

Texas Instruments TI-84 Plus CE

The #1 graphing calculator for math and science
Handles logarithms, exponentials, and virtually every math function you will encounter in high school and college. Permitted on SAT, ACT, AP, and IB exams, one calculator that covers everything.
log, ln, and any-base log built-in
Permitted on SAT/ACT/AP exams
Color display with rechargeable battery
Pre-loaded with math apps
Shop on Amazon

Understanding Logarithms: The Complete Guide

A logarithm answers a fundamental question: to what power must we raise a base number to get a given value? Written as logb(x) = y, it means by = x. So log10(1000) = 3 because 10³ = 1,000. Logarithms were invented in 1614 by John Napier specifically to simplify complex multiplication and division, before calculators existed, mathematicians used log tables to turn multiplication into addition.

Today, logarithms appear in virtually every quantitative field. The Richter scale for earthquakes is logarithmic, a magnitude 7.0 earthquake releases about 31.6 times more energy than a magnitude 6.0 quake, not 1.6 times more. The decibel scale for sound, pH scale for acidity, and the f-stop scale in photography are all logarithmic. In finance, logarithmic returns are used instead of simple returns because they're time-additive, making portfolio math far cleaner.

Computer scientists rely on log base 2 constantly. Binary search runs in O(log₂ n) time, meaning it takes only about 33 comparisons to find a specific value among 10 billion sorted items. The SHA-256 hash function underlying Bitcoin uses properties of logarithms. Data compression algorithms like Huffman coding and information theory are built on log base 2 measurements (bits).

The Three Most Important Logarithm Bases

BaseNotationNamePrimary UseExample
10log(x) or log₁₀(x)Common logEngineering, pH, decibelslog(100) = 2
e ≈ 2.71828ln(x)Natural logCalculus, finance, physicsln(e) = 1
2log₂(x) or lb(x)Binary logComputer science, informationlog₂(8) = 3

The Change of Base Formula

Any logarithm can be converted to any other base using the change of base formula: logb(x) = ln(x) / ln(b) = log(x) / log(b). This is how our calculator computes logarithms for any base, it uses JavaScript's built-in natural log function and divides. For example, log7(2401) = ln(2401) / ln(7) = 7.784 / 1.946 = 4.000, since 7⁴ = 2,401.

Key Logarithm Properties

PropertyFormulaExample
Product rulelog(a×b) = log(a) + log(b)log(100×10) = log(100) + log(10) = 3
Quotient rulelog(a/b) = log(a) − log(b)log(1000/10) = 3 − 1 = 2
Power rulelog(aⁿ) = n × log(a)log(10⁵) = 5 × log(10) = 5
Log of 1logb(1) = 0log(1) = 0, ln(1) = 0
Log of baselogb(b) = 1log(10) = 1, ln(e) = 1
Inverseb^(logb(x)) = x10^(log 5) = 5
💡 Pro Tip: The Power Rule Shortcut. When a number ends in zeros, its log base 10 is easy to estimate. log(1,000,000) = 6 because 10⁶ = 1,000,000. More precisely, for any number between 10ⁿ and 10ⁿ⁺¹, its log is between n and n+1. So log(500) is between 2 and 3, and specifically equals about 2.699. This lets you sanity-check answers quickly.

Tools for Math & Science Students

Amazon's Choice

Texas Instruments TI-84 Plus CE Graphing Calculator

$99.99
★★★★☆ (48,312)

Industry-standard graphing calculator with built-in log and ln functions for any base.

View on Amazon →
Best Seller

Casio fx-991EX Classwiz Scientific Calculator

$18.99
★★★★☆ (32,451)

Computes natural log, log base 10, and any-base logarithm. Best value scientific calculator.

View on Amazon →
Top Rated

Graph Paper Composition Notebook (4-pack)

$12.99
★★★★☆ (18,230)

Essential for plotting logarithmic curves and exponential growth visually.

View on Amazon →
Affiliate Recommendation
🚀 Next Step Recommendation
Best Seller

Precalculus Workbook with Practice Problems

Master logs, exponentials, and functions
Step-by-step coverage of logarithms, exponential functions, and their applications. Includes worked examples and answer keys, ideal for self-study or exam prep.
Full chapter on logarithm rules
Change-of-base practice problems
Real-world application examples
Answer key included
Shop on Amazon

Logarithms in Real-World Applications

Understanding where logarithms appear in real life helps contextualize what can feel like abstract math. The Richter scale is perhaps the most famous example: each whole number increase represents roughly 31.6 times more energy released. A magnitude 9.0 earthquake (2011 Tohoku, Japan) released about 1,000 times more energy than a magnitude 7.0 quake. Scientists use log scales because otherwise the chart showing a 6.0 and a 9.0 would require the 9.0 bar to be 31,623 times taller.

In finance and investing, natural logarithms are used to calculate continuously compounded interest. The formula A = Pe^(rt) where e is Euler's number gives the exact amount after continuous compounding. A $10,000 investment at 7% continuously compounded for 30 years grows to $10,000 × e^(0.07×30) = $10,000 × e^2.1 ≈ $81,451. Log returns are also preferred in portfolio analysis because log(1.10) + log(1.20) = log(1.32), meaning you can simply add daily log returns to get the period total.

In music, the frequency ratio between two notes a semitone apart is 2^(1/12) ≈ 1.0595. An octave doubles frequency (log₂ of frequency doubles). This is why a piano's layout is logarithmic, equal physical distance on the keys represents equal ratios of frequency change, not equal absolute frequency changes.

Common Logarithm Values to Memorize

ExpressionValueWhy It Matters
log(2)0.30103Used to find how many digits a power of 2 has
log(3)0.47712Key for base-3 conversions
log(π)0.49715Appears in normal distribution calculations
ln(2)0.69315Doubling time formula: t = ln(2)/r
ln(10)2.30259Converts log₁₀ to ln: multiply by 2.30259
log₂(10)3.32193Bits needed to represent a decimal digit

Doubling Time Formula: Logarithms in Finance

One of the most practical uses of logarithms in personal finance is calculating doubling time. If an investment grows at rate r per period, the number of periods to double is t = ln(2) / ln(1+r) ≈ 0.6931 / r (for small r). The Rule of 72 approximates this as 72/r%, so at 8% annual return, money doubles in approximately 9 years (more precisely: ln(2)/ln(1.08) = 9.006 years). At 12%, it doubles in about 6.1 years.

💡 Pro Tip: Negative Logarithms. When the input value is between 0 and 1, the logarithm is negative. log(0.1) = −1 because 10⁻¹ = 0.1. log(0.001) = −3 because 10⁻³ = 0.001. This is exactly how pH works, pure water has [H⁺] = 10⁻⁷ molar concentration, so pH = −log(10⁻⁷) = 7. Battery acid at 10⁻¹ molar has pH = 1. The negative sign is just a convention to make pH a positive number for common solutions.

Frequently Asked Questions

What is the difference between log and ln?
log (without a base specified) almost always means log base 10 in engineering and everyday use, while ln always means the natural logarithm with base e ≈ 2.71828. In higher mathematics and physics, log often means ln, context determines which. They're related by the simple conversion: ln(x) = log(x) × ln(10) ≈ log(x) × 2.30259. So ln(100) = log(100) × 2.30259 = 2 × 2.30259 = 4.60517.
Why can't you take the log of a negative number or zero?
Logarithms are only defined for positive real numbers. Since b^y is always positive for any real y (when b is positive), there's no real exponent y that produces a negative result or zero. However, in complex mathematics, logarithms of negative numbers are defined using imaginary numbers, ln(−1) = iπ, which is related to Euler's famous identity e^(iπ) + 1 = 0. For real-world calculations, if you get an error trying to take the log of a negative number, it means the input doesn't make physical sense.
How do logarithms relate to exponential growth?
Logarithms and exponential functions are exact inverses of each other. If f(x) = b^x (exponential), then its inverse is f⁻¹(x) = logb(x). This is why logarithms "undo" exponentials and vice versa. Exponential growth compounds multiplicatively (each period multiplies by the same factor), while logarithms convert that multiplication into addition. A quantity growing at 7% per year will be 10 times larger after log(10)/log(1.07) ≈ 34 years.
What is the log of 0?
The log of 0 is undefined (approaches negative infinity as x approaches 0 from the right). As x gets closer and closer to 0, log(x) keeps decreasing without bound, log(0.1) = −1, log(0.001) = −3, log(0.000001) = −6. There's no finite number equal to log(0), because no finite power of 10 (or any positive base) equals exactly zero.
How is log base 2 used in computer science?
Log base 2 is fundamental in computer science because computers work in binary. The number of bits needed to store n distinct values is ceiling(log₂(n)). To store all 256 possible byte values, you need log₂(256) = 8 bits. Binary search requires log₂(n) comparisons to find an item in n sorted elements, so searching a billion sorted items takes only about 30 comparisons. Hash tables, balanced binary trees, merge sort, and countless algorithms have log₂(n) complexity at their core.
Can the base of a logarithm be a fraction or decimal?
Yes, any positive number except 1 can be a base. Fractional bases produce interesting results, if the base is between 0 and 1, the logarithm of numbers greater than 1 is negative. For example, log0.5(8) = −3, because 0.5⁻³ = 2³ = 8. Bases less than 1 appear in radioactive decay calculations, where the "half-life" formula uses base 0.5. Our calculator supports any positive base except 1 (where the logarithm is undefined).

💡 Quick Answers

What is the difference between log and ln?
log (without a specified base) means log base 10 in most engineering and everyday contexts, while ln always means the natural logarithm with base e ≈ 2.71828. They are related by ln(x) = log(x) × ln(10) ≈ log(x) × 2.30259. In higher mathematics and physics, log often means ln, always check context. Our calculator clearly labels each type and supports any custom base.
How do I calculate a logarithm with any base?
Use the change-of-base formula: log_b(x) = ln(x) / ln(b) = log(x) / log(b). To find log base 7 of 343: ln(343) / ln(7) = 5.838 / 1.946 = 3.000, which is correct because 7³ = 343. Every scientific calculator uses this formula internally to compute any base from its built-in natural log function.
Why is the natural logarithm (ln) special?
The natural log uses base e ≈ 2.71828, a constant that arises naturally in continuous growth and decay. It is its own derivative: d/dx[ln(x)] = 1/x, a uniquely clean result that makes calculus involving exponential growth far simpler. Continuously compounded interest, radioactive decay, population growth, and Newton's law of cooling all use ln because these processes are inherently continuous.
What is an antilog and when do I use it?
An antilog (antilogarithm) is the inverse of a logarithm: if log_b(x) = y, then antilog_b(y) = b^y = x. You use antilogs when working backward from a log value to the original number. In chemistry, if pH = 3.5, the hydrogen ion concentration is 10^(-3.5) = 3.16 × 10⁻⁴ mol/L, that calculation requires the antilog (base 10). In finance, converting log returns back to price levels uses the antilog.