Skip to content
Calcapedia
Math

Logarithm Calculator

Find the logarithm of a number in base 10, base e, base 2 or any custom base, with the change-of-base step shown.

Level: Grades 11–12

  • Common Core standard HSF.BF.B.5(+) Understand the inverse relationship between exponents and logarithms and use this relationship to solve problems involving logarithms and exponents.
  • Common Core standard HSF.LE.A.4For exponential models, express as a logarithm the solution to ab^(ct) = d where a, c, and d are numbers and the base b is 2, 10, or e; evaluate the logarithm using technology.
Printable worksheet

Logarithm Calculator

Know the answer you need? Pick an input to work backward.

Inputs

Logarithms are defined only for positive numbers.

Base

Result

log₁₀(1,000)

3

log₁₀(1,000) = 3, because 10^3 = 1,000.

Exponential form
10^3 = 1,000
Natural log, ln(x)
6.907755
Common log, log₁₀(x)
3

See the step-by-step solution ↓

Step-by-step solution

  1. The logarithm base 10 of 1,000 is the exponent y that makes the base raised to y equal 1,000

    10y=1,000
  2. Change of base: divide the natural log of x by the natural log of the base

    log₁₀(1,000)=ln(1,000)ln(10)=6.9077552792.302585093=3
  3. Check: raising the base to the result gives back x (up to rounding)

    103≈1,000

Test yourself

20 quick questions built from this calculator's formula: work out results, predict what happens when an input changes, and work backward from an answer. Every answer comes with the working.

What this calculator does

Find the logarithm of any positive number, in base 10, base e, base 2 or a base you choose. A logarithm answers the question "what power do I need?" The log base 10 of 1,000 is 3, because 10³ = 1,000. The log base 2 of 1,024 is 10, because ten doublings take 1 to 1,024. This calculator works out logs in the three bases used most: 10, e and 2. (e is a special math constant, about 2.718.) It also handles any other positive base you choose.

Every result comes with the change-of-base step. That's the rule for turning a log in one base into a division of logs in another base. It's how calculators with only ln and log buttons handle every other base. It's well worth seeing with real numbers.

Where it's used

Why this math matters outside the classroom:

  • Earthquake scales. Each step on the Richter magnitude scale is a factor of 10 in wave amplitude, so magnitude 6 has 10 times the amplitude of magnitude 5.
  • Sound levels. A sound 1,000 times as intense as another is 10 × log₁₀(1000) = 30 decibels louder.
  • Doubling time. Money growing 7% a year doubles in log(2) ÷ log(1.07), about 10.2 years.
  • Chemistry pH. Chemists find the pH of a solution with 0.001 mol/L of hydrogen ions as −log₁₀(0.001) = 3.
  • Binary search. A binary search needs about log₂(1,000,000) ≈ 20 comparisons to find one name in a sorted list of a million.

Grade level and standards: Grades 11–12; Common Core State Standards for Mathematics HSF.BF.B.5, HSF.LE.A.4. © Copyright 2010. National Governors Association Center for Best Practices and Council of Chief State School Officers. All rights reserved.

How to use it

  1. Enter the number x you want the logarithm of. It must be greater than zero.
  2. Choose the base: 10 for the common log, e for the natural log (ln) or 2 for the binary log. Or choose Custom to type any positive base other than 1.
  3. Read the logarithm and its exponential form (base^result = x). The natural and common logs of x are shown too, for reference. The steps show the change-of-base division and a check.

What the inputs mean

Number (x)
Only positive numbers have real logarithms. A positive base raised to any power is positive, so no power can give zero or a negative number.
Custom base (b)
Any positive number other than 1. A base between 0 and 1, such as 0.5, is allowed. It flips the sign of the log you'd get with its reciprocal base, 1 ÷ b. For example, 1 ÷ 0.5 = 2 and log₂(8) = 3, so log₀.₅(8) = −3.

Formula and method

log_b(x) = y  ⇔  b^y = x
log_b(x) = ln(x) ÷ ln(b)
ln(x) = log₁₀(x) ÷ log₁₀(e)

In the formulas, b is the base, x is your number and y is the answer. ln means the natural log (base e), and log₁₀ is the common log (base 10). A logarithm undoes an exponent: log_b(x) is the power y that turns the base b into x.

Calculators usually have only ln and log₁₀ built in. So other bases use the change-of-base formula. It divides the log of x by the log of the base, and you can do both in any one base you like. This calculator divides natural logs. For the natural log itself, it shows the same rule using common logs.

The base must be positive and not 1. A negative base doesn't give a smooth, unbroken range of real powers. And 1 raised to any power is 1, so log₁ has no answer for any other x. x must be positive for the same reason.

Worked example

Find log₂(1000), the number of doublings needed to grow from 1 to 1,000.

  1. Set up the definition: 2^y = 1,000.
  2. Change of base: y = ln(1,000) ÷ ln(2).
  3. Substitute: 6.907755279 ÷ 0.6931471806 = 9.9657842847.
  4. Check: 2^9.9657842847 ≈ 1,000.

Result: log₂(1000) ≈ 9.965784. So just under ten doublings take 1 past 1,000 (ten doublings give 1,024).

Understanding the result

A logarithm of 0 means x = 1, since any base to the power 0 is 1. With a base above 1, a negative logarithm means x is between 0 and 1. For example, log₁₀(0.001) = −3.

Each step of 1 in a base-10 log means x is 10 times bigger. That's why log scales, such as decibels or the pH scale, squeeze huge ranges into small numbers.

Assumptions and limitations

  • Results are real logarithms. Complex logarithms of negative numbers (an advanced topic) aren't calculated.
  • Sometimes the base raised to a whole number equals x exactly. Then the result is shown as that exact whole number, not a value thrown off by tiny computer rounding errors.
  • Results carry about 15–16 significant digits. That's the precision of a standard computer number (a double).
  • Inputs are limited to the range a double can hold, from about 5 × 10⁻³²⁴ to 1.8 × 10³⁰⁸.

Frequently asked questions

What is the difference between log and ln?

ln is the natural logarithm, with base e ≈ 2.718282. On calculators and in science, log without a base usually means base 10. But in some higher-math books and programming languages, it means the natural log. Check the context, or pick the base directly in this calculator.

How do I calculate a log in a base my calculator doesn't have?

Use change of base: divide the log of x by the log of the base, using any log button you have. log₅(1000) = ln 1000 ÷ ln 5 = log 1000 ÷ log 5 ≈ 4.292030. Both versions give the same answer, because the ratio doesn't depend on which base you divide in.

Why is the log of zero or a negative number undefined?

A logarithm asks what power of a positive base gives x. Positive numbers raised to any power stay positive. They get closer and closer to zero but never reach it. So no power gives 0 or −5.

Why can't the base be 1?

1 raised to any power is 1. For x = 1, every power works, and for any other x, none does. So log base 1 has no single answer.

How this calculator is checked

Method: Definition of the logarithm as the inverse of exponentiation; change-of-base identity. The calculation is covered by automated tests with known reference values and edge cases. Last updated 2026-10-18. Found a problem? Tell us.

Embed this calculator

Put this Logarithm Calculator on your own website or blog for free. Paste this code where you want it to appear: