ToolNimba Browse

🧮 Log Calculator

By ToolNimba Math Team · Updated 2026-06-19

log base 10 of x
-
Natural log (ln x)
-
Binary log (log2 x)
-

A logarithm answers the question "what power do I raise the base to, in order to get this number?". This calculator finds the log of any positive number to a base you choose (the default is 10), and at the same time shows the natural log (ln, base e) and the binary log (base 2). Enter your number and base, and the three results update straight away.

What is the Logarithm Calculator?

A logarithm is the inverse of raising a base to a power. If b raised to the power y equals x, then the log of x to base b equals y. For example, 10 raised to the power 3 is 1000, so the log of 1000 to base 10 is 3. The logarithm tells you the exponent, which is why logs are so useful for working with quantities that grow or shrink by multiplication, such as sound levels, earthquake energy and pH.

Three bases come up far more often than any other. Base 10 is the common log, written log, and it underpins decibels, the Richter scale and pH. Base e (where e is about 2.71828) is the natural log, written ln, and it appears throughout calculus, continuous growth and decay, and finance. Base 2 is the binary log, written log2, and it counts how many times you can halve a number, which is central to computer science and information theory. This tool reports all three so you do not have to switch calculators.

To find a log in any other base, computers use the change-of-base rule: the log of x to base b equals the natural log of x divided by the natural log of b. Because every base reduces to a ratio of two natural logs, a single function can handle base 7, base 0.5 or any other base you type. A logarithm is only defined when the number is greater than zero, and the base must be positive and not equal to 1, since a base of 1 raised to any power is always 1 and could never produce a different number.

When to use it

  • Solving exponential equations in algebra homework, where you need the exponent rather than the result.
  • Converting between linear values and decibels, the Richter scale or pH, all of which are logarithmic.
  • Working out how many times a value can be halved or doubled, using base 2 in computer science.
  • Checking a natural log (ln) value when studying growth, decay or compound interest.

How to use the Logarithm Calculator

  1. Enter the positive number (x) you want the logarithm of.
  2. Enter the base (b), or leave it at 10 for the common log.
  3. Use a quick button (Base 2, 8, 10, 16 or e) if you prefer a preset base.
  4. Read off the log to your chosen base, plus the natural log and base-2 log.

Formula & method

logb(x) = ln(x) ÷ ln(b) (change of base). Special cases: log(x) is base 10, ln(x) is base e, log2(x) is base 2. Defined only for x > 0, with b > 0 and b ≠ 1.

Worked examples

Find the log of 1000 to base 10.

  1. Ask: 10 raised to what power gives 1000?
  2. 10 raised to the power 3 = 1000
  3. So log base 10 of 1000 = 3

Result: log base 10 of 1000 = 3

Find the log of 125 to base 5 using change of base.

  1. log base 5 of 125 = ln(125) ÷ ln(5)
  2. ln(125) = 4.828314, ln(5) = 1.609438
  3. 4.828314 ÷ 1.609438 = 3
  4. Check: 5 raised to the power 3 = 125, correct

Result: log base 5 of 125 = 3

Find the binary log (base 2) of 1000.

  1. log base 2 of 1000 = ln(1000) ÷ ln(2)
  2. ln(1000) = 6.907755, ln(2) = 0.693147
  3. 6.907755 ÷ 0.693147 = 9.965784
  4. This means 1000 sits between 2^9 (512) and 2^10 (1024)

Result: log base 2 of 1000 ≈ 9.965784

Common logarithm values across the three main bases

xlog base 10ln (base e)log base 2
1000
20.301030.6931471
1012.3025853.321928
10024.605176.643856
100036.9077559.965784

The three named logarithms and where they are used

NameNotationBaseTypical use
Common loglog10Decibels, Richter scale, pH
Natural loglne (about 2.71828)Calculus, growth and decay, finance
Binary loglog22Computer science, information theory

Common mistakes to avoid

  • Taking the log of zero or a negative number. A logarithm is only defined for numbers greater than zero. There is no power you can raise a positive base to that gives zero or a negative result, so the calculator reports these inputs as undefined.
  • Using a base of 1. A base of 1 raised to any power is always 1, so it can never produce any other number. The base must be greater than 0 and not equal to 1 for the logarithm to make sense.
  • Confusing log and ln. On most calculators log means base 10 and ln means base e. They give different numbers for the same input, so check which one a formula expects before plugging in a value.
  • Forgetting that log of a product is a sum. The log of a times b equals log a plus log b, not log a times log b. Mixing up these rules is a frequent slip when simplifying expressions by hand.

Glossary

Logarithm
The exponent to which a base must be raised to produce a given number. The inverse of exponentiation.
Base
The number being raised to a power. Common bases are 10, e and 2.
Natural log (ln)
The logarithm to base e (about 2.71828), used widely in calculus and continuous growth.
Common log
The logarithm to base 10, often written simply as log.
Change of base
The rule that the log of x to base b equals ln(x) divided by ln(b), letting one function handle any base.

Frequently asked questions

What is a logarithm?

A logarithm is the exponent that a base must be raised to in order to give a number. For example, since 10 raised to the power 3 is 1000, the log of 1000 to base 10 is 3. It is the inverse operation of raising a base to a power.

What is the difference between log and ln?

On most calculators, log means the logarithm to base 10 (the common log) and ln means the logarithm to base e, where e is about 2.71828 (the natural log). They are both logarithms but use different bases, so they give different values for the same number.

How does this calculator handle a base other than 10?

It uses the change-of-base rule: the log of x to base b equals the natural log of x divided by the natural log of b. This lets a single calculation handle any base you enter, such as base 7 or base 0.5.

Why can I not take the log of a negative number or zero?

A logarithm asks what power gives the number. A positive base raised to any real power is always positive, so no exponent can produce zero or a negative result. That is why the log of zero or a negative number is undefined.

What is a natural log used for?

The natural log (ln) appears throughout calculus, and in any process of continuous growth or decay such as compound interest, population models and radioactive decay. It is the logarithm to base e.

What does log base 2 tell me?

The base-2 log (log2) counts roughly how many times you can double from 1 to reach the number, or how many bits are needed to represent it. It is central to computer science and information theory.