CZ
CalcyZone
Mathematics CalcyZone Calculator

Logarithm Calculator (Any Base)

Compute log of any number to any base, plus natural log, log₁₀ and log₂, using the change-of-base rule.

log base 10 of 100
2
ln x
4.60517
log₁₀ x
2
log₂ x
6.643856

Step-by-step working

  1. log_10(100) = ln 100 / ln 10 = 4.60517 / 2.302585 = 2

Mathematical Formula

log_b(x) = ln(x) / ln(b), for x > 0, b > 0, b ≠ 1.

Overview & Explanation

A logarithm answers “to what power must b be raised to get x?”. Any base can be computed from natural logs.

How It Works

  • Check x > 0 and valid base.
  • Divide ln x by ln b.

Practical Applications

  • pH, decibels and Richter scale.
  • Algorithm complexity (log₂ n).

What a logarithm answers

log_b(x) is the power you raise b to in order to get x. log10(1000) = 3 because 10^3 = 1000. The natural log ln uses base e (about 2.71828), so ln(10) = 2.302585.

To use any base, apply the change-of-base rule: log_b(x) = ln(x) / ln(b). For log2(50), that is 3.9120 / 0.6931 = 5.644, so 2 must be raised to about 5.64 to reach 50.

Rules and limits

log(a x b) = log a + log b, log(a / b) = log a - log b, and log(a^n) = n log a. Logarithms are defined only for positive x and a positive base other than 1. Log scales appear in pH, decibels and earthquake magnitudes.

Example 1: log₁₀ 100

Equals 2.

1

Inputs

Number x: 100 · Base b: 10

= entered
2

Step 1

log_10(100) = ln 100 / ln 10 = 4.60517 / 2.302585 = 2

3

log base 10 of 100

Result

= 2

Example 2: log₂ 1024

Equals 10.

1

Inputs

Number x: 1024 · Base b: 2

= entered
2

Step 1

log_2(1024) = ln 1024 / ln 2 = 6.931472 / 0.693147 = 10

3

log base 2 of 1024

Result

= 10

How it's calculated & sources

log_b(x) = ln(x) / ln(b), for x > 0, b > 0, b ≠ 1.

Frequently Asked Questions

Why can’t I take the log of a negative number?
For real numbers, b^y is always positive, so log is defined only for x > 0.
What is ln?
The natural logarithm, base e ≈ 2.71828.
Why can’t the base be 1?
1 raised to any power is 1, so the inverse is undefined.
Why is the log of 1 always 0?
Because any valid base raised to the power 0 equals 1.
What is log2 used for?
Computing, for example: log2(1024) = 10 tells you that 10 bits can represent 1024 values.