Log CalculatorFree online math calculator — instant results, no sign-up
Logarithm of a number in any base.
About the Log Calculator
The Log Calculator computes the logarithm of a positive value x with respect to any specified base b. It also simultaneously provides the natural logarithm ln(x) and the common base-10 logarithm log₁₀(x). This tool is commonly used by students, engineers, scientists, and programmers dealing with exponential growth, decibel scales, or algorithm complexity.
- Number
- The positive argument x for which to find the logarithm (must be greater than 0; default is 100).
- Base
- The positive base b of the logarithm, which must be greater than 0 and not equal to 1 (default is 10).
Formula and method
log_b(x) = ln(x) / ln(b); ln(x) = log_e(x); log₁₀(x) = log_10(x)
- xThe input number or argument
- bThe logarithm base
- ln(x)Natural logarithm of x using Euler's number e (approx. 2.71828) as the base
- log₁₀(x)Common base-10 logarithm of x
- log_b(x)Logarithm of x to the arbitrary base b, calculated via the change-of-base rule
The calculator uses the change-of-base formula by dividing the natural log of x by the natural log of b to determine log_b(x). It also directly calculates ln(x) and log₁₀(x) using standard JavaScript math functions. All computed values are rounded and formatted to 10 decimal places.
Worked example
These are the calculator's starting values and the results it actually produces for them.
Inputs
- Number100
- Base10
Results
- log_b(x)2
- ln(x)4.605170186
- log₁₀(x)2
How to use the Log Calculator
- 1Enter a positive value in the Number field.
- 2Enter a positive base different from 1 in the Base field.
- 3The tool calculates the natural logarithm ln(x) and the natural logarithm of the base ln(b).
- 4It outputs log_b(x) by dividing ln(x) by ln(b), alongside standalone values for ln(x) and log₁₀(x).
Reading your result
The primary result log_b(x) represents the exponent to which base b must be raised to equal x (i.e., b^(result) = x). The secondary results give the same quantity evaluated against the two most standard mathematical bases: base e (ln) and base 10 (log₁₀).
Limitations
The calculator is limited to real-number arithmetic and does not evaluate complex logarithms for negative numbers or zero. Setting the base to 1 results in division by zero, and non-positive inputs for x or b will produce undefined or NaN outputs.
Common questions
Why can't the base b be equal to 1 or negative?+
Raising 1 to any power always yields 1, so ln(1) is 0, which causes division by zero in the change-of-base formula. Negative bases lead to non-real complex numbers for non-integer powers.
What is the difference between ln(x) and log₁₀(x)?+
ln(x) is the natural logarithm based on Euler's constant e (approximately 2.71828), widely used in calculus and physics. log₁₀(x) is the common logarithm using base 10, commonly used in engineering and decibel scales.
How does the change-of-base formula work?+
The change-of-base rule states that log_b(x) = log_k(x) / log_k(b) for any valid base k. This calculator uses natural log (base e) internally to compute log_b(x) as ln(x) / ln(b).
Does the calculator save my information?+
Calculations run in your browser. While signed in, inputs and results are automatically recorded in account history; saving a result creates a separate saved record.
Further reading
You might also like
Scientific Calculator
Full scientific calculator with trig, logs, powers, memory and degree/radian modes.
Fraction Calculator
Add, subtract, multiply and divide fractions.
Percentage Calculator
Percent of a number, what percent, and percent change.
Random Number Generator
Generate random integers in a range.
Percent Error Calculator
Error between an observed and true value.
Exponent Calculator
Raise a base to any power.
Results are estimates for informational purposes and are not financial, medical or legal advice.