CCalculate.Studio

Log Calculator

A logarithm answers the question: to what power must the base be raised to produce a given number? This calculator computes the logarithm of a positive number in any valid base you choose, and also shows the natural logarithm (ln, base e), the common logarithm (log10) and the binary logarithm (log2). For example, log base 10 of 100 is 2, because 10^2 = 100.

최종 검토일: 2026-07-07

입력 정보

결과

Log base b of x2
Natural log (ln)4.61
Common log (log10)2
Binary log (log2)6.64

Understanding logarithm results

The three standard bases answer different questions about the same number. The table below shows them for x = 100.

LogarithmBaseValue for x = 100Typical use
lne = 2.71828...4.60517Calculus, continuous growth and decay
log10102Scientific notation, decibels, pH, orders of magnitude
log226.643856Computer science, information theory (bits)
  • Logarithms are undefined for zero and negative numbers, and the base must be positive and not equal to 1.
  • log_b(1) = 0 in every base, because b^0 = 1; and log_b(b) = 1, because b^1 = b.
  • A logarithm is negative when the input is between 0 and 1 — for example, log_10(0.01) = -2.
  • Notation varies by field: in mathematics 'log' without a base often means ln, while in engineering and on most calculators it means log10. ISO 80000-2 recommends the explicit notations ln, lg and lb.

What is a logarithm?

The logarithm of a number x in base b, written log_b(x), is the exponent to which b must be raised to obtain x: if b^y = x, then log_b(x) = y. For example, log_10(100) = 2 because 10^2 = 100, and log_2(8) = 3 because 2^3 = 8. Logarithms are the inverse of exponentiation.

Three bases dominate in practice. The natural logarithm (ln) uses base e (approximately 2.71828) and is standard in calculus, growth and decay models, and the sciences. The common logarithm (log10) underlies scientific notation and measurement scales such as decibels and pH. The binary logarithm (log2) is used throughout computer science, from algorithm analysis to information theory, where it measures bits.

Logarithms are defined only for positive numbers, and the base must be positive and not equal to 1. There is no real number y for which b^y is zero or negative, which is why log(0) and logs of negative numbers are undefined, and a base of 1 fails because 1 raised to any power is always 1.

How to use this log calculator

  1. Enter the number x whose logarithm you want. It must be positive.
  2. Enter the base b. It must be positive and not equal to 1; common choices are 10, 2 and e (approximately 2.71828).
  3. Read log base b of x, computed with the change-of-base formula.
  4. Compare with the natural, common and binary logarithms of the same number, which are shown alongside.

The change-of-base formula

log_b(x) = y means b^y = x
Change of base: log_b(x) = ln(x) / ln(b)
log_b(xy) = log_b(x) + log_b(y); log_b(x/y) = log_b(x) - log_b(y); log_b(x^k) = k log_b(x)
Example: log_2(8) = ln(8) / ln(2) = 3; log_10(100) = 2

Any logarithm can be computed from logarithms in another base: log_b(x) = ln(x) / ln(b). This change-of-base identity is how calculators evaluate logarithms in arbitrary bases using only the natural logarithm.

Worked example: log_2(8). Compute ln(8) = 2.079442 and ln(2) = 0.693147; their quotient is 2.079442 / 0.693147 = 3. Check: 2^3 = 8. Another example: log_10(100) = 2, since 10^2 = 100; the calculator also reports ln(100) = 4.60517 and log_2(100) = 6.643856 for the same input.

The key algebraic identities follow from the definition: the log of a product is the sum of the logs, log_b(xy) = log_b(x) + log_b(y); the log of a quotient is the difference; and the log of a power pulls the exponent out front, log_b(x^k) = k log_b(x). These rules turn multiplication into addition, which was the original motivation for logarithm tables.

Common mistakes

  • Taking the log of zero or a negative number — logarithms are defined only for positive inputs.
  • Assuming log(x + y) equals log(x) + log(y); the sum rule applies to products, not sums: log(xy) = log(x) + log(y).
  • Confusing which base 'log' means: many calculators and programming languages differ (in JavaScript, Math.log is the natural log).
  • Writing log_b(x^k) as (log_b x)^k — the power rule moves the exponent out front as a multiplier, not onto the log.
  • Using base 1, for which no logarithm exists, since 1 raised to any power is 1.

자주 묻는 질문

What is the logarithm of 100 in base 10?

log_10(100) = 2, because 10 raised to the power 2 equals 100. The common logarithm counts factors of ten, so log_10(1000) = 3 and log_10(0.01) = -2.

How do I calculate a log in a base my calculator doesn't have?

Use the change-of-base formula: log_b(x) = ln(x) / ln(b), or equivalently log_10(x) / log_10(b). For example, log_5(125) = ln(125) / ln(5) = 4.828314 / 1.609438 = 3, and indeed 5^3 = 125.

What is the difference between ln and log?

ln always denotes the natural logarithm, base e (approximately 2.71828). 'log' is ambiguous: in pure mathematics it often means the natural log, while in engineering, chemistry and on most handheld calculators it means base 10. The ISO 80000-2 standard recommends writing ln for base e, lg for base 10 and lb for base 2 to avoid ambiguity.

Why can't I take the log of a negative number?

Because no real power of a positive base produces a negative result: b^y is positive for every real y when b > 0. Consequently log_b(x) has no real value for x <= 0. (In complex analysis logarithms of negative numbers can be defined, but they are multi-valued and outside the scope of real-valued calculators.)

What is log2 used for?

The binary logarithm log_2 measures how many doublings reach a number, which makes it fundamental in computer science: a binary search over n sorted items takes about log_2(n) steps, and log_2 gives the number of bits needed to represent n distinct values. For example, log_2(1024) = 10, so 10 bits address 1024 values.

What does a logarithmic scale mean?

A logarithmic scale spaces values by equal ratios rather than equal differences: each step multiplies by a constant factor. Decibels, the Richter magnitude scale and pH are logarithmic — an increase of 1 pH unit means a tenfold decrease in hydrogen-ion concentration. Log scales make quantities spanning many orders of magnitude readable on one axis.

참고 자료

  1. Weisstein, Eric W. "Logarithm." MathWorld — A Wolfram Web Resource. mathworld.wolfram.com.
  2. ISO 80000-2:2019. Quantities and units — Part 2: Mathematics (standard notation for ln, lg, lb).
  3. Abramowitz M, Stegun IA (eds). Handbook of Mathematical Functions. National Bureau of Standards, 1964 (Chapter 4: elementary transcendental functions).

대수 · 전체 계산기

관련 계산기