Logarithm Calculator
Calculate log base 10, natural log, log base 2 or any base, and antilogs, with exact answers when they exist (log₂ 8 = 3) and change-of-base steps.
x can be a whole number, a decimal, a fraction (1/8), scientific notation (2.5e-7) or e. The base must be positive and different from 1. Antilog gives the number whose logarithm is y: bʸ.
–
- log₁₀ x
- –
- ln x
- –
- log₂ x
- –
Step by step
How to use the logarithm calculator
- Pick a function: log₁₀ (common), ln (natural), log base b or Antilog (bʸ).
- Type Number x: a whole number, a decimal, a fraction such as 1/8, scientific notation such as 2.5e-7, or the letter e.
- For log base b and Antilog (bʸ), enter Base b: any positive number other than 1, or e. For the antilog, the first field becomes Exponent y.
- The result appears as you type (Calculate does the same), and Copy copies it.
For logarithms, the tool also shows log₁₀ x, ln x and log₂ x side by side, and the Step by step panel explains how the result was found.
What a logarithm is
The logarithm answers the question “to what power must I raise the base to get this number?”. log_b(x) = y means exactly bʸ = x. So log₁₀(1000) = 3 because 10³ = 1000, and log₂(8) = 3 because 2³ = 8.
- The common logarithm (log or log₁₀) uses base 10. It counts orders of magnitude and is behind the pH scale, decibels and the Richter scale.
- The natural logarithm (ln) uses the number e ≈ 2.718281828. It appears in growth, decay, compound interest and calculus, because the derivative of ln x is 1/x.
- The binary logarithm (log₂) counts doublings; it is used in computing and information theory.
- The antilog reverses a logarithm: the antilog of y in base b is bʸ. The antilog of 2.5 in base 10 is 10^2.5 ≈ 316.23.
Exact answers when they exist
Many logarithms are rational numbers, and this tool finds them instead of printing a rounded decimal. It writes both numbers as powers of a common base: 8 = 2³ and 4 = 2², so log₄(8) = 3/2. It also handles fractions (log₄(1/2) = −1/2) and negative results (log₁₀(0.001) = −3). When no exact form exists, such as log₃(10), the answer is irrational and is given to about 14 significant digits.
The change-of-base formula
Most calculators only have log and ln keys. Any other base goes through the change-of-base formula:
log_b(x) = ln(x) / ln(b) = log(x) / log(b)
For example, log₃(10) = ln 10 / ln 3 = 2.302585 / 1.098612 ≈ 2.0959. The steps show this division with both natural and common logarithms, then check the answer by raising the base to the result.
For base 10 there is another useful step: write x in scientific notation, m × 10ᵏ, then log₁₀(x) = k + log₁₀(m). For 12,345 = 1.2345 × 10⁴ this gives 4 + 0.0915 = 4.0915. That is also how the tool handles numbers far beyond ordinary calculator range, such as 10⁵⁰⁰.
Rules worth remembering
- log_b(xy) = log_b(x) + log_b(y)
- log_b(x / y) = log_b(x) − log_b(y)
- log_b(xⁿ) = n · log_b(x)
- log_b(1) = 0 and log_b(b) = 1
Frequently asked questions
Why can't I take the log of 0 or a negative number?
No power of a positive base is zero or negative, so log(0) and log(−5) do not exist among real numbers. The tool shows a message instead of a result.
What is the difference between log and ln?
log usually means base 10 and ln means base e. In some advanced math and programming languages, log means the natural logarithm, so check the convention.
How do I calculate log base 2?
Choose log base b and enter 2 as Base b. The log₂ x value is also shown for every logarithm you calculate.
What is the antilog of a number?
It is the base raised to that number. The antilog of 3 in base 10 is 10³ = 1000; the natural antilog of 1 is e ≈ 2.71828.
Why is base 1 not allowed?
Every power of 1 equals 1, so 1ʸ can never reach any other number and the logarithm in base 1 is undefined.
Related tools
- Exponent and Root Calculator Calculate powers with negative or fractional exponents, square, cube and nth roots, and simplify radicals exactly (√72 = 6√2), with the steps shown.
- Scientific Calculator Free online scientific calculator with trigonometry in degrees or radians, logarithms, powers, roots, factorials, keyboard input and a calculation history.
- Scientific Notation Converter Convert numbers to scientific notation, engineering notation, E notation and standard form while keeping the significant figures, with every step shown.