Use this free log calculator to find the logarithm of any positive number in any base. It handles the common log (base 10), the natural log (ln, base e), the binary log (base 2), and any custom base. It also finds antilogs, shows the log rules, and gives step-by-step working. No signup needed.
Enter a positive number greater than zero.
Enter the exponent for the antilogarithm.
A logarithm tells you what power the base must be raised to in order to get the given number.
The logarithm is defined only for positive numbers. The base must be greater than zero and cannot equal one. Results use standard double-precision calculations and are rounded for display.
You can also go the other way: enter a base and a logarithm value to find the antilog, which is b raised to that value.
A logarithm answers the question: “What power do I raise the base to, to get this number?”
log_b(x) = y means b^y = x
For example, log₂(8) = 3, because 2³ = 8.
Logarithms are the inverse of exponents. They turn multiplication into addition, which is why they were used before calculators, and why they still matter in science, engineering, and computing.
| Name | Notation | Base | Typical use |
|---|---|---|---|
| Common logarithm | log(x) or log₁₀(x) | 10 | Science, pH, decibels, orders of magnitude |
| Natural logarithm | ln(x) | e ≈ 2.71828 | Calculus, growth and decay, finance |
| Binary logarithm | log₂(x) or lb(x) | 2 | Computer science, information, binary search |
Note: in some programming languages and advanced math books, “log” alone means the natural log. This page uses log for base 10 and ln for base e.
| Rule | Formula | Example |
|---|---|---|
| Definition | log_b(x) = y ⇔ bʸ = x | log₂(8) = 3 ⇔ 2³ = 8 |
| Product rule | log_b(xy) = log_b(x) + log_b(y) | log(2) + log(50) = log(100) = 2 |
| Quotient rule | log_b(x/y) = log_b(x) − log_b(y) | log(1000) − log(10) = 2 |
| Power rule | log_b(xⁿ) = n × log_b(x) | log(5³) = 3 × log(5) ≈ 2.0969 |
| Log of 1 | log_b(1) = 0 | ln(1) = 0 |
| Log of the base | log_b(b) = 1 | log₂(2) = 1 |
| Change of base | log_b(x) = ln(x) ÷ ln(b) = log(x) ÷ log(b) | log₇(50) = ln 50 ÷ ln 7 ≈ 2.0104 |
| Reciprocal | log_b(1/x) = −log_b(x) | log₂(1/8) = −3 |
| Inverse | b^(log_b(x)) = x and log_b(bˣ) = x | 10^(log 37) = 37 |
Warning: log(x + y) is not log(x) + log(y). And log(x) × log(y) is not log(xy).
All answers are rounded for display.
Find log₇(50).
log(2) + log(50) = 0.30103 + 1.69897 = 2 = log(100).
log(1000 ÷ 10) = log(1000) − log(10) = 3 − 1 = 2.
log(5³) = 3 × log(5) = 3 × 0.69897 = 2.09691. Check: log(125) = 2.09691.
The antilog is the inverse of the log.
Solve 2ˣ = 50.
Solve 3^(x + 1) = 20.
How many years does it take for money to double at 5% a year?
pH = −log₁₀[H⁺], where [H⁺] is the hydrogen ion concentration in mol/L.
How many digits does 2¹⁰⁰ have?
In general, a positive whole number N has floor(log₁₀ N) + 1 digits. For example, 123,456 has floor(5.0915) + 1 = 6 digits.
How many steps does a binary search need for a sorted list of 1,000,000 items?
On a scale like the Richter scale, each whole-number step means 10 times the measured amplitude. A difference of 2 is 10² = 100 times the amplitude.
| x | log₁₀(x) |
|---|---|
| 1 | 0 |
| 2 | 0.3010 |
| 3 | 0.4771 |
| 4 | 0.6021 |
| 5 | 0.6990 |
| 6 | 0.7782 |
| 7 | 0.8451 |
| 8 | 0.9031 |
| 9 | 0.9542 |
| 10 | 1 |
| Number | log₁₀ |
|---|---|
| 0.001 | −3 |
| 0.01 | −2 |
| 0.1 | −1 |
| 1 | 0 |
| 10 | 1 |
| 100 | 2 |
| 1,000 | 3 |
| 1,000,000 | 6 |
| Input | Result |
|---|---|
| log(0) | Undefined. No power of a positive base gives 0. The value tends to negative infinity as x approaches 0. |
| log of a negative number | Not a real number. (It exists only in complex numbers.) |
| Base = 1 | Undefined, since 1 to any power is 1 |
| Base ≤ 0 | Not allowed |
The domain of log_b(x) is x > 0, and the base must satisfy b > 0 and b ≠ 1.
A logarithm tells you what power a base must be raised to in order to get a number. log₂(8) = 3 because 2³ = 8.
Ask what power of the base gives the number. For other values, use a calculator, or use the change of base formula: log_b(x) = ln(x) ÷ ln(b).
log usually means base 10, and ln means base e (about 2.71828). For example, log(100) = 2 and ln(100) ≈ 4.605.
Use log₂(x) = ln(x) ÷ ln(2). For example, log₂(10) = 2.302585 ÷ 0.693147 ≈ 3.3219.
Use the change of base formula. For log₇(50), it is ln(50) ÷ ln(7) ≈ 2.0104.
It is 0 for every valid base, because any number to the power of 0 is 1.
It is undefined. No power of a positive base gives 0.
Not in real numbers. It is only possible with complex numbers.
Product: log(xy) = log x + log y. Quotient: log(x/y) = log x − log y. Power: log(xⁿ) = n log x.
It is the inverse of a log. The antilog of y in base b is b^y. For example, the base-10 antilog of 2.5 is 10^2.5 ≈ 316.23.
Take the log of both sides and use the power rule. For 2ˣ = 50, x = log(50) ÷ log(2) ≈ 5.644.
Yes. It is free, with no registration and no limits.
Results are calculated with standard double precision and shown to about 12 significant digits. Whole-number answers are exact.
A few of the most-used tools in each hub.
This calculator is for general and educational use. Results are shown to about 12 significant digits and may contain tiny rounding differences. Check important results yourself before using them for work in engineering, chemistry, finance, or safety, and follow your teacher’s rules on the form of the answer.