A logarithm calculator for any base
This log calculator finds the logarithm of a number in the base you choose: natural log ln, common log log₁₀, log base 2 or any other base such as 7 or 1.05. It also works the other way round, with powers bʸ (antilog) and the exponential eˣ, and it solves equations of the form bˣ = y. Every answer comes with the log rules applied to your own numbers and a graph of y = log_b(x).
Use it for algebra homework, sound levels, chemistry or savings questions.
How to use it
- Pick a calculation: "Logarithm log_b(x)", "Power bʸ, eˣ" or "Solve bˣ = y".
- Type the "Base b" or press ln, log₁₀ or log₂. Base e is written as e.
- Enter the "Number x", "Exponent y" or "Value y". Inputs such as 2.5, 1e300, 10^300 and e^2 all work.
- Read the result and the "Step-by-step properties" list. "Copy result" copies the main line.
What a logarithm is
The base-b logarithm of x is the power you raise b to in order to get x: log_b(x) = y means bʸ = x. So log₂(1024) = 10 because 2¹⁰ = 1024, ln(e) = 1, and log₁₀(0.001) = −3 because 10⁻³ = 0.001.
- Change of base: log_b(x) = ln(x) ÷ ln(b). For example, log₂(10) = 2.302585 ÷ 0.693147 ≈ 3.321928.
- Product rule: log(a × c) = log(a) + log(c).
- Power rule: log(aⁿ) = n × log(a).
- Reciprocal: log(1 ÷ a) = −log(a).
A logarithm only exists for x greater than 0, and the base must be positive and not equal to 1. If you enter 0, a negative number or base 1, the tool tells you why in plain words.
Precision with very large numbers
Results show up to 15 significant digits. Your input is read exactly, then split into a mantissa and a power of 10, so log₁₀(1e300) comes out as exactly 300. When the answer is a whole number or a simple fraction, the tool confirms it with integer arithmetic (7³ = 343): log₇(343) shows 3, not 2.9999999.
Everyday examples
- Decibels: a power ratio of 100 is 10 × log₁₀(100) = 20 dB, and doubling the power adds about 3 dB.
- pH: pH = −log₁₀[H⁺]. With [H⁺] = 10⁻⁷ mol/L the pH is 7, the value for pure water.
- Earthquake magnitude: one step up the scale means 10 times the wave amplitude and about 10^1.5 ≈ 31.6 times the energy.
- Compound interest: money growing at rate r per year doubles in ln(2) ÷ ln(1 + r) years. At 5% that is 14.2067 years, close to the rule of 72 estimate of 72 ÷ 5 = 14.4.
The buttons in the "Uses" row load these examples for you.
Frequently asked questions
What is the difference between log and ln?
ln is the natural logarithm, base e ≈ 2.718. On most calculators, log means the common logarithm, base 10. They are linked by ln(x) = log₁₀(x) × ln(10), where ln(10) ≈ 2.302585.
How do I calculate log base 2?
Press log₂ or type 2 in "Base b". By hand, log₂(x) = ln(x) ÷ ln(2). For example, log₂(64) = 6 because 2⁶ = 64.
How do I solve 3ˣ = 81?
Choose "Solve bˣ = y", base 3 and value 81: x = log₃(81) = 4. The tool then checks that 3⁴ = 81.
Why is log(0) undefined?
No power of a positive number equals 0. As x gets closer to 0, log(x) drops towards minus infinity, so the curve never touches the vertical axis.