Log Calculator: Logarithms in Any Base
A logarithm tells you what power a base must be raised to in order to give a number. Log base 10 of 1,000 is 3, because 10 cubed is 1,000. Enter a number and pick a base to find its log, natural log or binary log.
Type a number and the answer appears straight away.
log base 10 of 1,000310 raised to this power gives 1,000
- Check
- 10^3 = 1,000
- Change of base
- ln 1,000 / ln 10 = 6.907755279 / 2.302585093
- Common log (base 10)
- 3
- Natural log (base e)
- 6.90775527898
- Binary log (base 2)
- 9.96578428466
The math behind it: Log
log_b(x) = y means b^y = x; change of base: log_b(x) = ln x / ln b
Logs and powers are two views of the same fact. 2 to the power of 10 is 1,024, so log base 2 of 1,024 is 10, and 3 to the power of 4 is 81, so log base 3 of 81 is 4. Numbers between 0 and 1 have negative logs: log base 10 of 0.01 is -2, because 10 to the power of -2 is 1/100. Zero and negative numbers have no logarithm, and the base must be above zero and not 1.
Most calculators only have keys for log (base 10) and ln (base e, about 2.71828). Any other base comes from the change-of-base rule: divide the natural log of the number by the natural log of the base. For log base 3 of 81 that is 4.394449155 divided by 1.098612289, which is 4. The calculator shows that working, and gives the common, natural and binary logs of your number side by side. The natural log of 100 is 4.60517018599, and log base 10 of 50 is 1.69897000434.
Logarithms turn up wherever a scale grows by multiplying rather than adding: decibels, the pH scale, earthquake magnitudes and computer science, where log base 2 counts how many times a number can be halved. To go the other way and raise a number to a power, use the exponent calculator. The root calculator handles square and cube roots, the scientific notation converter writes very large and very small numbers by their power of ten, and the scientific calculator evaluates longer expressions.
Common questions
How do you calculate a log?
Ask what power the base needs to reach your number. Log base 10 of 1,000 is 3 because 10 x 10 x 10 is 1,000. When the answer is not a whole number, divide ln of the number by ln of the base: log base 10 of 50 is 1.69897000434.
What is the difference between log and ln?
log usually means base 10 and ln means base e, about 2.71828. The natural log of 100 is 4.60517018599, while the common log of 100 is 2. In some math and programming contexts, log without a base means ln, so check which is meant.
How do you find log base 2?
Divide the natural log of the number by the natural log of 2, or pick base 2 here. Log base 2 of 1,024 is 10, which is why 1,024 bytes make a kibibyte: it is 2 to the 10th power.
Can you take the log of a negative number or zero?
No, not as a real number. A positive base raised to any power is always above zero, so no power can produce zero or a negative. Numbers between 0 and 1 do have logs, and they are negative: log base 10 of 0.01 is -2.
You might also need
Checked and updated: