Formula: Logarithm Mathematical Identity
- argumentX: Argument X (numeric parameter)
- baseB: Base B (numeric parameter)
Apply the logarithmic change-of-base identity log_b(x) = ln(x) / ln(b).
The ln, log₁₀ and log₂ lines always use their own fixed bases. Only the top line, labelled log_b(x), uses the base you typed. Change the base from 2 to 8 with x = 64 and the top line goes from 6 to 2 while the three lines underneath stay at 4.159, 1.806 and 6.
The page does not print a separate antilog line. Raise the base to the logarithm on any scientific calculator: 10 to the power 1.806 gives about 64, and 2 to the power 6 gives exactly 64. You can also work backwards with this page by trying x values until the top line matches the logarithm you have.
Yes, type it as a decimal such as 2.718281828. With x = 100, the top line then reads 4.605, which matches the natural log line exactly. There is no need to do this in practice, because the ln line already gives the natural logarithm of whatever x you enter.
The page refuses it and shows a message that the logarithm is only defined for x above zero. That is the correct answer: no real power of a positive base gives a negative number. The same message appears for x = 0. If you meant a small positive fraction, check that the minus sign was not a typing slip.
It flips the sign compared with base 2. Log base 0.5 of 8 is minus 3, because a half raised to the minus 3 is 8, and the page returns exactly that. For x = 0.25 it returns 2. Bases between 0 and 1 are valid; only zero, negative bases and a base of exactly 1 are refused.
For a final answer, three decimals, as the result line shows, are enough for most coursework. If you will raise the base to the logarithm again, use the four-decimal figure in the explanation line, such as 6.585 for x = 96 or 5.2479 for x = 38, so that the value you recover is close to the original.
Yes. For a whole number, the digit count is the whole part of log₁₀ plus one. log₁₀(64) is 1.806, the whole part is 1, and 64 has two digits. log₁₀(96) is 1.982, still two digits. Once x reaches 100, the common log reaches 2 and the count becomes three.
Because 96 is not a power of 2. It sits between 64, which is 2 to the 6, and the next power of 2. The answer, 6.585, says 96 is 2 raised to a little more than six and a half. Only exact powers of the base give whole number logarithms, which is why 64 returns a clean 6.
On almost every handheld calculator, the log key gives the common log, base 10, and the ln key gives the natural log, base e. For x = 64 that is 1.806 against 4.159 on this page. Some maths books write log for the natural log, so check the convention your course uses.
Yes, if the base is between 0 and 1. Log base 0.5 of 8 is minus 3 on this page. For any base above 1, though, a negative answer always means x was a fraction between 0 and 1, such as 0.25 in base 2, which gives minus 2. Check which kind of base you entered before reading the sign.
Very much. log_2(64) is 6, but log_64(2) is one sixth, about 0.167. Swapping them gives the reciprocal, which is easy to miss in a timed test. Put the number you are taking the log of in Argument X and the base in Base B, and read the explanation line, which prints them back in the form log_b(x) so you can see which is which.
A logarithm answers one question: what power do I raise the base to in order to get this number? With the defaults, x is 64 and the base b is 2. Two multiplied by itself six times is 64, so the top line reads 6. That is all log_2(64) = 6 means.
The page then gives three more lines for the same x. The natural log ln(64) is 4.159, the common log log₁₀(64) is 1.806 and the binary log log₂(64) is 6. These are the same question asked with three fixed bases: e (about 2.718), 10 and 2. Because the default base is already 2, the top line and the binary line match.
Reading the lines backwards is the antilog. If log₁₀(64) is 1.806, then 10 raised to 1.806 gives back about 64. If ln(64) is 4.159, then e raised to 4.159 gives back about 64. The calculator does not print an antilog line of its own, even though its description mentions b^y, so do that step on a scientific calculator: raise the base to the result and you should land on your original x. It is the quickest way to check any logarithm you have been given.
This catches people out. Change the base from 2 to 8 and the top line drops from 6 to 2, because 8 squared is 64. Change it to 4 and the top line reads 3, because 4 cubed is 64. But the natural, common and binary lines do not move at all. They are fixed-base logs of x, and the base box has nothing to do with them.
So if you want log base 3 of 81, set x to 81 and b to 3. The top line gives 4. The three lines underneath will show ln(81) = 4.394, log₁₀(81) = 1.909 and log₂(81) = 6.34, which are correct but answer different questions. Read the line that matches the base your problem uses.
The upside is that one entry gives you four logarithms of the same number. If a homework problem asks for log₂ and log₁₀ of the same value, you can read both from a single run.
Most calculators only have ln and log₁₀ keys. To get a logarithm in any other base, you divide: log_b(x) = ln(x) / ln(b). That is the formula on the page, and it is the whole engine.
You can check the default by hand. ln(64) is 4.1589 and ln(2) is about 0.6931. Divide and you get 6. The identity works with common logs too: log₁₀(64) is 1.8062, log₁₀(2) is about 0.3010, and 1.8062 divided by 0.3010 is again 6. Any base you like works for the division, as long as you use the same one top and bottom.
The identity also explains why the four lines move together when x changes. Each is ln(x) divided by a constant. The natural log divides by 1, the binary log by 0.6931, the common log by about 2.3026. So the binary log is always about 1.443 times the natural log, and the natural log is always about 2.303 times the common log. You can see it in the default: 4.159 is roughly 2.303 times 1.806.
One consequence: since ln(b) sits in the denominator, a base whose natural log is zero breaks the formula. That base is 1, which is why every textbook excludes it.
The presets step x through 38, 64 and 96 with the base held at 2. The top line reads 5.248, then 6, then 6.585. Tripling x from 32 to 96 only adds about 1.585 to the binary log, because log₂(3) is 1.585. Logarithms turn multiplication into addition, so each doubling of x adds exactly 1 to the base 2 answer.
This is the property that makes logs useful in practice. A number that is 64 times bigger than another has a binary log that is only 6 more. In computing, log₂ of a list length tells you roughly how many halving steps a binary search needs. For 64 items that is 6 steps; for 96 items it is just under 7.
The natural log moves the same way but in smaller steps. Between 38 and 96 it rises from 3.638 to 4.564. The common log goes from 1.58 to 1.982. Both curves flatten as x grows, which is why a log scale on a chart squeezes large values together and spreads small ones out.
An x between 0 and 1 is valid and gives a negative answer, because you need a negative power to shrink the base. Set x to 0.25 with base 2 and the top line reads minus 2, since 2 to the minus 2 is a quarter. The page also shows ln(0.25) = minus 1.386 and log₁₀(0.25) = minus 0.602.
At x = 1 every logarithm is zero, whatever the base. Any base raised to the power 0 is 1. Put in x = 1 and base 7 and all four lines read 0, which is a handy sanity check that the page is reading your inputs. It also explains why a log scale on a chart has no zero: the value 1 sits where the axis reads 0, and smaller values run off to the left without ever reaching it.
Negative answers are not a sign that something went wrong. They only appear when x is less than 1 (for bases greater than 1), and they mean the number is a fraction of the base rather than a multiple of it.
A real logarithm only exists when x is greater than zero and the base is positive and not equal to 1. The page enforces both rules. Enter x as zero or a negative number and it shows a message that the logarithm is only defined for x above zero, with no result. Enter a base of 1, zero or a negative number and it explains that the base must be above zero and not equal to 1.
Each rule has a reason. No power of a positive base can produce zero or a negative number, so those x values have no answer. A base of 1 stays at 1 whatever power you raise it to, so it can never reach any other x, and its natural log of zero would sit in the denominator of the change-of-base formula.
Bases between 0 and 1 are allowed and behave in a way that surprises people. Set x to 8 and the base to 0.5 and the top line reads minus 3, because a half raised to the minus 3 is 8. Set x to 0.25 with the same base and the answer is 2, since a half squared is a quarter. Compare that with base 2, where 0.25 gives minus 2.
So with a base below 1 the signs flip: numbers greater than 1 have negative logs and fractions have positive ones. The ln, log₁₀ and log₂ lines are unaffected, because their bases are fixed. Fractional bases are rare outside textbook exercises, but if you meet one, this page handles it.
Which line you need depends on where the problem comes from. Calculus, growth and decay, compound interest with continuous compounding and most physics formulas use the natural log, ln. If a formula has e in it, the matching log is ln.
Chemistry pH, sound levels in decibels and the orders-of-magnitude thinking used in science all use the common log, log₁₀. Its value is roughly the number of digits before the decimal point, minus one. log₁₀(64) is 1.806, and 64 has two digits.
Computer science uses the binary log, log₂. It counts bits and halvings. A number with a log₂ of 6 needs 6 bits to count up to, and a sorted list of that many items can be searched in about 6 steps.
Writers are inconsistent about notation. In maths texts, a bare 'log' often means ln; on calculators and in chemistry it usually means log₁₀; in computer science it often means log₂. If a problem says 'log' without a base, check which convention the source uses before reading off a line.
A common reason to open this page is to solve for an exponent. Say you need 2 to some power to equal 38. Put 38 in x and 2 in the base, and the answer, 5.248, is the exponent. Check it by raising 2 to 5.248 on a scientific calculator.
For a growth question, such as how many doublings it takes to go from 1 to 96, use base 2 and x = 96. The answer is 6.585 doublings. Multiply by the doubling period, if you know it, to get time.
Rounding matters if you plug a log back into a power. The top line shows three decimal places. The explanation line under the result gives four, such as 5.2479 for the lower preset. Use the four-place figure when you need to recover x accurately, because small errors in an exponent grow when you raise a base to it. With base 10, an error of 0.001 in the exponent already shifts the recovered number by about a quarter of a percent.