Logarithm Calculator

Calculate logarithms with base 10, e, 2, or a custom positive base other than one, with the working shown.

Enter your values

Change any field. The result is recalculated on this device.

Formula, example and assumptions
Log base 10 of 1,0003

Enter a number greater than zero. Decimals are allowed.

Your result

Local calculation
Log base 10 of 1,0003

The logarithm is the exponent needed to raise the selected base to your entered value. Changing the base changes the question and its answer.

Positive value
1,000
Base
Base 10
See how this is calculated

Working with your values

Use the change-of-base formula

Formula
log base b of x = ln(x) ÷ ln(b)
With your values
ln(1,000) ÷ ln(10)
Exponent (rounded when needed)
3

The answer is the exponent: raising your base to this power gives your entered value. ln means natural logarithm. Displayed decimal results are rounded.

Check the inputs and method

These are your current inputs, not the worked example further down the page.

Positive value
1,000
Base
Base 10

Method

log_b(x) = ln(x)/ln(b); equivalently, bʸ = x when y = log_b(x). Require x > 0, b > 0 and b ≠ 1.

Read the worked example and assumptions

How this calculation works

A logarithm finds the exponent needed to produce a positive value from a chosen base. Choose base 10, natural base e, base 2 or a custom base. A custom base can be a decimal, including a value between zero and one, but it cannot equal one. The output is an exponent, not a percentage or a measurement in the input’s original unit.

log_b(x) = ln(x)/ln(b); equivalently, bʸ = x when y = log_b(x). Require x > 0, b > 0 and b ≠ 1.

Worked example

This example uses illustrative inputs. Your current result is shown above.

Choose value 1,000 and base 10. Since 10 × 10 × 10 = 1,000, log₁₀(1,000) = 3. For value 2 and custom base 1.03, log₁.₀₃(2) = ln(2)/ln(1.03) ≈ 23.449772: 1.03 raised to that power is approximately 2.

Assumptions and limits

  • The input value must be positive; decimals are allowed. Zero and negative inputs have no real logarithm for the supported bases.
  • The base must be positive and different from one. Select 10, e or 2, or enter a custom base.
  • For b > 1, values between zero and one have negative logarithms. For 0 < b < 1, the sign reverses: those values have positive logarithms.
  • Results use floating-point arithmetic. A base very close to one makes the result especially sensitive to small changes in the entered base.

Questions people ask

Why is log(1) zero?

Any valid base raised to the power zero equals one, so the exponent required to obtain one is zero.

Are log and ln interchangeable?

Only if the intended base is the same. ln always denotes base e; log often means base 10 but conventions vary, so select the base explicitly.

Why can I not use a base of one?

One raised to any real exponent is always one, so it cannot identify a unique exponent for your value. Choose any other positive base, such as 1.03 or 0.5.

Related calculators