Math

Log calculator

A logarithm answers the question "what power must I raise the base to, to get this number?" For example, log₁₀(1000) = 3 because 10³ = 1000. This log calculator works in base 10, base e (the natural log, ln), base 2 or any base you choose, and shows the result in all three common bases.

Runs in your browser. Nothing you type is sent to us.

Result

3

log₍10₎(1,000)

log₁₀(x)
3
ln(x)
6.907755279
log₂(x)
9.9657842847
Check
10^3 = 1,000

Key facts

  • log_b(x) = y means bʸ = x. So log₂(8) = 3 because 2³ = 8.
  • log means base 10, ln means base e ≈ 2.71828, and lg or lb often means base 2.
  • Change of base: log_b(x) = ln(x) ÷ ln(b).
  • Logs are only defined for positive numbers, and the base must be positive and not 1.

What is a logarithm?

A logarithm is the inverse of an exponent. If bʸ = x, then y = log_b(x), read "log base b of x". Logarithms turn multiplication into addition and powers into multiplication, which is why they were used for centuries to do hard arithmetic by hand. Today they describe quantities that span huge ranges: the pH scale, the Richter and moment magnitude scales, decibels and the growth of money and populations.

How to use the log calculator

  1. Enter the number x. It must be greater than zero.
  2. Choose a base: 10, e, 2 or a custom base.
  3. Read the result, the log in the other common bases and a check that the base raised to the answer gives back x.

Logarithm formulas and rules

log_b(x) = y ⟺ bʸ = xChange of base: log_b(x) = ln(x) ÷ ln(b) = log₁₀(x) ÷ log₁₀(b)
RuleFormulaExample
Productlog_b(xy) = log_b(x) + log_b(y)log(20) = log(2) + log(10) ≈ 1.301
Quotientlog_b(x ÷ y) = log_b(x) − log_b(y)log(5) = log(10) − log(2) ≈ 0.699
Powerlog_b(xⁿ) = n × log_b(x)log(1000) = 3 × log(10) = 3
Log of 1log_b(1) = 0ln(1) = 0
Log of the baselog_b(b) = 1log₂(2) = 1

Worked examples: logarithms

Example 1: common log

log₁₀(1000) = 3, because 10 × 10 × 10 = 1000. log₁₀(0.01) = −2, because 10⁻² = 0.01.

Example 2: how long to double your money

At 7% interest compounded yearly, money doubles when 1.07ᵗ = 2. Take logs: t = ln(2) ÷ ln(1.07) = 0.6931 ÷ 0.0677 ≈ 10.24 years. The "rule of 72" (72 ÷ 7 ≈ 10.3) is a shortcut for the same idea.

Example 3: a custom base

log₃(81) = ln(81) ÷ ln(3) = 4.3944 ÷ 1.0986 = 4, because 3⁴ = 81.

Example 4: pH

A solution with a hydrogen-ion concentration of 0.001 mol/L has pH = −log₁₀(0.001) = 3. The pH calculator does this for any concentration.

Common logarithm values

xlog₁₀(x)ln(x)log₂(x)
1000
20.301030.693151
e ≈ 2.718280.4342911.44270
1012.302593.32193
10024.605176.64386
1,0243.010306.9314710
1,000,000613.8155119.93157

Antilogs

The antilog undoes a log: if log₁₀(x) = 2.5, then x = 10^2.5 ≈ 316.23. For natural logs, x = eʸ. Use the exponent calculator to find antilogs.

Mistakes to avoid with logarithms

  • Taking the log of zero or a negative number. There is no real answer.
  • Mixing up log and ln. On most calculators, log is base 10 and ln is base e.
  • Splitting a sum. log(x + y) is not log(x) + log(y). The product rule applies to log(xy).
  • Forgetting the change of base. To find log₅(x) on a basic calculator, divide log(x) by log(5).

How logarithms changed calculation

John Napier, a Scottish laird, published *Mirifici Logarithmorum Canonis Descriptio* in 1614, introducing logarithms to turn multiplication into addition. Henry Briggs, a professor in London and later Oxford, worked with Napier to develop base-10 "common" logarithms and published tables in 1617 and 1624. Astronomers such as Johannes Kepler adopted them at once; Pierre-Simon Laplace later said logarithms doubled the life of the astronomer by shortening the labour. The slide rule, invented by William Oughtred in the 1620s, put logarithms on a sliding scale and was the engineer’s calculator until electronic calculators replaced it in the 1970s.

Logarithmic scales are still everywhere. The decibel measures sound level and signal power, the moment magnitude scale used by the US Geological Survey for earthquakes is logarithmic (each whole step means about 32 times more energy), and pH is the negative log of hydrogen-ion concentration. In computing, base-2 logarithms measure information in bits and the speed of algorithms such as binary search. The change-of-base rule, log_b x = ln x ÷ ln b, links all bases. For base e specifically, use the natural log calculator; to undo a logarithm, the antilog calculator; and for pH, the pH calculator.

How this calculator works

  • log_b(x) = ln(x) ÷ ln(b), for base 10, base 2, base e or a custom base.
  • x must be positive, and the base must be positive and not equal to 1.
  • Exact powers (such as log₂ 1024 = 10) are recognized and shown exactly.
  • A check shows b raised to the result returns x.

Frequently asked questions

What is a logarithm in simple terms?

It is the exponent you need. log₁₀(100) = 2 because you need to raise 10 to the power 2 to get 100.

What is the difference between log and ln?

log usually means the common logarithm, base 10. ln is the natural logarithm, base e ≈ 2.71828. They differ by a constant factor: ln(x) ≈ 2.3026 × log(x).

How do I calculate log base 2?

Divide the natural log of the number by ln(2), or the common log by log(2). log₂(64) = ln(64) ÷ ln(2) = 6.

What is log 0?

Undefined. No power of a positive base equals zero, although the log approaches minus infinity as x gets close to zero.

What is the natural log of e?

ln(e) = 1, because e¹ = e.

What is log 2?

log₁₀(2) ≈ 0.30103 and ln(2) ≈ 0.69315.

Can a logarithm be negative?

Yes. The log of any number between 0 and 1 is negative when the base is greater than 1. log₁₀(0.5) ≈ −0.301.

What is the change of base formula?

log_b(x) = log_k(x) ÷ log_k(b) for any convenient base k, usually 10 or e.

How do I find the antilog?

Raise the base to the log value. The antilog of 3 in base 10 is 10³ = 1000.

Sources

  1. OpenStax, College Algebra 2e
  2. Wolfram MathWorld, Logarithm

Updated November 25, 2026. Formulas checked against published sources and worked examples.

Cite this page: CalcRoster. "Log calculator." calcroster.com/log-calculator/. Updated November 25, 2026.

Results are estimates for general information. They are not financial, medical or legal advice. Check important decisions with a qualified professional.