How the logarithm calculator works
Find the logarithm of any positive number in any base, with shortcuts for ln, log₁₀ and log₂. You can also solve bʸ = x for x or for the base b.
Formula
log_b(x) = y means bʸ = x. Change of base: log_b(x) = ln x ÷ ln b. Root: b = x^(1/y).
- 1
Ask the question
log base 3 of 81 asks: 3 to what power gives 81?
- 2
Use the change of base
ln 81 ÷ ln 3 = 4.394449 ÷ 1.098612 = 4.
- 3
Check the answer
3⁴ = 3 × 3 × 3 × 3 = 81, so log base 3 of 81 is 4.
- 4
Compare other bases
The same 81 has ln 81 = 4.394449, log₁₀ 81 = 1.908485 and log₂ 81 = 6.33985.
Worked example
The calculator opens with these values
- Calculate
- log base b of x (solve bʸ = x for y)
- Base b
- 3
- Number x
- 81
log base 3 of 81
4
Logarithms of common numbers
The logarithm of 1 is 0 in every base, numbers below 1 have negative logarithms, and each tenfold step adds exactly 1 to the common log. Use log₁₀ 2 ≈ 0.3010 and log₁₀ 3 ≈ 0.4771 to estimate many others by hand.
| x | ln x | log₁₀ x | log₂ x |
|---|---|---|---|
| 0.1 | -2.3026 | -1 | -3.3219 |
| 0.5 | -0.6931 | -0.301 | -1 |
| 1 | 0 | 0 | 0 |
| 2 | 0.6931 | 0.301 | 1 |
| 3 | 1.0986 | 0.4771 | 1.585 |
| 5 | 1.6094 | 0.699 | 2.3219 |
| 10 | 2.3026 | 1 | 3.3219 |
| 100 | 4.6052 | 2 | 6.6439 |
| 1,000 | 6.9078 | 3 | 9.9658 |
| 1,024 | 6.9315 | 3.0103 | 10 |
Rules for working with logarithms
These rules hold in any base. They turn multiplication into addition, which is why logarithms were invented.
- Product: log(xy) = log x + log y. log₁₀ 200 = log₁₀ 2 + log₁₀ 100 = 0.301 + 2 = 2.301.
- Quotient: log(x ÷ y) = log x − log y.
- Power: log(xⁿ) = n × log x. log₂ 8³ = 3 × log₂ 8 = 3 × 3 = 9.
- Reciprocal: log(1 ÷ x) = −log x, so log₁₀ 0.1 = −1.
- Base and one: log_b(b) = 1 and log_b(1) = 0 for every valid base.
Where logarithms are used
Logarithmic scales squeeze huge ranges into small numbers, so one step means a fixed multiple.
- pH: −log₁₀ of the hydrogen ion concentration. Each step down the scale is ten times more acidic.
- Decibels: 10 × log₁₀ of a power ratio. +10 dB is ten times the sound power, and +3 dB is about double.
- Earthquake magnitude: each whole step is ten times the measured ground motion and about 32 times the energy.
- Bits: telling n options apart takes log₂ n bits, so 256 values need 8 bits.
- Doubling time: money or a population growing 7% a year doubles in ln 2 ÷ ln 1.07 = 10.24 years.
Common questions
Why can't I take the logarithm of zero or a negative number?
A positive base raised to any real power is always positive, so no exponent gives zero or a negative number. The logarithm of x ≤ 0 is undefined among the real numbers.
Why can't the base be 1?
Every power of 1 is 1, so 1ʸ can never equal any other x, and log base 1 of 1 could be any number.
What is the difference between log and ln?
ln is the natural logarithm, base e ≈ 2.71828, used in growth and decay. log on its own usually means base 10 in school and engineering, though in computer science it often means base 2.
How do logarithms help solve equations?
They bring an unknown exponent down. To solve 2ʸ = 50, take logs: y = ln 50 ÷ ln 2 ≈ 5.643856.
Related calculators
Exponent Calculator
Calculate powers and exponential expressions
Scientific Calculator
Trig, logs, roots, powers, factorials and Ans with an on-screen keypad
Square Root Calculator
Calculate square roots and nth roots
Compound Interest
Calculate compound interest growth over time