Algebra • Core Flagship Pillar

Logarithm Calculator

Evaluate natural logarithms (ln), base-10 (log), binary (log₂), or custom base logarithms, apply logarithmic rules and change-of-base identities, and visualize asymptote behavior on an interactive logarithmic curve plot.

|
Last Updated: September 2026
|
Verified Mathematical Identity

Enter Base (b) and Argument (x)

Common Logarithm Bases
Logarithmic Curve & Asymptote Plotter
Log Result (y)
3.00
Exact = 3
Natural Log (ln x)
6.9078
Base e
Common (log₁₀ x)
3.00
Base 10
Binary (log₂ x)
9.9658
Base 2
∑

Step-by-Step Mathematical Derivation

Direct Answer & Overview
Verified Educational Guide

How to Calculate Logarithms

A logarithm computes the exponent required to produce a given number from a specific base: log_b(x) = y if and only if bʸ = x. To calculate log_b(x) for any custom base, apply the Change of Base formula: log_b(x) = ln(x) / ln(b) = log₁₀(x) / log₁₀(b).

Primary Mathematical Formula Standard Mathematical Model
Standard Equation
ƒ(x)
Q.E.D.
log⁡b(x)=y  ⟺  by=x,log⁡b(x)=ln⁡(x)ln⁡(b)\log_b(x) = y \iff b^y = x, \quad \log_b(x) = \frac{\ln(x)}{\ln(b)}
Evaluated with exact mathematical formulation • Rigorously verified
Exact Formula
Input Parameters
Required
1
Base b (strictly positive, b > 0 and b ≠ 1)
2
Argument x (strictly positive real number, x > 0)
Expected Outputs
Calculated
Logarithmic value y (exact and high-precision decimal)
Equivalent natural log ln(x), common log log₁₀(x), binary log log₂(x), and step-by-step derivation
Worked Numerical Example
Instant Verification
Evaluate log₂(64)
→ 2⁶ = 64, so log₂(64) = ln(64) / ln(2) = 4.15888 / 0.69315
log₂(64) = 6

Fundamental Definition of Logarithms & Base Conditions

In mathematics, a logarithm represents the power (or exponent) to which a specified fixed base must be raised to equal a given number. Logarithms are the exact mathematical inverse of exponentiation functions.

Equivalence Relation
log_b(x) = y <===> bʸ = x
Base Restriction: b > 0, b ≠ 1 Bases must be positive numbers other than 1. (1 raised to any power is always 1, creating no unique inverse).
Argument Restriction: x > 0 A positive base raised to any real power is always positive, so real logarithms of negative numbers or zero are undefined.

The Three Universal Logarithm Bases

Natural Logarithm (ln x)

Base e ≈ 2.71828

Fundamental in calculus, population dynamics, radioactive half-life decay, and continuous compounding finance models.

Common Logarithm (log x)

Base 10

Standard base in scientific measurement, engineering decibel scales (dB), Richter earthquake magnitudes, and pH chemistry.

Binary Logarithm (log₂ x)

Base 2

Central to computer science, binary search tree algorithms, data compression entropy (bits), and Big-O computational complexity.

The Four Fundamental Logarithm Laws

Product Rule

log(MN) = log M + log N

The logarithm of a product is the sum of the individual logarithms: log_b(M · N) = log_b(M) + log_b(N).

Quotient Rule

log(M/N) = log M − log N

The logarithm of a division ratio is the difference of the logarithms: log_b(M / N) = log_b(M) − log_b(N).

Power Rule

log(Mᵏ) = k · log M

Exponents on the argument can be brought out front as multiplying coefficients: log_b(M^k) = k · log_b(M).

Inverse & Identity Properties

log_b(b) = 1, log_b(1) = 0

log_b(b^x) = x, b^(log_b x) = x, log_b(b) = 1, log_b(1) = 0.

Change of Base Formula & Proof

Most calculators only have built-in keys for $\ln$ (base $e$) and $\log_10$ (base $10$). The Change of Base Formula converts any base-$b$ logarithm into a ratio of standard logarithms:

log_b(x) = ln(x) / ln(b) = log₁₀(x) / log₁₀(b)

