Enter a positive number and choose a base to calculate its logarithm.
Logarithms Definition & Laws
A logarithm tells you what power the base must be raised to: log10(1,000) = 3 because 103 = 1,000. The natural log (ln) uses base e, about 2.71828, and log2 uses base 2. Enter any positive number above and pick a base, or type your own, to get the logarithm, the antilog and all three common bases at once.
A logarithm answers: "To what power must I raise the base to get this number?" log₁₀(1000) = 3 because 10³ = 1000. Logarithms convert multiplication to addition, making them essential in science, engineering, music, and computing.
The three most common: log (base 10, science/engineering), ln (natural log, base e ≈ 2.718, calculus and growth), log₂ (base 2, computing and information theory).
Logarithm Laws
Natural Log (ln)
Change of Base Formula
Antilog (Inverse Log)
Logarithm Values Reference Table
Rounded to 4 decimal places. Every number between 0 and 1 has a negative log, and log(1) is 0 in every base.
| x | log10(x) | ln(x) | log2(x) |
|---|---|---|---|
| 0.01 | −2 | −4.6052 | −6.6439 |
| 0.1 | −1 | −2.3026 | −3.3219 |
| 0.5 | −0.3010 | −0.6931 | −1 |
| 1 | 0 | 0 | 0 |
| 2 | 0.3010 | 0.6931 | 1 |
| 3 | 0.4771 | 1.0986 | 1.5850 |
| 5 | 0.6990 | 1.6094 | 2.3219 |
| e (2.71828) | 0.4343 | 1 | 1.4427 |
| 10 | 1 | 2.3026 | 3.3219 |
| 50 | 1.6990 | 3.9120 | 5.6439 |
| 100 | 2 | 4.6052 | 6.6439 |
| 1,000 | 3 | 6.9078 | 9.9658 |
| 1,024 | 3.0103 | 6.9315 | 10 |
| 1,000,000 | 6 | 13.8155 | 19.9316 |
Worked Examples
log10(500)
500 sits between 100 and 1,000, so the answer must be between 2 and 3. The calculator gives 2.6990, and 102.6990 is about 500.
A custom base: log3(81)
Use the change of base formula: ln(81) ÷ ln(3) = 4.3944 ÷ 1.0986 = 4. Check: 34 = 81.
Solving for an exponent: 2x = 50
Take the log of both sides: x = ln(50) ÷ ln(2) = 3.9120 ÷ 0.6931 = 5.6439. So 2 raised to about 5.64 gives 50.
Doubling time
Money growing at 7% a year doubles when 1.07t = 2, so t = ln(2) ÷ ln(1.07) = 10.24 years. At 6% it takes 11.90 years. The compound interest calculator shows the full growth path.
A base below 1: log0.5(8)
The answer is −3, because 0.5−3 = 8. With a base between 0 and 1 the signs flip: numbers above 1 get negative logs.
Undefined Inputs and Common Mistakes
- log(0) is undefined. No power of a positive base equals 0. As x shrinks toward 0 the log heads toward minus infinity, but never reaches a value.
- Negative numbers have no real log. A positive base raised to any power is positive, so log(−5) does not exist in real numbers.
- The base must be positive and not 1. 1 raised to any power is still 1, so base 1 can never reach other numbers. The calculator tells you when an input falls into one of these cases.
Mistakes to avoid
- Logs do not split over addition. log(2 + 3) = log(5) = 0.6990, but log(2) + log(3) = 0.7782, which is log(6). The product rule is log(ab) = log(a) + log(b).
- (log x)2 is not log(x2). For x = 1,000: (log 1,000)2 = 9, while log(1,0002) = 2 × 3 = 6.
- Check which log your tool means. In Excel and Google Sheets, LOG(x) is base 10 and LN(x) is natural. In JavaScript and in Python’s math.log, log means the natural log, and the base 10 version is log10.
Method and sources. The calculator uses the built in base 10, natural and base 2 logarithms, and the change of base formula logb(x) = ln(x) ÷ ln(b) for any other base, shown to 10 significant digits. Every value in the table and examples above was computed and checked by raising the base to the result.
Logarithm Questions
What is a logarithm?
A logarithm is the inverse operation of exponentiation. logb(x) = y means b^y = x. Example: log₁₀(100) = 2 because 10² = 100. Logarithms answer: "What power do I need to raise this base to get this number?" They convert multiplication into addition: log(a×b) = log(a) + log(b), which made them essential before calculators for astronomical and navigational calculations.
What is the difference between log and ln?
"log" usually means log base 10 (common logarithm). "ln" means log base e (natural logarithm), where e ≈ 2.71828. log₁₀(10) = 1. ln(e) = 1. Both satisfy log(1) = 0. In pure mathematics and calculus, "log" often means ln. In engineering and practical science, "log" means log₁₀. Always check context. They are related by: log₁₀(x) = ln(x) / ln(10) = ln(x) / 2.302585.
What is Euler's number e and why does it matter?
e = 2.71828182845... is an irrational constant that arises naturally in mathematics. It is the base of the natural logarithm. Key property: d/dx(e^x) = e^x, e^x is its own derivative, making it the natural base for exponential growth and decay. It appears in: compound interest (continuously compounded), population growth, radioactive decay, the bell curve (normal distribution), and Euler's identity e^(iπ) + 1 = 0, called the most beautiful equation in mathematics.
What are the laws of logarithms?
Product rule: log(a×b) = log(a) + log(b). Quotient rule: log(a/b) = log(a) − log(b). Power rule: log(a^n) = n × log(a). Change of base: logb(x) = log(x)/log(b). Special values: logb(1) = 0, logb(b) = 1. These rules allow complex logarithm calculations to be broken into simpler parts. Example: log(1000×100) = log(1000) + log(100) = 3 + 2 = 5.
What is the change-of-base formula?
Change of base: logb(x) = log_a(x) / log_a(b). Most commonly: logb(x) = ln(x)/ln(b) = log(x)/log(b). Example: log₅(25) = log(25)/log(5) = 1.39794/0.69897 = 2. Verify: 5² = 25. This is how calculators with only log and ln buttons can compute logarithms of any base. It works because both sides of the formula equal the same exponent.
What is an antilog?
The antilog (antilogarithm) is the inverse of a logarithm. If log₁₀(x) = y, then antilog₁₀(y) = 10^y = x. Example: log₁₀(x) = 2.5. x = 10^2.5 ≈ 316.23. For natural log: if ln(x) = y, then antiln(y) = e^y = x. Antilogs are used to convert log-scale results back to linear scale, for example when reading pH scales, decibel levels, or Richter scale values.
Why do we use logarithms in real life?
pH scale (acidity): pH = −log₁₀[H+]. Each pH unit = 10x change in acidity. Decibels (sound): dB = 10 × log₁₀(power ratio). Richter scale (earthquakes): each unit = 10x more ground motion. Musical frequency: doubling frequency = 1 octave (log₂ scale). Algorithm complexity: O(log n) for binary search. Computer storage: 2^10 = 1,024 ≈ 1K. Wherever values span many orders of magnitude, a log scale makes them manageable.
What is log base 2 used for?
Log base 2 (log₂ or lg) is fundamental in computer science and information theory. It answers: "How many times must I divide by 2 to reach 1?" log₂(1024) = 10, meaning 1024 = 2^10 = 1 kilobyte. Uses: binary search complexity O(log₂ n), information entropy (bits of information = log₂ of possible outcomes), musical intervals, and comparing exponents in algorithm analysis. Claude Shannon founded information theory using log₂.
Can you take the log of a negative number or zero?
Not in real numbers. log(0) is undefined (approaches −∞ as x approaches 0 from the right). log(negative number) is undefined in real numbers because no real power of a positive base gives a negative result. In complex number mathematics, logarithms of negative numbers are defined but yield complex results: ln(−1) = iπ (Euler's formula). This calculator works with positive real numbers only.
What is log of 1 in any base?
logb(1) = 0 for any valid base b. This is because b^0 = 1 for any non-zero b. So log₁₀(1) = 0, ln(1) = 0, log₂(1) = 0, log₅(1) = 0. Also: logb(b) = 1 for any base b (since b^1 = b). These two facts, log(1) = 0 and log(base) = 1, are the anchor points for understanding any logarithm.
How do you solve for an exponent using logarithms?
Take the log of both sides and divide. For bx = y, the answer is x = ln(y) ÷ ln(b), and any base of log works as long as you use the same one on top and bottom. Example: 3x = 200 gives x = ln(200) ÷ ln(3) = 5.2983 ÷ 1.0986 = 4.8227. Check: 34.8227 is about 200.
Why is the logarithm of a number between 0 and 1 negative?
Because you need a negative power to shrink a base above 1. log10(0.1) = −1 because 10−1 = 1/10 = 0.1, and log10(0.01) = −2. The closer the number gets to 0, the more negative its log becomes. Numbers above 1 have positive logs, and log(1) = 0.