Log Calculator
This calculator finds the logarithm of any positive number in any base, working out what power the base must be raised to in order to produce that number. Logarithms turn multiplication and huge ranges of values into manageable addition, and they underpin everything from decibels and pH to compound growth and computer science, so checking one quickly with full working shown is genuinely useful for study or work. You enter the number you want the logarithm of, then choose a base: base 10 (the common log), base e (the natural log, ln), base 2 (the binary log used in computing), or your own custom base, plus the decimal places you want the result shown to. The calculator instantly returns the expression you are solving, the logarithm result itself, and a verification line showing the base raised to that result to confirm it matches your original number. Below that it shows full step-by-step working using the change-of-base formula, the key values used along the way such as ln(x) and ln(b), and a table converting the same number into the other common bases for quick comparison. Use it to check homework, convert a value between logarithm bases, or see exactly how the change-of-base formula produces its answer. Results are calculated with standard double-precision arithmetic and are accurate to roughly fifteen significant figures.
1. Input
2. Notation
Step-by-Step Working
Key Values
Related Logarithms
What Is a Logarithm?
A logarithm is the inverse of exponentiation. Where an exponent says "what is b raised to the power y?", a logarithm asks "to what power must b be raised to produce x?" The relationship is:
logˣ(x) = y means bʸ = x
For example, log₁₀(1000) = 3 because 10³ = 1000. The number b is called the base, x is the argument (or antilogarithm), and y is the logarithm.
Common Logarithm Bases
| Base | Symbol | Common Name | Used In |
|---|---|---|---|
| 10 | log or log₁₀ | Common logarithm | Engineering, decibels, pH, Richter scale |
| e (2.71828...) | ln | Natural logarithm | Calculus, growth/decay, statistics |
| 2 | log₂ or lb | Binary logarithm | Computer science, information theory, bits |
The Change-of-Base Formula
Most calculators only provide log base 10 and ln. To find a logarithm in any other base, use the change-of-base formula:
logˣ(x) = ln(x) / ln(b) = log₁₀(x) / log₁₀(b)
This works because if logˣ(x) = y, then bʸ = x. Taking the natural log of both sides gives y · ln(b) = ln(x), so y = ln(x) / ln(b).
Example: log₂(32) = ln(32) / ln(2) = 3.4657... / 0.6931... = 5, confirming that 2⁵ = 32.
Logarithm Rules
| Rule | Formula | Example |
|---|---|---|
| Product rule | logˣ(xy) = logˣ(x) + logˣ(y) | log(100 × 10) = log(100) + log(10) = 2 + 1 = 3 |
| Quotient rule | logˣ(x/y) = logˣ(x) - logˣ(y) | log(100/10) = log(100) - log(10) = 2 - 1 = 1 |
| Power rule | logˣ(xˣ) = p · logˣ(x) | log(10³) = 3 · log(10) = 3 |
| Log of 1 | logˣ(1) = 0 | Any base raised to 0 = 1 |
| Log of base | logˣ(b) = 1 | log₁₀(10) = 1 |
| Change of base | logˣ(x) = ln(x) / ln(b) | log₂(8) = ln(8)/ln(2) = 3 |
Worked Example
Default inputs: x = 1000, base = 10.
- We want log₁₀(1000).
- Apply the change-of-base formula: ln(1000) / ln(10).
- ln(1000) = 6.907755... and ln(10) = 2.302585...
- 6.907755 / 2.302585 = 3.0000 exactly.
- Verification: 10³ = 1000. Correct.
Related Calculators
- Maths and Stats Calculators: full list of mathematical tools.
- Antilog Calculator: the inverse of the logarithm (bʸ = x).
- Exponent Calculator: calculate b raised to the power y.
- Scientific Notation Calculator: convert numbers to and from scientific notation.
- Quadratic Formula Solver: solve quadratic equations step by step.
Sources and method: Change-of-base formula: logˣ(x) = ln(x) / ln(b), derived from standard logarithm theory. Definitions from NIST Digital Library of Mathematical Functions (dlmf.nist.gov). JavaScript uses Math.log() (natural log) for all calculations.
This calculator computes logarithms using IEEE 754 double-precision floating-point arithmetic. Results are accurate to approximately 15 significant figures. For x very close to 0 or extremely large, rounding may affect the final displayed decimal places.