Calculate logarithms in any base, find antilogs, apply the change of base rule, or solve for the base — with the working shown.
A logarithm answers the question "what power do I raise the base to?" Since 10³ = 1000, log₁₀(1000) = 3. The three you meet most often are log₁₀ (common log), ln (natural log, base e ≈ 2.71828) and log₂ (binary log). Enter a number below, choose a base, and the calculator gives the exact result plus the same value in every common base.
The number must be greater than 0. The base must be greater than 0 and cannot be 1.
| Same number in every base | Value |
|---|
A logarithm is the inverse of raising to a power. Where exponentiation asks "what is 10³?", a logarithm asks "10 to what power gives 1000?" Both describe the same relationship from opposite ends.
What the letters mean. b is the base — the number being raised to a power. y is the value you have. x is the answer: the power required. Reading a logarithm aloud as "the power of b that gives y" makes most log problems easier to think about.
Four modes cover the questions people actually ask:
Type your values, or tap an example, then press Calculate or the Enter key. Every result comes with the same value expressed in base 10, base e and base 2, so you can cross-check against a textbook or a scientific calculator.
| Name | Written | Base | Used in |
|---|---|---|---|
| Common logarithm | log or log₁₀ | 10 | pH, decibels, the Richter scale, orders of magnitude |
| Natural logarithm | ln | e ≈ 2.71828 | Growth and decay, calculus, compound interest |
| Binary logarithm | log₂ or lb | 2 | Computer science, information theory, algorithm analysis |
A note on notation: in most school and engineering contexts log with no base means base 10, but in pure mathematics and many programming languages log means the natural logarithm. When it matters, write the base explicitly.
Every logarithm can be rewritten as an exponential, and vice versa. They are the same statement viewed from two directions, and being able to switch between them is the single most useful skill in this topic.
| Exponential form | Logarithmic form | Read it as |
|---|---|---|
| 2³ = 8 | log₂(8) = 3 | 2 to the power 3 gives 8 |
| 10² = 100 | log₁₀(100) = 2 | 10 to the power 2 gives 100 |
| 10³ = 1000 | log₁₀(1000) = 3 | 10 to the power 3 gives 1000 |
| e¹ = e | ln(e) = 1 | e to the power 1 gives e |
| 5² = 25 | log₅(25) = 2 | 5 to the power 2 gives 25 |
| 3⁴ = 81 | log₃(81) = 4 | 3 to the power 4 gives 81 |
| 7³ = 343 | log₇(343) = 3 | 7 to the power 3 gives 343 |
| 10⁻³ = 0.001 | log₁₀(0.001) = −3 | 10 to the power −3 gives 0.001 |
| b⁰ = 1 | log_b(1) = 0 | any base to the power 0 gives 1 |
| b¹ = b | log_b(b) = 1 | any base to the power 1 gives itself |
bˣ = y ⟷ log_b(y) = xA quick way to check your conversion: read the logarithm aloud as a question. log₂(8) asks "2 to what power gives 8?" — and the exponential form 2³ = 8 is the answer written out.
These rules are why logarithms were invented. Before calculators, they turned multiplication into addition — which is exactly what a slide rule does mechanically. The product rule still matters today for simplifying equations and for keeping very large or very small numbers manageable.
Most calculators only offer log₁₀ and ln, so any other base has to be converted. Divide the log of your number by the log of your base, using whichever base you do have:
It works with either base on the bottom, which is a useful way to check your own arithmetic — both routes must give the same answer.
An antilogarithm undoes a logarithm. If log₁₀(x) = 3 then the antilog of 3 is 10³ = 1000. In modern notation it is just exponentiation, but the word survives from log tables, where you would look up a value and then reverse it in the antilog table.
The antilog of 2 in base 10 is 100, and the antilog of 1 in base e is e itself. Use the Antilog mode above for any base.
| x | log₁₀(x) | ln(x) | log₂(x) |
|---|---|---|---|
| 0.001 | −3 | −6.907755 | −9.965784 |
| 0.1 | −1 | −2.302585 | −3.321928 |
| 1 | 0 | 0 | 0 |
| 2 | 0.301030 | 0.693147 | 1 |
| e ≈ 2.71828 | 0.434294 | 1 | 1.442695 |
| 8 | 0.903090 | 2.079442 | 3 |
| 10 | 1 | 2.302585 | 3.321928 |
| 100 | 2 | 4.605170 | 6.643856 |
| 1000 | 3 | 6.907755 | 9.965784 |
| 1024 | 3.010300 | 6.931472 | 10 |
| 1,000,000 | 6 | 13.815511 | 19.931569 |
A logarithm asks what power of the base produces your number. For a positive base, no power ever gives a negative result — 10² = 100 and 10⁻² = 0.01, both positive. As the exponent falls, the result shrinks toward zero without ever arriving, so log(0) has no answer either. Mathematically the limit heads to negative infinity.
Base 1 is excluded for a related reason: 1 raised to any power is always 1, so log₁(5) has no solution at all. A base of 0 or a negative base fails for similar reasons.
Working out how long an investment needs to reach a target, by solving for the exponent in compound interest.
t = ln(A/P) ÷ ln(1+r)Log loss (cross-entropy) is the standard way to measure how wrong a model's predictions are during training.
loss = −Σ y·ln(ŷ)Binary search and balanced trees run in log₂(n) steps, so a million sorted items need about 20 comparisons.
O(log n)pH is a negative base-10 logarithm, so each whole unit is a tenfold change in acidity.
pH = −log₁₀[H⁺]Signal gain, filter response and Bode plots are all plotted on logarithmic axes to cover huge ranges.
gain = 20·log₁₀(V₂/V₁)The Richter scale is logarithmic — each whole number is roughly 32 times more energy released.
M = log₁₀(A/A₀)Decibels are logarithmic because hearing responds to ratios. Every 10 dB is ten times the intensity.
dB = 10·log₁₀(I/I₀)Log transforms turn skewed data and exponential curves into straight lines that are easier to model.
log-normal, log-log plotsChemistry — pH. pH = −log₁₀[H⁺]. A drop of one pH unit means ten times more acidic, which is why pH 3 is a hundred times more acidic than pH 5.
Sound — decibels. Loudness is logarithmic because human hearing is. A 60 dB conversation is a million times more intense than the 0 dB threshold of hearing.
Earthquakes — the Richter scale. Each whole number is roughly 32 times more energy released, so a magnitude 7 is not slightly worse than a 6 — it is vastly worse.
Computer science. Binary search runs in log₂(n) steps, which is why searching a million sorted items takes about 20 comparisons rather than a million.
Finance. Working out how long an investment takes to reach a target uses logarithms to solve for the exponent in the compound interest formula.
Biology and medicine. Bacterial growth, drug half-lives and radioactive decay are all exponential, so logarithms turn their curves into straight lines that are easier to read.
1) 2 2) 4 3) 0 4) 3 5) −1
1) x = 6 2) 3 3) b = 3 4) log(1000) = 3 5) 0.01
What is a logarithm?
A logarithm is the power to which a base must be raised to produce a given number. Because 10 cubed is 1000, the base 10 logarithm of 1000 is 3.
How do you calculate a logarithm?
Ask what power of the base gives your number. For bases your calculator does not offer directly, divide the natural log of the number by the natural log of the base.
What is the difference between log and ln?
log normally means base 10 and ln means base e, approximately 2.71828. In pure mathematics and many programming languages, log on its own can mean the natural logarithm, so it is safest to state the base.
What is the natural logarithm?
The natural logarithm uses base e, about 2.718281828. It appears wherever quantities grow or decay continuously, which makes it the standard logarithm in calculus, physics and finance.
What is log base 10?
The base 10 or common logarithm counts powers of ten. It underpins pH, decibels and the Richter scale, and its whole number part tells you the order of magnitude.
What is log base 2?
The binary logarithm counts powers of two. It is central to computer science, because it gives the number of times a quantity can be halved, which is the running time of binary search.
What is the change of base formula?
log base b of x equals log base c of x divided by log base c of b. In practice you divide the natural log of the number by the natural log of the base, which lets any calculator handle any base.
What is an antilog?
An antilogarithm reverses a logarithm. If the base 10 log of a number is 3, the antilog of 3 is 10 to the power 3, which is 1000. In modern notation it is simply exponentiation.
Why is log of 0 undefined?
No power of a positive base ever produces 0. As the exponent decreases the result shrinks toward zero without reaching it, so the logarithm has no value and heads toward negative infinity.
Why is log of a negative number undefined?
A positive base raised to any real power always gives a positive result, so no real exponent can produce a negative number. Logarithms of negative numbers exist only in complex analysis.
Why can the base not be 1?
1 raised to any power is always 1, so a base of 1 could never produce any other number. That makes the logarithm undefined, which is why bases must be positive and not equal to 1.
What is log of 1?
The logarithm of 1 is 0 in every valid base, because any base raised to the power 0 equals 1.
What are the logarithm rules?
The log of a product is the sum of the logs, the log of a quotient is the difference of the logs, and the log of a power moves the exponent to the front as a multiplier.
Can you take the log of a fraction?
Yes, as long as it is positive. Fractions between 0 and 1 give negative logarithms, so the base 10 log of 0.001 is minus 3.
How do you solve an exponential equation with logs?
Take the logarithm of both sides and use the power rule to bring the exponent down. To solve 3 to the power x equals 81, take logs to get x equals log of 81 divided by log of 3, which is 4.
How is pH calculated with logarithms?
pH is the negative base 10 logarithm of the hydrogen ion concentration. A concentration of 1 times 10 to the minus 4 gives a pH of 4, and each whole pH unit represents a tenfold change in acidity.
How are decibels related to logarithms?
Decibels use a base 10 logarithmic scale because human hearing responds to ratios rather than absolute differences. Every 10 decibel rise represents ten times the sound intensity.
Why are logarithms used in computer science?
Binary logarithms describe how many times data can be halved, which measures the efficiency of algorithms such as binary search and the depth of balanced trees.
Who invented logarithms?
John Napier published the first tables of logarithms in 1614, and Henry Briggs later developed the base 10 form. They transformed astronomy and navigation by turning multiplication into addition.
Is this Log Calculator free?
Yes. It is free with no sign-up, works on any device, and runs entirely in your browser so your entries stay private.