Updated · Built and checked by the PlinzoTools team, formulas tested against published sources
Calculate the logarithm of any value to any base.
3.000000
A logarithm answers the question "what exponent do I need to raise the base to, to get this value?" This tool computes log base b of x for any positive value and base.
Enter the value (x) and the base (b), both greater than 0 (base cannot equal 1). The result appears instantly.
logb(x) = ln(x) / ln(b)
This lets the calculator compute any base's logarithm using the natural logarithm (ln), which is what most computing environments provide directly.
The result is shown to six decimal places. It answers the question "what power of the base gives this value?" If the answer is a whole number, the value is an exact power of the base. If it is a decimal, the value falls between two powers. For example, log base 10 of 500 is about 2.69897, which tells you 500 lies between 10^2 = 100 and 10^3 = 1,000, closer to the upper end on a logarithmic scale.
log base 3 of 81 = 4, since 3^4 = 81
log base 10 of 0.01 = -2, since 10^-2 = 0.01
log base 2 of 20 = ln(20) / ln(2) = 2.995732 / 0.693147 = 4.321928
The third example shows why the result can be a long decimal: 20 is not a power of 2, so the exponent sits between 4 (which gives 16) and 5 (which gives 32). You can confirm the answer by entering the base raised to the result: 2^4.321928 is approximately 20.
These rules are the reason logarithms were historically used to turn hard multiplications into additions, and they remain central in algebra and calculus. You can test any of them by computing each side separately with the tool and comparing.
Many real measurements are logarithmic because they cover huge ranges. Sound levels in decibels, earthquake magnitudes, and pH in chemistry all rest on logarithmic scales. In computing, log base 2 tells you how many bits are needed to represent a number of options or how many times you can halve a list. In finance and science, logarithms help solve for the time in compound growth or decay problems, such as finding how many periods it takes for a quantity to double.
Suppose a hypothetical quantity grows by 5 percent per period and you want to know how many periods it takes to double. You need to solve 1.05^n = 2, so n = log base 1.05 of 2. Enter value 2 and base 1.05. The result is roughly 14.2, meaning about 14 periods, with the fractional part showing the doubling happens partway through the fifteenth. This works only when the growth rate stays constant, which real situations rarely guarantee, so treat it as an estimate.
Log base 10 (common log) uses 10 as the base; natural log uses Euler's number e (~2.71828) as the base. Enter 10 or 2.71828 as the base here to compute either.
Logarithms are only defined for positive real values and positive bases (not equal to 1) -- there's no real exponent that produces a non-positive result from a positive base.
Enter your number as the value and 2 as the base. The result tells you the power of 2 that gives the number, which is useful in computing for counting bits or halving steps.
Any valid base raised to the power 0 equals 1, so the exponent needed to reach 1 is always 0, whatever the base.
Yes. For a base greater than 1, any value between 0 and 1 gives a negative logarithm. For instance, log base 10 of 0.1 is -1, since 10^-1 = 0.1.
Raise the base to the result using the Exponent Calculator. If the tool says log base 5 of 50 is about 2.4307, then 5^2.4307 should return roughly 50.
Reference: NIST Weights and Measures