Skip to main content
CalcMax

Log Calculator

Range: 0.00 – 1,000,000,000,000,000

Range: 0.00 – 1,000,000,000,000,000

Result

3.000000

Logarithm

Natural logarithm (ln)
6.907755
Common logarithm (lg)
3.000000

A log calculator answers the question a logarithm actually asks: what power is that base raised to? Enter the argument and the base, and the page returns the logarithm for the base you chose together with the natural logarithm and the common logarithm, so the two named logs never have to be worked out separately. Nothing is fixed at log base 10: base 2, base e and any other positive base are accepted, and the change of base formula the page computes with is printed beside the result so the reader can check it by hand.

Logarithms that come out as whole numbers

BaseArgumentLogarithm
101002
1010003
101000005
283
2646
2102410
3814
4643
51253
7492

Every row is a power: the argument in the second column is the base in the first raised to the logarithm in the third, so 10 to the power of 5 is 100000 and 3 to the power of 4 is 81. Reading the table right to left is the page's real use — the argument is known and the exponent is the question. The rows are whole numbers on purpose. A table of decimal logarithms would need localizing, since 0.301030 is written 0,301030 in several languages, and whole numbers are written the same way everywhere, so this column is identical in all ten languages the site serves. Base e has no row because e is not a whole number; its logarithm is the natural logarithm column of the calculator above.

Formula

log_b(x) = ln x / ln b b^y = x ⟺ y = log_b(x)

x
The argument, the number the logarithm is taken of. It must be positive: the logarithm of 0 runs off to negative infinity, and the logarithm of a negative number is not a real number at all, so the page refuses both instead of printing a value that looks like an answer.
b
The base, the number being raised to a power. It has to be positive and it cannot be 1, because 1 raised to any power is still 1 — the only argument with a logarithm in base 1 is 1 itself, which is a statement about 1 rather than about the argument, so the equation stops carrying information and the page says so.
log_b(x)
The logarithm in the base you entered, the primary reading. It is the exponent that turns the base into the argument: log base 10 of 1000 is 3 because 10 cubed is 1000. Reading the page backwards, this is also the number of times the base has to be multiplied by itself, which is what makes the logarithm the natural tool for anything that multiplies repeatedly.
ln x
The natural logarithm, the logarithm in base e, where e is about 2.718281828. It is computed with the base fixed at e no matter what base is in the box, and it is the logarithm calculus is written in and the one a scientific calculator has a dedicated key for. Half-life and continuous growth are both read straight off it.
lg x
The common logarithm, the logarithm in base 10, also computed regardless of the base in the box. It is the logarithm of orders of magnitude, which is why it sits behind pH, decibels and the Richter scale. When the base you enter is 10, this column and the primary one print the same number, and that is the point rather than a duplication.

Worked examples

  1. The logarithm of 1000 in base 10

    1. Base 10, argument 1000 — a common logarithm
    2. 10 × 10 × 10 = 1000, so the base has to be multiplied by itself three times
    3. The logarithm is 3, and it is exact rather than rounded
    4. The common logarithm column prints 3 as well, because the base entered is already 10

    The case the page is most often opened with, and the cleanest demonstration that a logarithm is an exponent rather than a button. The natural logarithm of the same argument is 6.907755, and the two numbers are not rivals: they count the same fact in two different bases, and either one can be turned into the other by dividing by the logarithm of the new base.

  2. The logarithm of 1024 in base 2

    1. Base 2, argument 1024 — the base computers are counted in
    2. Doubling ten times: 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024
    3. So the logarithm is 10, and 2 to the tenth power is 1024 exactly
    4. The change of base formula gives the same thing: ln 1024 ÷ ln 2 = 6.931472 ÷ 0.693147

    The base-2 case is where the logarithm stops being a schoolroom object and becomes a countable one: the answer is how many doublings it takes, which is why it shows up in everything from binary prefixes to the depth of a balanced tree. Note that the common logarithm column prints 3.0103 rather than 3 — 1024 is a little more than a thousand, and that little more is exactly what the fractional part records.

  3. The logarithm of 0.5 in base 2

    1. The argument is less than 1, so the logarithm is negative
    2. 2 to the power of −1 is 1 ÷ 2 = 0.5
    3. The logarithm is −1 exactly
    4. Every column is negative here, including both named logs

    The half of the page that a reader is most likely to get wrong by hand: an argument below 1 gives a negative logarithm, and the logarithm passes through 0 exactly at an argument of 1. There is no argument with a logarithm of zero other than 1, at any base, which is the quickest way to check a suspicious answer.

Limitations

The argument must be a positive real number. Zero and negative arguments are refused rather than answered: the first runs to negative infinity and the second is a complex number, and neither is something this page can print. The base must be positive and must not be 1, for the reason given above rather than as a rounding-off of the domain. The page reports six decimals, which is a display limit and not a precision one — the arithmetic behind it runs at full double precision, and the change of base formula is computed in floating point, so a logarithm that ought to be a whole number can come out a hair away from it and is rounded back for display. This is a real-number tool: complex logarithms, the logarithms of complex arguments and the branch cuts that come with them are outside it. It also does not plot, differentiate or integrate anything, and the reference table lists only logarithms that come out as whole numbers — a table of decimal logarithms would have to be localized, since 0.301030 is written 0,301030 in several languages, and whole numbers are written the same everywhere.

Frequently asked questions

What is a logarithm?
It is the exponent that turns the base into the argument. Asking for the logarithm of 1000 in base 10 is asking what power 10 has to be raised to in order to give 1000, and the answer is 3. That is the whole definition: b to the power of log base b of x is x. Everything else about logarithms — the rules for products, quotients and powers — follows from that sentence, which is why the page prints the exponential form under the formula.
Why can't the base be 1?
Because 1 raised to any power is still 1. In base 1 the equation 1 to the power of y equals x has a solution only when x is 1, and then every y works, so the logarithm would not be a single number. The arithmetic shows the same thing from the other side: computing by the change of base formula divides by the logarithm of the base, and the logarithm of 1 is 0 in every base, so the division is by zero. The page refuses base 1 rather than returning whatever the floating point division happens to produce.
Can I take the logarithm of a negative number?
Not as a real number, and not on this page. The logarithm of a negative argument is complex, and this is a real-number tool. Zero is refused for a different reason: the logarithm of 0 is not undefined but unbounded, running off to negative infinity as the argument approaches 0 from above, and negative infinity is not a number this page can print. Both refusals name the argument that caused them.
What is the difference between ln and lg?
They are the same operation in two named bases. ln is the natural logarithm, in base e, where e is about 2.718281828; lg is the common logarithm, in base 10. The page prints both no matter which base you enter, because neither is a special case of the other and both are asked for by name. ln is the one that appears in calculus and in continuous growth, and lg is the one behind pH, decibels and any scale measured in orders of magnitude.
Why does the page print the same number twice?
Because you entered a base that matches one of the named logs. With a base of 10 the primary column and the common logarithm column hold the same number, and with a base of e the primary column and the natural logarithm column do. That is not a duplicated calculation but a confirmation: it is how a reader can see that the base they typed is the base of the log they had in mind. Any other base gives three different numbers.
How do I check a logarithm by hand?
Raise the base to the answer and see whether you get the argument back. For the logarithm of 1024 in base 2 the answer is 10, and 2 to the tenth power is 1024, so it checks. For a fractional answer the check still works but is harder to do mentally, which is where the change of base formula in the formula section earns its place: dividing two logarithms you already have is easier than searching for the exponent.

References

Related calculators