Skip to main content

Log Calculator

Use this log calculator to find the logarithm of a number to any base, including natural log (ln), common log (base 10), and binary log (base 2), with steps.

Log Calculator

Common bases:
Try:

Enter values above to see results

About This Log Calculator

This log calculator finds the logarithm of a number to any base using the change-of-base formula. Enter the number and a base, or pick a common base, and the tool returns the result along with the natural log, common log, and binary log for reference.

It is useful for algebra, calculus, chemistry (pH), computer science, and any problem that involves exponential growth or decay.

What Is a Logarithm?

A logarithm answers the question: to what power must the base be raised to get the number? In symbols, if bʸ = x then log base b of x = y.

For example, log base 2 of 8 is 3, because 2³ = 8. A logarithm is the inverse of raising a base to a power.

Log Formula and Change of Base

Any logarithm can be computed from natural logarithms with the change-of-base formula:

log_b(x) = ln(x) ÷ ln(b)

This is how the calculator handles any base you enter. It divides the natural log of the number by the natural log of the base.

Common Bases

NotationBaseCommon Use
ln(x)e ≈ 2.718Natural log — calculus, growth and decay
log₁₀(x)10Common log — pH, decibels, scientific scales
log₂(x)2Binary log — computer science, information theory

How to Use the Calculator

  1. Enter the number (x).
  2. Enter the base, or tap a common base: 10, e, or 2.
  3. Click calculate.
  4. Review the result, plus the natural, common, and binary logs.

Log Examples

ExpressionResultWhy
log₁₀ 1000310³ = 1000
log₂ 832³ = 8
ln e1e¹ = e
log₃ 24353⁵ = 243

What Is the Difference Between log and ln?

ln is the natural logarithm, which uses the base e (about 2.718). log usually means the common logarithm with base 10, although in some fields it can mean a different base. This calculator lets you set the base explicitly so there is no ambiguity.

Why Must x Be Positive?

A logarithm is only defined for numbers greater than 0. No power of a positive base produces zero or a negative number, so the calculator requires a positive value for x. The base must also be greater than 0 and not equal to 1, because every power of 1 is 1.

When Should You Use This Tool?

  • Solving logarithmic and exponential equations
  • Working with pH, decibels, or the Richter scale
  • Calculus homework involving ln
  • Computer science problems using log base 2
  • Checking a manual calculation

Related Calculators

You may also find these tools useful:

Start Calculating

Enter a number and a base above and use the log calculator to find the logarithm, with the natural, common, and binary logs shown alongside.

Frequently Asked Questions

What does this log calculator do?

It finds the logarithm of a number to any base you choose. It also shows the natural log (base e), common log (base 10), and binary log (base 2) of the same number.

What is a logarithm?

A logarithm answers the question: to what power must the base be raised to get the number? For example, log base 2 of 8 is 3, because 2³ = 8.

What is the change-of-base formula?

The change-of-base formula is log base b of x equals ln(x) divided by ln(b). It lets you compute a logarithm in any base from natural logarithms.

What is the difference between log and ln?

ln is the natural logarithm, which uses the base e (about 2.718). log usually means the common logarithm with base 10, though in some contexts it can mean a different base.

Can you take the log of a negative number or zero?

No. A logarithm is only defined for numbers greater than 0, so the calculator requires a positive number.

Why can't the base be 1?

Every power of 1 is 1, so log base 1 cannot single out a number. The base must be greater than 0 and not equal to 1.