A logarithm answers the question “what power must I raise the base to in order to get this number?”. This calculator computes logarithms in base 10 (common log), base e (natural log, ln), base 2, or any custom base, and confirms each answer with the matching power. It is for students, engineers and anyone working with exponential growth, decibels, pH or information theory.
How it works
JavaScript provides only the natural logarithm, so the tool uses the change-of-base identity to handle any base:
log_base(x) = ln(x) ÷ ln(base)
The preset buttons simply set the base to 10, e or 2; the custom option accepts any base greater than 0 and not equal to 1. Logarithms are only defined for x greater than 0, so the calculator validates the domain before computing. Results are shown to ten decimal places and confirmed by the inverse relationship base^result = x.
Example
To find log base 10 of 1000:
log₁₀(1000) = ln(1000) ÷ ln(10) = 6.907755 ÷ 2.302585 = 3
The check confirms it: 10³ = 1000.
| Expression | Result | Verification |
|---|---|---|
| log₁₀(1000) | 3 | 10³ = 1000 |
| ln(e) | 1 | e¹ = e |
| log₂(8) | 3 | 2³ = 8 |
| log₃(81) | 4 | 3⁴ = 81 |
The calculator is privacy-first — the value and base stay in your browser and nothing is sent to any server.