Logarithm calculator
Calculate the logarithm of a number in any base, plus natural log (ln), log10 and log2.
The logarithm requires x > 0 and a positive base other than 1.
How the calculation works
A logarithm is the inverse of exponentiation. It answers: "to what exponent must I raise the base to get x?". If b^y = x, then log_b(x) = y.
To compute in any base, use change of base from the natural log (ln):
log_b(x) = ln(x) ÷ ln(b)
Step-by-step example
log₂(8) = ? Ask: 2 to what power is 8? 2³ = 8, so log₂(8) = 3.
Common bases
- log (base 10): pH, decibels.
- ln (base e ≈ 2.718): natural log, used in continuous interest and calculus.
- log₂ (base 2): computing (bits, complexity).
Why logs turn multiplication into addition
A powerful property: log(a·b) = log(a) + log(b) — the basis of the old log tables.
Examples
- log₁₀(1000) = 3, because 10³ = 1000.
- log₂(1024) = 10, because 2¹⁰ = 1024.
Frequently asked questions
What is log base 10 of 1000?
3, because 10³ = 1000.
log vs ln?
log usually means base 10; ln is the natural log, base e (≈2.718). Same idea, different base.
Is there a log of a negative or zero?
Not in the real numbers: logs are only defined for positive values. log(0) tends to minus infinity.
Related calculators
More Math calculators
See all →Scientific calculator
Free online scientific calculator: sine, cosine, tangent, root, power, log, ln, π and parentheses.
Percentage
Calculate percentages every way: X% of Y, increase, discount and percentage change.
Rule of three
Solve a simple rule of three (direct or inverse): enter three values and find the fourth.
Compound rule of three
Solve problems where two quantities vary at once (machines, days, output...), directly or inversely.
Area of shapes
Calculate the area of a square, rectangle, triangle, circle and trapezoid in seconds.
Pythagorean theorem
Find the hypotenuse or a leg of a right triangle (a² + b² = c²).
Trigonometry (sin, cos, tan)
Calculate the sine, cosine and tangent of an angle in degrees or radians.
Slope / grade
Calculate slope as a percentage, the angle and the ratio from rise and run.
Updated on June 18, 2026 · by Rafael Rossi · Methodology & sources