Proof: Let y = log_b(x) ==> bʸ = x. Take natural log on both sides: ln(bʸ) = ln(x) ==> y·ln(b) = ln(x) ==> y = ln(x) / ln(b).

Real-World Applications of Logarithms

Seismology (Richter Magnitude)

Earthquake magnitude M = log₁₀(I / S) scales exponentially. A magnitude 7.0 quake is 10 times more intense in wave amplitude than a 6.0 quake.

Acoustics & Signal Decibels (dB)

Sound pressure levels in decibels L_p = 20·log₁₀(p / p₀) match the non-linear logarithmic perception of human hearing.

Computer Science (Big-O Complexity)

Algorithms like binary search and divide-and-conquer sorting (Merge Sort) run in logarithmic O(log n) time, halving search spaces at each step.

Step-by-Step Worked Numerical Solutions

Example 1: Solving via Change of Base Base 3

Problem: Evaluate log₃(81) and log₃(50).

1. For 81: Recognize 3⁴ = 81 ==> log₃(81) = 4.
2. For 50: Apply change of base: log₃(50) = ln(50) / ln(3).
3. ln(50) ≈ 3.91202, ln(3) ≈ 1.09861 ==> 3.91202 / 1.09861 ≈ 3.5609.
Result: log₃(81) = 4, log₃(50) ≈ 3.5609

Common Pitfalls & Misunderstandings

Confusing log(M + N) with log(M) + log(N)

log_b(M + N) cannot be expanded! The product rule states log_b(M · N) = log_b(M) + log_b(N), not for addition.

Evaluating log of Negative Numbers

In real-number arithmetic, log_b(x) requires x > 0. When solving equations, always check for extraneous negative roots.

Confusing log(M) / log(N) with log(M / N)

log_b(M) / log_b(N) is the change-of-base ratio log_N(M), whereas log_b(M / N) = log_b(M) − log_b(N).

Fact-Checked & Verified • Computational Accuracy Standards
Updated August 2026 • Editorial Policy
Authored By
Sanjay Samanta

Lead Developer & Founder of Basic Math Tools. Specializes in browser-native computational algorithms and applied mathematics.

Reviewed & Verified By
Academic Review Board

Mathematics & curriculum specialists. Audited against standard algebraic and arithmetic principles.

Found an error or have an improvement suggestion? Report a calculation issue

Frequently Asked Questions

What is a logarithm and how does it work?
A logarithm is the inverse mathematical operation of exponentiation. The equation log_b(x) = y asks: "To what power must base b be raised to equal x?" For example, log₂(8) = 3 because 2³ = 8, and log₁₀(1000) = 3 because 10³ = 1000.
What is the difference between Natural Log (ln) and Common Log (log₁₀)?
Common Logarithm (log or log₁₀) uses base 10, commonly used in engineering, chemistry (pH scales), and acoustics (decibels). Natural Logarithm (ln) uses Euler’s number e (≈ 2.71828) as its base, widely used in calculus, physics, radioactive decay, and compound interest models.
How does the Change of Base Formula work?
The Change of Base formula allows you to calculate logarithms of any base using standard natural or base-10 functions: log_b(x) = ln(x) / ln(b) = log₁₀(x) / log₁₀(b). For example, log₂(10) = ln(10) / ln(2) ≈ 2.3026 / 0.6931 ≈ 3.3219.
Why can’t you take the logarithm of a negative number or zero?
For any positive base b > 0, raising b to any real power y always yields a strictly positive result (bʸ > 0). It is impossible to raise a positive number to any real power to obtain zero or a negative number. Therefore, log_b(x) is undefined for x ≤ 0 in real arithmetic.
What are the three core logarithm properties (Product, Quotient, Power)?
The three core properties are: 1. Product Rule: log_b(M·N) = log_b(M) + log_b(N); 2. Quotient Rule: log_b(M/N) = log_b(M) − log_b(N); 3. Power Rule: log_b(Mᵏ) = k·log_b(M).
How are logarithms used to measure earthquake intensity (Richter scale)?
The Richter earthquake magnitude scale is logarithmic (base 10). Each increase of 1 unit on the scale represents a 10-fold increase in measured ground wave amplitude and roughly a 31.6-fold increase in radiated energy.