Calculate log base 10, natural log (ln), log base 2, or any custom base. Includes antilog, change of base formula, and a comparison of all three bases for your input value.
Logarithms are one of the most powerful and versatile tools in mathematics, science, and engineering. From measuring earthquake magnitudes and sound levels to calculating compound interest and pH, logarithms appear everywhere. This free log calculator handles log base 10, natural log (ln), log base 2, and any custom base β with step-by-step explanations and visual comparisons.
A logarithm answers the question: "To what power must we raise the base to get this number?" Written formally:
log_b(x) = y means b^y = x
For example: logββ(1000) = 3 because 10Β³ = 1000. The logarithm "undoes" exponentiation β it is the inverse of the exponential function.
Calculators and computers typically provide only logββ and ln. To calculate any other base, use the change of base formula:
log_b(x) = log(x) / log(b) = ln(x) / ln(b)
Example: logβ (125) = log(125)/log(5) = 2.097/0.699 = 3 (since 5Β³ = 125).
The antilogarithm is the inverse operation of a logarithm. If log_b(x) = y, then the antilog is:
Antilog_b(y) = b^y = x
Example: If logββ(x) = 2.5, then x = 10^2.5 β 316.23. Antilogs are used to "undo" logarithms and recover the original value.
| Rule | Formula | Example |
|---|---|---|
| Product rule | log(ab) = log(a) + log(b) | log(6) = log(2) + log(3) |
| Quotient rule | log(a/b) = log(a) β log(b) | log(5) = log(10) β log(2) |
| Power rule | log(a^n) = n Γ log(a) | log(1000) = 3 Γ log(10) = 3 |
| Change of base | log_b(x) = ln(x)/ln(b) | logβ (25) = ln(25)/ln(5) = 2 |
| Log of 1 | log_b(1) = 0 | log(1) = 0, ln(1) = 0 |
| Log of base | log_b(b) = 1 | log(10) = 1, ln(e) = 1 |
pH = βlogββ[HβΊ], where [HβΊ] is the molar concentration of hydrogen ions. A pH of 7 is neutral (pure water). pH < 7 is acidic; pH > 7 is alkaline. Because the scale is logarithmic, a pH of 3 is 10Γ more acidic than pH 4, and 100Γ more acidic than pH 5. This scale is used worldwide in chemistry, environmental monitoring, and medicine.
Earthquake magnitude is measured on the Richter scale using: M = logββ(A/Aβ), where A is wave amplitude. A magnitude 7.0 earthquake releases ~31.6Γ more energy than a 6.0, and ~1,000Γ more than a 5.0. The 2011 TΕhoku earthquake (magnitude 9.1) was roughly 1,000 times more powerful than the 2011 Christchurch earthquake (6.3).
Sound intensity in decibels: dB = 10 Γ logββ(I/Iβ). A sound at 80 dB has 10Γ the intensity of 70 dB and 100Γ that of 60 dB. In the UK and US, workplace noise regulations (HSE / OSHA) are set in decibels: action levels at 80 dB and 85 dB in the UK; the US PEL is 90 dB for 8 hours.
Logarithms solve "how long until my investment doubles?" Using the Rule of 72 (approximation) or exact calculation: t = ln(2) / (r) = 0.6931 / r. At a 7% annual rate, t = 0.6931/0.07 β 9.9 years. This calculation underpins everything from personal savings to national debt projections.
Claude Shannon defined information content in bits as: I = logβ(1/p) = βlogβ(p). This formula gives the number of binary digits needed to encode a message. logβ is the foundation of data compression, cryptography, and the entire digital information revolution. Computer science students in the UK (A-level Computer Science) and US (AP Computer Science A) study binary logarithms as a core concept.
Euler's number e β 2.71828182845904523536 is the unique base for which the derivative of e^x is itself. This property makes the natural logarithm ln(x) the most analytically convenient base for calculus. The natural log appears in:
In the UK, logarithms are covered in A-level Mathematics (Year 1/AS) under the topic of Exponentials and Logarithms. Students learn log and ln, the laws of logarithms, solving exponential equations, and modelling with logarithms. UK A-level also explicitly covers changing the base and the natural logarithm's role in integration.
In the US, logarithms appear in Precalculus and Algebra 2 courses (typically grades 10β11). AP Calculus extensively uses ln(x) as the standard anti-derivative of 1/x. The SAT and ACT both include logarithm questions, typically logββ problems in scientific or financial contexts.
| x | logββ(x) | ln(x) | logβ(x) |
|---|---|---|---|
| 1 | 0 | 0 | 0 |
| 2 | 0.3010 | 0.6931 | 1 |
| 10 | 1 | 2.3026 | 3.3219 |
| 100 | 2 | 4.6052 | 6.6439 |
| 1000 | 3 | 6.9078 | 9.9658 |
| e β 2.718 | 0.4343 | 1 | 1.4427 |
log (or logββ) uses base 10 β it asks how many times you multiply 10 to get x. ln uses base e β 2.71828 β it asks how many times you multiply e to get x. In pure mathematics, "log" often means natural log; in engineering and everyday use, "log" usually means base 10.
log_b(x) = log(x)/log(b) = ln(x)/ln(b). This lets you compute any base using any other base. For example, logβ(81) = log(81)/log(3) = 1.908/0.477 = 4 (since 3β΄ = 81).
The antilog is the inverse of the logarithm. If log_b(y) = x, then antilog = b^x. For base 10: antilog(2) = 10Β² = 100. For natural log: antilog_e(1) = e^1 β 2.71828.
log_b(x) is only defined for x > 0 because no power of a positive base can equal zero or a negative number. log(0) approaches negative infinity. log(β5) does not exist in the real numbers (though complex logarithms do exist).
pH = βlogββ[HβΊ]. Pure water has [HβΊ] = 10β»β· mol/L, giving pH = 7. Lemon juice at pH 2 has [HβΊ] = 10β»Β² = 100,000Γ the hydrogen ion concentration of pure water. The logarithmic scale allows pH to compress an enormous range of concentrations into a 0β14 scale.
logβ(n) gives the number of bits needed to represent n distinct values (or the depth of a binary search tree over n items). Sorting n items optimally takes O(n logβ n) comparisons. Shannon's entropy H = βΞ£ p logβ(p) quantifies information in bits per symbol.
Apply logarithms to both sides. Example: 5^x = 200 β x = log(200)/log(5) = 2.301/0.699 = 3.292. Or using ln: x = ln(200)/ln(5) = 5.298/1.609 = 3.292. Both methods give the same answer.
e β 2.71828 is the unique number for which the exponential function e^x is its own derivative. This makes it the natural base for continuous growth and decay processes. It appears in compound interest, radioactive decay, normal distribution, and Euler's famous identity: e^(iΟ) + 1 = 0.
Results are for educational purposes only. Always verify critical calculations with a qualified professional or scientific software for professional applications.