Logarithm Calculator
Log of a positive number to base 10, base 2, base e (ln) or any base above 0 except 1, shown to 10 significant digits. How it works
Use the Logarithm Calculator
About the Logarithm Calculator
log base 10 of 1000 is 3, because 10³ = 1000. This logarithm calculator returns log_b(x) for any number x above 0 and any base b above 0 except 1, shown to 10 significant digits: log base 2 of 3 is 1.584962501. For the natural log (ln), press the e base button, which fills in e = 2.718281828459045. Exact powers come out as whole numbers, so log base 5 of 125 shows 3.
Logarithms the calculator returns
| x | Base | log_b(x) |
|---|---|---|
| 100 | 10 | 2 |
| 1000 | 10 | 3 |
| 0.01 | 10 | -2 |
| 1 | 10 | 0 |
| 8 | 2 | 3 |
| 1024 | 2 | 10 |
| 3 | 2 | 1.584962501 |
| 125 | 5 | 3 |
| 100 | 5 | 2.861353116 |
| 81 | 3 | 4 |
| 2 | e (2.718281828459045) | 0.6931471806 |
As the tool shows them, to 10 significant digits.
How to use this tool
- Enter the number x. It must be above 0.
- Enter the base b, or press 10, e or 2. It must be above 0 and not 1. The defaults are 100 and 10.
- Read the result. The example buttons fill in log₂ 1024 (10), ln of e³ (3) and log₁₀ 0.001 (-3).
- Tick Show steps to see ln(x), ln(b) and their quotient.
Frequently asked questions
- How do I calculate log base 2 of a number?
- Enter the number and 2 as the base. Log base 2 of 1024 is 10, and of 3 is 1.584962501. Base 2 uses an exact base-2 function, so powers of 2 come out as whole numbers.
- How do I calculate the natural log (ln)?
- The natural log is the log to base e. Press the e button under Base, which fills in 2.718281828459045: ln 2 shows 0.6931471806 and ln 10 shows 2.302585093. If you type e yourself, type all the digits, because a shortened e changes the later decimals.
- How do I calculate log base 3 of 50, or any other base?
- Type the number and the base. By hand, divide natural logs: log base 3 of 50 = ln 50 ÷ ln 3 = 3.912023005 ÷ 1.098612289 = 3.560876795. This change of base formula works for any base, and the tool applies it for bases other than 10 and 2. Tick Show steps to see it worked for your numbers: for log base 10 of 100, ln(100) = 4.605170186 and ln(10) = 2.302585093, and 4.605170186 ÷ 2.302585093 = 2.
- Why is the log of 0 or a negative number not defined?
- No power of a positive base gives 0 or a negative number, so x must be above 0, and the tool says so in a message. A base of 1 is refused because every power of 1 is 1, and the base must also be above 0.
- Why is the log of a number between 0 and 1 negative?
- It is a power below 0: 10 to the power -2 is 0.01, so log base 10 of 0.01 is -2, and log base 2 of 0.5 is -1. The log of 1 is 0 in every base.
- Why does the answer show 3 and not 2.9999999999999996?
- Dividing ln 1000 by ln 10 in a browser gives 2.9999999999999996. The tool uses exact base-10 and base-2 functions and rounds every result to 10 significant digits, so exact powers read as whole numbers.
Related Tools
View all toolsPercentage Calculator
Percentage calculator for seven questions: X% of Y, X is what % of Y, percent change, percent difference, X is Y% of what, and a percent increase or decrease.
Derivative Calculator
Enter f(x) and a point x = a to get f′(a), f(a), the tangent line and its graph, plus the formula for f′(x). Flags corners, jumps and vertical tangents.
Scientific Calculator
Keypad or keyboard calculator with brackets, sin, cos, tan and their inverses in degrees or radians, log, ln, √, x^y, 10ˣ, memory and Ans, in the usual order.
Percent Error Calculator
Percent error of a measured value against the true value, |measured − true| ÷ |true| × 100, signed if you want, or the percent difference of two values.
Integral Calculator
Enter f(x) and the limits a and b to get the definite integral as a number, by Simpson's rule with 1,000 intervals. Net signed area, no antiderivative.
Triangle Calculator
Enter any three sides or angles of a triangle, at least one a side. Solves SSS, SAS, ASA, AAS and both SSA triangles, with area, perimeter and heights.