Logarithm Calculator (log, ln, log2 and Antilog)
Calculate the logarithm of a number in any base, its natural (ln), common (log10) and binary (log2) logarithm, and the antilogarithm.
Things to keep in mind:
- Zero and negative numbers have no real logarithm; the number field accepts values from 0.0000000001.
- The logarithm is undefined for base 1; the result is shown as 0 with "Valid base = 0".
- Complex logarithms and solving logarithmic equations are not supported.
Calculator
Result
Enter the values and press Calculate to see the result here.
About this tool
A logarithm tells which power of a base gives a number: bʸ = x ⇔ log_b(x) = y. This tool returns four logarithms of the number at once and the inverse operation, the antilogarithm bʸ.
Formulas
- Natural logarithm: ln(x), base e ≈ 2.718281828
- Change of base: log_b(x) = ln(x) / ln(b)
- Common logarithm: log₁₀(x) = ln(x) / ln(10)
- Binary logarithm: log₂(x) = ln(x) / ln(2)
- Antilogarithm: antilog_b(y) = bʸ
Domain: x must be positive; the base must be positive and different from 1. With base 1, log_b(x) is undefined and the tool shows 0 with "Valid base = 0".
Example: for x = 1000 and b = 10, log(1000) = 3, ln(1000) ≈ 6.9077552790 and log₂(1000) ≈ 9.9657842847. For y = 2 the antilog is 10² = 100. In a second example x = 8, b = 2 and y = 10 give log₂(8) = 3 and an antilog of 2¹⁰ = 1024. For x = 0.5 and b = 0.5, log_b(x) = 1; for x = 0.5 the natural log is negative at ≈ −0.6931471806.
How to read the result log_b(x) tells which power of the base equals x. For x above 1 (with a base above 1) the logarithm is positive, for x between 0 and 1 it is negative, and for x = 1 it is 0. For a base below 1 the sign flips. A very large antilog (above about 10²⁹, e.g. 10³⁰) is not computed and shows 0; that is a limit notice, not an error.
Logarithms appear in pH, decibels and earthquake magnitudes, in doubling times of compound growth and in algorithm complexity.
How to use
- Enter the positive number (x).
- Enter the base (b); the default is 10.
- Enter the exponent (y) for the antilogarithm.
- Press Calculate.
Notes
Arithmetic uses 64 significant digits; logarithms are rounded to 10 decimals and the antilog to 8 decimals (HALF_UP). The antilog is not computed (shows 0) when y × ln(b) exceeds 66.775 (about 10²⁹). Bases between 0 and 1 are valid; the logarithm then changes sign.
Frequently asked questions
log usually means base 10, ln means base e ≈ 2.718 (natural log). They are related by ln(x) = log(x) × ln(10) ≈ 2.302585 × log(x).
Use the change-of-base rule: log_b(x) = ln(x) / ln(b). For example log₃(123.45) = ln(123.45) / ln(3) ≈ 4.3836.
The inverse of the logarithm: if log_b(x) = y then x = bʸ. In base 10, antilog(2) = 100; in base 2, antilog(10) = 1024.
No real power of a positive base gives 0 or a negative number. That is why the logarithm is defined only for positive numbers.
Sound level (decibels), earthquake magnitude and pH are logarithmic scales. The number of periods for an investment to double is also found with n = ln(2) / ln(1 + r).
Next step
Related tools to continue your calculation.
- Calculate
Exponent and Root Calculator (Power, Square Root, Cube Root, n-th Root)
Raise a number to any power (including fractional and negative exponents) and take its square root, cube root and n-th root.
- Calculate
Quadratic Equation Solver (ax² + bx + c = 0)
Solve ax² + bx + c = 0: discriminant, real or complex roots, the vertex of the parabola and the sum and product of the roots.
- Calculate
Percentage and Change Calculator
Calculate a percentage of a number, the ratio and percent change between two numbers, increase or decrease a number by a percentage, and work backwards to the whole.