A logarithm answers the question: to what power must the base be raised to get this number? Log base 2 of 8 is 3 because 2^3 = 8. Two bases are used so often they have their own names and buttons on every calculator: base 10 (log) and base e, about 2.71828 (ln, the natural logarithm). This page gives all three at once — your base, base 10, and ln — for the number you enter.
Logarithms exist only for positive numbers, and the base must be positive and not 1; the calculator says so plainly instead of printing a wrong answer. Log base 2 is the counting unit of computing (each doubling adds 1), base 10 orders magnitudes, and ln runs through growth, decay and interest mathematics. Nothing you enter leaves your browser.
3: 2 raised to the power 3 is 8, and the logarithm is that power.
Divide the natural logs: log base b of x equals ln(x) divided by ln(b). For log base 2 of 8 that is ln 8 / ln 2 = 3.
Log without a base written means base 10; ln is the natural logarithm, base e (about 2.71828). Ln of 10 is about 2.3026, while log base 10 of 10 is exactly 1.
No power of a positive base gives a negative result, so the question the logarithm answers has no answer for negative numbers (or zero) in real numbers.