Logarithm Calculator
log base b of any number — plus natural log, log₁₀, and log₂
Related calculators
All utility & math- Quadratic Equation SolverSolve ax²+bx+c=0 — roots, discriminant, and vertex
- Slope CalculatorSlope, line equation, distance, and midpoint from two points
- Exponent CalculatorRaise any base to any power, including negative and fractional
- Square Root CalculatorSquare root, cube root, or nth root with simplified radical
- LCM & GCD CalculatorLeast common multiple and greatest common divisor (GCF/HCF)
- Prime Factorization CalculatorPrime factors, primality check, and all divisors of a number
Quick summary
Enter a value and a base to compute its logarithm — the power the base must be raised to in order to give the value. log₂(8) = 3 because 2³ = 8. It's calculated as ln(value) / ln(base), and the tool also shows the natural log (ln, base e), common log (log₁₀), and log base 2. The value must be positive, and the base positive and not equal to 1. Results are rounded to six decimal places.
Reviewed by Simple Calculators TeamLast reviewed
How to use this calculator
- Enter the Value (x) you want the logarithm of; it must be greater than 0.
- Enter the Base (b); it must be greater than 0 and not equal to 1. Use 10 for the common log or 2 for the binary log.
- Read the main result, shown as log with your base and value, in large type.
- Check the ln (base e), log₁₀, and log₂ tiles for the same value in the three most common bases.
- Confirm a result by raising the base to that power: b to the power of the result should equal x.
Logarithm Formula
Change of Base
- x
- The value (must be greater than 0)
- b
- The base (greater than 0 and not equal to 1)
- ln
- Natural logarithm, base e ≈ 2.718
Worked example
Find log base 5 of 125
- Given
- x = 125b = 5
- Calculation
- Result
- 3, because 5³ = 125
Frequently asked questions
What is a logarithm?
A logarithm answers the question 'what power do I raise the base to, to get this number?' For example, log₂(8) = 3 because 2³ = 8, and log₁₀(1000) = 3 because 10³ = 1000. It's the inverse of exponentiation, so logarithms and exponents undo each other.
What is the difference between log, ln, and log₁₀?
'log' with a stated base b means log base b. 'ln' is the natural logarithm, base e (≈ 2.718). 'log₁₀' (often just written 'log' in everyday contexts) is the common logarithm, base 10. This calculator shows your chosen base plus ln, log₁₀, and log₂ for reference.
How do I calculate log with any base?
Use the change-of-base formula: log_b(x) = ln(x) / ln(b), or equivalently log(x) / log(b) with base-10 logs. For log₅(125): ln(125) / ln(5) = 4.828314 / 1.609438 = 3. This calculator applies the change-of-base formula automatically for whatever base you enter.
Why must the value be positive?
Logarithms of real numbers are only defined for positive values, because no real power of a positive base yields zero or a negative result. The base must also be positive and not 1, since every power of 1 is still 1. The calculator enforces these rules and shows a message if an input is out of range.
Can a logarithm be negative?
Yes. When the value is between 0 and 1 and the base is greater than 1, the logarithm is negative, because you need a negative power to get a fraction. For example, log₁₀(0.01) = −2 since 10⁻² = 0.01. The logarithm of 1 is 0 in every base, and values above 1 give positive results when the base is greater than 1.
How many decimal places does the calculator show?
Results are rounded to six decimal places. Whole-number answers like log₂(8) = 3 display exactly, while others are rounded — log₃(50) appears as 3.560877. Six places is plenty for homework, science, and most engineering work; if you need an exact value, keep it in symbolic form, such as ln 50 / ln 3.
What are logarithms used for?
They turn multiplication into addition and exponents into ordinary numbers, which makes them useful wherever quantities grow or shrink by factors. Common examples include the pH scale in chemistry, decibels for sound, earthquake magnitude scales, solving for time in compound-interest and half-life problems, and describing algorithm efficiency in computer science.
Key terms
- Logarithm
- The power a base must be raised to in order to give a value.
- Natural Log (ln)
- Logarithm base e (≈ 2.718).
- Common Log (log₁₀)
- Logarithm base 10.
- Change of Base
- log_b(x) = ln(x)/ln(b) — compute any base from natural logs.
Methodology, sources & limitations
This page shows the formula, assumptions, and limitations used for this estimate. Rates, thresholds, and other time-sensitive inputs can change, so verify them against the relevant official source before relying on a result.
For our review approach and the primary sources we consult, see the methodology and source policy. If you spot an outdated figure or formula, please contact us with a correction.