📊 Log Calculator
Calculate logarithm log_b(x) with any base. Also outputs natural log ln(x) and common log log10(x) — all in your browser.
Enter x and b to compute log_b(x), ln(x) and log10(x).
About the Log Calculator
This calculator computes the logarithm of x to any base b, plus the natural logarithm ln(x) and the common logarithm log10(x). Everything is computed locally in your browser using JavaScript's Math.log.
Formulas
- Logarithm with base b:
log_b(x) = ln(x) / ln(b)(change of base formula) - Natural logarithm:
ln(x) = log_e(x), base e ≈ 2.71828 - Common logarithm:
log10(x), base 10
Domain rules
The logarithm is only defined when x > 0 and b > 0 with b ≠ 1. The calculator validates these conditions before computing.
How to use
- Enter the argument x (must be positive).
- Enter the base b (must be positive and not equal to 1).
- Click Calculate. The result section shows
log_b(x),ln(x), andlog10(x).
Frequently asked questions
What is the difference between ln and log10? ln(x) uses Euler's number e as the base, common in calculus and natural growth. log10(x) uses 10 as the base, common in engineering, sound (decibels) and chemistry (pH).
Can the calculator handle base 2? Yes. Enter 2 in the base field to compute the binary logarithm log2(x).
Why does log(0) fail? The logarithm of zero (and of any non-positive number) is undefined in real arithmetic. The calculator returns an error in this case.
Why can't the base be 1? Because 1^y = 1 for any y, so log_1(x) cannot produce a unique answer.