Logarithm Base Change Calculator

Logarithm Base Change Calculator

Emerging AI Skill PRO

Enter Calculation

Results

log2(10)
3.321928
using the change-of-base formula
ln(x) 2.302585
ln(b) 0.693147

Formula

logBase (b)Value (x)=ln⁡Value (x)ln⁡Base (b)\log_{{{\text{Base }(b)}}} {{\text{Value }(x)}} = \frac{\ln {{\text{Value }(x)}}}{\ln {{\text{Base }(b)}}}
Usage stats

Advertisement

Report an error on this page

What is the change-of-base formula?

Most calculators only have buttons for the natural logarithm \(\ln\) (base \(e\)) and the common logarithm \(\log_{10}\). The change-of-base formula lets you compute a logarithm in any base by converting it into a ratio of two logarithms you already know:

$$\log_b(x) = \frac{\ln(x)}{\ln(b)}$$

Here \(x\) = the value you take the logarithm of, and \(b\) = the base. The formula answers the question: to what power must I raise \(b\) to get \(x\)?

Change-of-base formula shown as a single log equal to ln(x) over ln(b)
The change-of-base formula rewrites log base b of x as ln(x) divided by ln(b).

How to use this calculator

Enter the value \(x\) and the base \(b\), then read the result. The value \(x\) must be greater than 0, and the base \(b\) must be positive and not equal to 1 (a base of 1 makes the denominator \(\ln(1)=0\), which is undefined).

Worked example

Suppose you want \(\log_{2}(8)\). Using natural logs:

$$\log_{2}(8) = \frac{\ln(8)}{\ln(2)} = \frac{2.079442}{0.693147} = 3$$

This makes sense because \(2^3 = 8\). The calculator shows both \(\ln(x)\) and \(\ln(b)\) so you can see the intermediate steps.

Advertisement

Common Logarithm Values Reference

The table below lists \(\log_b(x)\) for the three most widely used bases — base 2 (binary logarithm, \(\log_2\)), base \(e\) (natural logarithm, \(\ln\)), and base 10 (common logarithm, \(\log_{10}\)) — evaluated at several frequently encountered values of \(x\). Each entry is computed with the change-of-base formula \(\log_b(x) = \dfrac{\ln x}{\ln b}\). Exact whole-number results are shown as integers; all other values are rounded to four decimal places.

Value \(x\) \(\log_2(x)\) \(\ln(x)\) (base \(e\)) \(\log_{10}(x)\)
1 0 0 0
2 1 0.6931 0.3010
8 3 2.0794 0.9031
10 3.3219 2.3026 1
16 4 2.7726 1.2041
100 6.6439 4.6052 2
1000 9.9658 6.9078 3

Notice the exact integer results: \(\log_2 8 = 3\) because \(2^3 = 8\), \(\log_{10} 100 = 2\) because \(10^2 = 100\), and \(\log_b 1 = 0\) for every base because \(b^0 = 1\). Values that are not exact powers of the base produce irrational results, shown here rounded.

FAQ

Does the base of the intermediate logarithm matter? No. You can use \(\ln\), \(\log_{10}\), or any base for the top and bottom — as long as they match, the ratio is identical. This tool uses natural logarithms.

Why can the base not be 1? Because \(\log_1\) is undefined: \(\ln(1)=0\), so dividing by it is impossible. Every power of 1 equals 1, so it cannot produce other values.

Can x be negative or zero? No. Logarithms of zero or negative numbers are not defined for real numbers, so \(x\) must be greater than 0.

Last updated:

Most popular in Math and Statistics

View all Math and Statistics calculators