# Logarithm Calculator - log, ln, lg and Any Base Online (Change of Base)

> Free online logarithm calculator: log_b(x) for any base with ln, lg and log₂ alongside and the change-of-base working, plus b^x and exponential equations.

- URL: https://qilingtools.com/en/math/logarithm
- Category: Math Tools (https://qilingtools.com/en/math)
- Tags: [Math](https://qilingtools.com/en/tags/math), [Education](https://qilingtools.com/en/tags/education)
- Last updated: 2026-10-26
- Price: Free, no sign-up
- Privacy: Runs locally in the browser; files are never uploaded

Enter a base and a value to get log_b(x), with the natural log ln, the common log lg and log₂ listed next to it and the change-of-base formula written out. You can also go the other way and compute bˣ, or solve an exponential equation b^x = y.

## How to use

1. Pick a mode: logarithm, power bˣ, or solve b^x = y
2. Enter the base b and the value x (shortcuts for 2, 10, e and 0.5)
3. Read the result — the check row raises b back to that power to confirm it
4. Use the plot link to see y = log_b(x) or y = bˣ

## Features

- Logarithms to any base, with ln, lg and log₂ given alongside
- The change-of-base working is shown: log_b(x) = ln x / ln b
- Power mode accepts fractional and negative exponents
- Solves exponential equations b^x = y in one step
- Every answer comes with a check row substituting it back
- A quick reference of the log identities (product, quotient, power, change of base)

## FAQ

### What is the difference between ln, lg and log?

ln is the natural logarithm to base e (about 2.71828) and lg is the common logarithm to base 10. Plain “log” depends on context: maths textbooks often mean lg, Math.log in most languages is ln, and computer science usually means log₂ — so all three are listed separately here.

### How do I compute a base 2 logarithm?

Set the base to 2 (or use the shortcut button) and enter the value. By hand you can use the change of base: log₂ x = ln x / ln 2 = lg x / lg 2.

### Why can the base not be 1 or negative?

Any power of 1 is 1, so it could never produce another number, and a negative base jumps around outside the real numbers. That is why the base must satisfy b > 0 and b ≠ 1.

### Why must the value be positive?

A positive base raised to any real power is positive, so log_b(x) is only defined for x > 0. As x approaches 0 the logarithm heads to negative infinity.

### How do I solve something like 2^x = 100?

Switch to “Solve b^x = y”, set the base to 2 and the right-hand side to 100. The answer is x = log₂100 ≈ 6.6439 — the same as taking logarithms of both sides.

## Related tools

- [Graphing Calculator](https://qilingtools.com/en/math/graph): Free online function graphing calculator: type sin(x), x^2 or 1/x and see the curve at once, with several functions, parametric and polar curves, PNG export.
- [Scientific Calculator](https://qilingtools.com/en/math/calculator): Free online scientific calculator: type 2*(3+4)^2, sin(pi/6) or log(8,2) and see the answer as you type, with degrees or radians and a history list.
- [Equation Solver](https://qilingtools.com/en/math/equation): Free online equation solver: enter coefficients for linear, quadratic (with discriminant, vertex and complex roots) and cubic equations, plus 2×2 systems.
- [Fraction Calculator](https://qilingtools.com/en/math/fraction): Free online fraction calculator: add, subtract, multiply and divide fractions with automatic reduction, plus fraction ↔ decimal with repeating digits.
- [Percentage Calculator](https://qilingtools.com/en/math/percentage): Free online percentage calculator: X% of Y, X as a percent of Y, increase and decrease, a value after a percentage change and the original behind it.
- [Prime Factorization](https://qilingtools.com/en/math/prime): Free online prime factorization: factor an integer with exponents, list every divisor and their sum, test primality with neighbouring primes, or list a range.
- [GCD and LCM](https://qilingtools.com/en/math/gcd-lcm): Free online GCD and LCM calculator: works with two or more integers, says whether they are coprime, shows each prime factorization and every Euclidean step.
- [Statistics Calculator](https://qilingtools.com/en/math/statistics): Free online statistics calculator: paste a data set for the mean, median, mode, range, quartiles, variance, standard deviation, standard error and outliers.
