Logarithm Calculator (Any Base)
Compute log of any number to any base, plus natural log, log₁₀ and log₂, using the change-of-base rule.
Step-by-step working
- log_10(100) = ln 100 / ln 10 = 4.60517 / 2.302585 = 2
Mathematical Formula
Overview & Explanation
A logarithm answers “to what power must b be raised to get x?”. Any base can be computed from natural logs.
How It Works
- Check x > 0 and valid base.
- Divide ln x by ln b.
Practical Applications
- pH, decibels and Richter scale.
- Algorithm complexity (log₂ n).
What a logarithm answers
log_b(x) is the power you raise b to in order to get x. log10(1000) = 3 because 10^3 = 1000. The natural log ln uses base e (about 2.71828), so ln(10) = 2.302585.
To use any base, apply the change-of-base rule: log_b(x) = ln(x) / ln(b). For log2(50), that is 3.9120 / 0.6931 = 5.644, so 2 must be raised to about 5.64 to reach 50.
Rules and limits
log(a x b) = log a + log b, log(a / b) = log a - log b, and log(a^n) = n log a. Logarithms are defined only for positive x and a positive base other than 1. Log scales appear in pH, decibels and earthquake magnitudes.
Example 1: log₁₀ 100
Equals 2.
Inputs
Number x: 100 · Base b: 10
Step 1
log_10(100) = ln 100 / ln 10 = 4.60517 / 2.302585 = 2
log base 10 of 100
Result
Example 2: log₂ 1024
Equals 10.
Inputs
Number x: 1024 · Base b: 2
Step 1
log_2(1024) = ln 1024 / ln 2 = 6.931472 / 0.693147 = 10
log base 2 of 1024
Result
How it's calculated & sources
log_b(x) = ln(x) / ln(b), for x > 0, b > 0, b ≠ 1.
Frequently Asked Questions
Why can’t I take the log of a negative number?
What is ln?
Why can’t the base be 1?
Why is the log of 1 always 0?
What is log2 used for?
Related Calculators
Exponent Calculator
Calculate powers, exponents, base raised to power x^y, and scientific exponentiation.
Scientific Notation Calculator
Convert numbers into standard scientific notation (a * 10^b) and engineering notation.
Quadratic Equation Solver
Solve ax² + bx + c = 0 for real or complex roots, with the discriminant, vertex and full step-by-step working.
Percentage Calculator
Calculate percentages, percentage change, and percentage of a number instantly.