Logarithm Calculator
A logarithm answers “what power gives this number?”. log₂ 8 = 3 because 2³ = 8. This calculator gives the logarithm in any base, plus ln x, log₁₀ x and log₂ x: for x = 8, they are 3, 2.0794, 0.9031 and 3.
Last updated · By S. Dilshan · Runs in your browser, nothing is uploaded
Step-by-Step Solution
What Is a Logarithm?
A logarithm is the inverse of an exponent. If bʸ = x, then log_b x = y. The logarithm of x to the base b tells you which power you must raise b to in order to get x. So log₂ 8 = 3, because 2 × 2 × 2 = 8, and log₁₀ 1,000 = 3, because 10³ = 1,000.
Logarithms turn multiplication into addition and powers into multiplication, which made them the calculator of the pre-computer age. Today they remain essential for anything that spans huge ranges of scale: earthquake magnitude, sound intensity, acidity, star brightness and compound growth.
The Three Common Bases
| Name | Notation | Base | Typical use |
|---|---|---|---|
| Common logarithm | log x or log₁₀ x | 10 | Science, pH, decibels |
| Natural logarithm | ln x | e ≈ 2.71828 | Calculus, growth and decay |
| Binary logarithm | log₂ x | 2 | Computing, information, doubling |
Logarithm Rules
bis the base. It must be positive and not equal to 1.xis the number, which must be positive. The logarithm of zero or a negative number is not a real number.- The change-of-base formula lets you compute any logarithm with a natural-log or common-log button.
- Special values: log_b 1 = 0 and log_b b = 1 for every base.
To solve equations with the unknown in an exponent, see the exponential equation calculator.
How Is It Calculated? Worked Examples
log₂ 8
- Ask: 2 to what power equals 8?
- 2³ = 8, so log₂ 8 = 3.
- Change of base check: ln 8 ÷ ln 2 = 2.0794 ÷ 0.6931 = 3 ✓.
- The same number in other bases: ln 8 = 2.0794, log₁₀ 8 = 0.9031.
More Logarithms
| Expression | Value | Because |
|---|---|---|
| log₁₀ 1,000 | 3 | 10³ = 1,000 |
| log₂ 0.125 | −3 | 2⁻³ = 1/8 |
| log₅ 125 | 3 | 5³ = 125 |
| log₂ 50 | 5.6439 | between 2⁵ = 32 and 2⁶ = 64 |
| ln e | 1 | e¹ = e |
Solving 2ˣ = 50
Take the logarithm of both sides: x = log₂ 50 = ln 50 ÷ ln 2 = 3.9120 ÷ 0.6931 = 5.6439.
How Long to Double Your Money?
At 5% annual interest, money doubles when 1.05ᵗ = 2, so t = log₁.₀₅ 2 = ln 2 ÷ ln 1.05 = 14.2 years.
How to Use This Logarithm Calculator
- Enter the number x. It must be positive.
- Enter the base b. It must be positive and not equal to 1.
- Read log_b x, together with ln x, log₁₀ x and log₂ x.
- Open the steps to see the change-of-base calculation.
Where Logarithms Are Used
- Chemistry: pH = −log₁₀[H⁺]. A concentration of 10⁻⁷ mol/L gives pH 7.
- Earth science: each whole step on the Richter scale is a tenfold increase in measured amplitude.
- Acoustics: decibels use log₁₀ of intensity ratios.
- Finance: time to reach a target under compound growth.
- Computer science: binary search takes about log₂ n steps, and n bits can represent 2ⁿ values.
- Data analysis: log scales compress data spanning many orders of magnitude.
Logarithmic Scales in Practice
On the Richter scale, a magnitude 7 quake produces ground motion 10² = 100 times larger than a magnitude 5. In acoustics, the level in decibels is 10 log₁₀(I ÷ I₀), so doubling the sound intensity adds only 10 log₁₀ 2 = 3.01 dB. In computing, the number of bits needed to label 1,000 distinct values is ⌈log₂ 1,000⌉ = ⌈9.97⌉ = 10.
Expanding and Condensing
Rules let you rewrite expressions: log₂(8x) = log₂ 8 + log₂ x = 3 + log₂ x, and log₁₀(100x²) = 2 + 2 log₁₀ x.
What Are the Most Common Mistakes With the Logarithm Calculator?
- Taking the log of zero or a negative number. It is undefined in the real numbers.
- Using base 1. Every power of 1 is 1, so a base of 1 makes no sense.
- Writing log(a + b) = log a + log b. The rule is for products: log(ab) = log a + log b.
- Mixing up log and ln. “log” can mean base 10 or base e depending on the field, so check.
- Forgetting the change of base. To compute log₅ 125 with a calculator, divide ln 125 by ln 5.
- Dropping the exponent rule. log(x³) = 3 log x, not (log x)³.
Where Can You Verify These Formulas?
The definitions and formulas on this page follow standard references. Check them against these sources:
- OpenStax: algebra and calculus textbooks
- NIST Digital Library of Mathematical Functions
- Wolfram MathWorld
Built and maintained by S. Dilshan. Found a mistake? Email [email protected] with the page address.
Frequently Asked Questions
What is a logarithm?
It is the exponent to which a base must be raised to produce a number. log₂ 8 = 3 because 2³ = 8.
What is the difference between log and ln?
log usually means base 10 and ln means base e (natural logarithm). In some computing and maths contexts log means base 2 or base e, so always check.
How do I calculate a logarithm with a different base?
Use change of base: log_b x = ln x ÷ ln b. For log₂ 50: 3.9120 ÷ 0.6931 = 5.6439.
Why can’t you take the log of a negative number?
No real power of a positive base gives a negative result, so the logarithm of a negative number is not a real number.
What are the main logarithm rules?
Product: log(xy) = log x + log y. Quotient: log(x/y) = log x − log y. Power: log(xᵖ) = p log x.
What is the logarithm of 1?
It is 0 in every base, because any base to the power 0 equals 1.