Calculate logarithms in any base: common log₁₀, natural log ln, binary log₂, and custom base log_b(x) with change-of-base step breakdowns.
Click "Calculate" to evaluate logarithm.
An acoustical engineer evaluates noise levels using the decibel scale: dB = 10 × log₁₀(I / I₀). An earthquake seismologist measures seismic energy on the Richter scale: M = log₁₀(A / A₀). A computer scientist analyzes binary search tree depth: d = log₂(n). Each scenario relies on logarithms to convert massive numerical ranges into manageable linear scales.
A logarithm is the inverse operation of exponentiation. The logarithmic expression log_b(x) = y asks the fundamental question: "To what exponent y must base b be raised to produce the number x?" In exponential form, this is equivalent to b^y = x, where b > 0 and b ≠ 1.
The three most common logarithm bases are the common logarithm (base 10, written log(x)), the natural logarithm (base e ≈ 2.71828, written ln(x)), and the binary logarithm (base 2, written log₂(x)). This calculator solves logarithms in any custom base using the Change of Base formula. The following guide covers logarithmic laws, step-by-step algorithms, and practical scientific applications.
When an argument x and base b are submitted, the engine evaluates the expression using JavaScript's native Math.log() and applies the change of base formula.
1. Domain Validation:
- Argument x must be strictly positive (x > 0).
- Base b must be positive and not equal to 1 (b > 0, b ≠ 1).
2. Change of Base Formula:
Standard calculators only evaluate log₁₀ and ln. To calculate log_b(x) for an arbitrary base b, the engine uses:
log_b(x) = ln(x) / ln(b) or log_b(x) = log₁₀(x) / log₁₀(b)
3. Fundamental Logarithm Laws:
log_b(M × N) = log_b(M) + log_b(N)log_b(M / N) = log_b(M) - log_b(N)log_b(M^k) = k × log_b(M)log_b(1) = 0, log_b(b) = 1Computer science and algorithm analysis. Binary search, merge sort, and balanced tree traversals operate in O(log n) logarithmic time complexity, making algorithms scale efficiently for millions of data records.
Chemistry and pH scale. The pH measure of acidity or alkalinity is defined as pH = -log₁₀[H⁺], where [H⁺] is the hydrogen ion concentration in moles per liter.
Sound and acoustics. Human hearing perceives sound volume logarithmically. Decibel ratings (dB) measure sound intensity level L = 10 × log₁₀(I / I₀).
Finance and continuous compounding. Investors calculate the time t required for an investment to double at interest rate r using the natural logarithm: t = ln(2) / r.
Geophysics and earthquake magnitude. The Richter and moment magnitude scales measure earthquake severity logarithmically: each whole-number increase in magnitude corresponds to a 10-fold increase in amplitude and approximately 31.6-fold increase in released energy.
Ensure your argument x is strictly greater than 0. Entering x ≤ 0 will trigger a domain error because negative logarithms do not produce real-number outputs.
Use Mode 3 (Change of Base Step Breakdown) to view exact logarithmic step divisions for homework verification.
For evaluating powers and exponents alongside logarithms, pair this tool with our Exponent Calculator. For scientific functions, use our Scientific Calculator.
The engine executes client-side in JavaScript using IEEE 754 double-precision arithmetic. Logarithms evaluate in sub-millisecond time.
| Feature | This Tool | Hand Scientific Calculator | Standard 4-Function |
|---|---|---|---|
| Custom Base b | Any base b > 0, b ≠ 1 | log10 and ln only | None |
| Change of Base | Automatic step breakdown | Manual ln(x)/ln(b) division | None |
| Binary Log (log₂) | Built-in preset | Manual ln(x)/ln(2) | None |
| Domain Validation | Automatic error alert | Error screen | None |
| Privacy | Client-side browser | Local hardware | Local hardware |
| Cost | Free | Free | Hardware purchase |
If b = 1, then 1^y = 1 for any exponent y. This means 1^y can never equal any number other than 1, making log₁(x) undefined for all x ≠ 1 and indeterminate for x = 1.
The mathematical constant e (Euler's number) is an irrational number approximately equal to 2.718281828. It serves as the natural base for continuous growth models and calculus integration.
Rewrite the base b with exponent y equal to x: b^y = x (for example, log₂(8) = 3 becomes 2³ = 8).
Exponent Calculator — Computes powers (xⁿ), negative exponents, and BigInt integer powers.
Scientific Calculator — Evaluates complex mathematical expressions with trig, log, and factorial keys.
Quadratic Solver — Solves second-order polynomial equations with real and complex roots.