Skip to main content

Calcu.fit

Log Calculator: Logarithm of Any Base, ln, log₂, and log₁₀

Use this free log calculator to find the logarithm of any positive number in any base. It handles the common log (base 10), the natural log (ln, base e), the binary log (base 2), and any custom base. It also finds antilogs, shows the log rules, and gives step-by-step working. No signup needed.

Log Calculator

Calculate logarithm

Enter a positive number greater than zero.

Logarithm result
3
log₁₀(1000)
Common log (log₁₀)3
Natural log (ln)6.907755
Binary log (log₂)9.965784
Change of base3

Calculation steps

  1. Identify x = 1000 and base b = 10.
  2. Use the change of base formula.
  3. log₁₀(1000) = 3.
  4. Check: 10³ = 1000.

Logarithm formula

log₁₀(x) = log(x) / log(10)

A logarithm tells you what power the base must be raised to in order to get the given number.

Common logarithm reference

log₁₀(1)0
log₁₀(10)1
log₁₀(100)2
log₁₀(1000)3
ln(e)1
log₂(8)3

The logarithm is defined only for positive numbers. The base must be greater than zero and cannot equal one. Results use standard double-precision calculations and are rounded for display.

How to Use This Log Calculator

  1. Enter the number (x) you want the logarithm of. It must be greater than 0.
  2. Choose the base (b): 10, e, 2, or your own. The base must be greater than 0 and not equal to 1.
  3. Click Calculate.

You can also go the other way: enter a base and a logarithm value to find the antilog, which is b raised to that value.

What You’ll See in Your Results

  • The logarithm log_b(x)
  • The same value using log₁₀, ln, and log₂, for comparison
  • The antilog, if you use that mode
  • Steps, including the change of base formula
  • A clear message if the input is outside the domain (for example, x ≤ 0)

What Is a Logarithm?

A logarithm answers the question: “What power do I raise the base to, to get this number?”

log_b(x) = y means b^y = x

For example, log₂(8) = 3, because 2³ = 8.

Logarithms are the inverse of exponents. They turn multiplication into addition, which is why they were used before calculators, and why they still matter in science, engineering, and computing.

The Three Common Logs

NameNotationBaseTypical use
Common logarithmlog(x) or log₁₀(x)10Science, pH, decibels, orders of magnitude
Natural logarithmln(x)e ≈ 2.71828Calculus, growth and decay, finance
Binary logarithmlog₂(x) or lb(x)2Computer science, information, binary search

Note: in some programming languages and advanced math books, “log” alone means the natural log. This page uses log for base 10 and ln for base e.

Logarithm Formulas and Rules

RuleFormulaExample
Definitionlog_b(x) = y ⇔ bʸ = xlog₂(8) = 3 ⇔ 2³ = 8
Product rulelog_b(xy) = log_b(x) + log_b(y)log(2) + log(50) = log(100) = 2
Quotient rulelog_b(x/y) = log_b(x) − log_b(y)log(1000) − log(10) = 2
Power rulelog_b(xⁿ) = n × log_b(x)log(5³) = 3 × log(5) ≈ 2.0969
Log of 1log_b(1) = 0ln(1) = 0
Log of the baselog_b(b) = 1log₂(2) = 1
Change of baselog_b(x) = ln(x) ÷ ln(b) = log(x) ÷ log(b)log₇(50) = ln 50 ÷ ln 7 ≈ 2.0104
Reciprocallog_b(1/x) = −log_b(x)log₂(1/8) = −3
Inverseb^(log_b(x)) = x and log_b(bˣ) = x10^(log 37) = 37

Warning: log(x + y) is not log(x) + log(y). And log(x) × log(y) is not log(xy).

Log Calculator Examples

All answers are rounded for display.

Example 1: Common Log (Base 10)

  • log(1000) = 3, because 10³ = 1000
  • log(0.01) = −2, because 10⁻² = 0.01
  • log(50) ≈ 1.69897
  • log(2) ≈ 0.30103

Example 2: Binary Log (Base 2)

  • log₂(8) = 3
  • log₂(1024) = 10
  • log₂(10) ≈ 3.321928
  • log₂(1/8) = −3

Example 3: Natural Log (Base e)

  • ln(e) = 1
  • ln(1) = 0
  • ln(2) ≈ 0.693147
  • ln(10) ≈ 2.302585
  • ln(100) ≈ 4.605170

Example 4: Other Bases

  • log₅(125) = 3, because 5³ = 125
  • log₃(81) = 4, because 3⁴ = 81
  • log₄(2) = 0.5, because 4^0.5 = 2
  • log₅(1/25) = −2

Example 5: Change of Base

Find log₇(50).

  • log₇(50) = ln(50) ÷ ln(7) = 3.9120 ÷ 1.9459 ≈ 2.0104
  • Check: 7^2.0104 ≈ 50

Example 6: Product Rule

log(2) + log(50) = 0.30103 + 1.69897 = 2 = log(100).

Example 7: Quotient Rule

log(1000 ÷ 10) = log(1000) − log(10) = 3 − 1 = 2.

Example 8: Power Rule

log(5³) = 3 × log(5) = 3 × 0.69897 = 2.09691. Check: log(125) = 2.09691.

Example 9: Antilog

The antilog is the inverse of the log.

  • Antilog₁₀(2.5) = 10^2.5 ≈ 316.23
  • Antilog_e(3) = e³ ≈ 20.0855
  • Antilog₂(5) = 2⁵ = 32

Example 10: Solving an Exponential Equation

Solve 2ˣ = 50.

  • Take the log of both sides: x = log₂(50) = ln(50) ÷ ln(2) ≈ 5.6439

Solve 3^(x + 1) = 20.

  • x + 1 = ln(20) ÷ ln(3) ≈ 2.7268
  • x ≈ 1.7268

Example 11: Doubling Time

How many years does it take for money to double at 5% a year?

  • 1.05ⁿ = 2, so n = ln(2) ÷ ln(1.05) ≈ 14.21 years

Example 12: pH

pH = −log₁₀[H⁺], where [H⁺] is the hydrogen ion concentration in mol/L.

  • [H⁺] = 1 × 10⁻⁷: pH = 7
  • [H⁺] = 3.2 × 10⁻⁴: pH = −log(0.00032) ≈ 3.49

Example 13: Decibels

  • A power ratio of 100 is 10 × log(100) = 20 dB.
  • An amplitude (voltage) ratio of 10 is 20 × log(10) = 20 dB.
  • Doubling the power adds about 3.01 dB, and doubling the amplitude adds about 6.02 dB.

Example 14: Number of Digits

How many digits does 2¹⁰⁰ have?

  • log(2¹⁰⁰) = 100 × log(2) ≈ 30.103
  • Digits = floor(30.103) + 1 = 31

In general, a positive whole number N has floor(log₁₀ N) + 1 digits. For example, 123,456 has floor(5.0915) + 1 = 6 digits.

Example 15: Binary Search

How many steps does a binary search need for a sorted list of 1,000,000 items?

  • log₂(1,000,000) ≈ 19.93
  • At most 20 steps

Example 16: Earthquake Scales

On a scale like the Richter scale, each whole-number step means 10 times the measured amplitude. A difference of 2 is 10² = 100 times the amplitude.

Common Logarithms Table

xlog₁₀(x)
10
20.3010
30.4771
40.6021
50.6990
60.7782
70.8451
80.9031
90.9542
101

Powers of 10 and Their Logs

Numberlog₁₀
0.001−3
0.01−2
0.1−1
10
101
1002
1,0003
1,000,0006

When a Logarithm Is Undefined

InputResult
log(0)Undefined. No power of a positive base gives 0. The value tends to negative infinity as x approaches 0.
log of a negative numberNot a real number. (It exists only in complex numbers.)
Base = 1Undefined, since 1 to any power is 1
Base ≤ 0Not allowed

The domain of log_b(x) is x > 0, and the base must satisfy b > 0 and b ≠ 1.

Where Logarithms Are Used

  • Chemistry: pH and pOH
  • Sound: decibels
  • Earthquakes: the Richter and moment magnitude scales
  • Finance: compound interest and doubling time
  • Computer science: algorithm speed (log n), binary search, and the number of bits needed
  • Physics and biology: exponential growth and decay, half-life
  • Statistics: log scales and log transformations of data

Common Mistakes

  • Taking the log of zero or a negative number. These are not allowed.
  • Using the wrong base. log means base 10 here, and ln means base e.
  • Splitting a log of a sum. log(x + y) ≠ log(x) + log(y).
  • Forgetting the change of base. To find log₇(50) on a calculator with only log and ln, divide: ln(50) ÷ ln(7).
  • Mixing up a log and its inverse. log₁₀(x) undoes 10ˣ.
  • Rounding too early. Keep full precision until the end.
  • Dropping the brackets. log(2x) is not the same as log(2)x.

Tips for Using a Log Calculator

  • Check that the number is greater than 0 and the base is positive and not 1.
  • Estimate first. log(1000) should be 3, and log(50) should be between 1 and 2.
  • Use ln for growth and decay with continuous rates, and log for powers of ten.
  • To solve an exponential equation, take the log of both sides.
  • Use change of base for any base your calculator does not have.
  • Remember that log₂(x) = log₁₀(x) ÷ 0.30103, or ln(x) ÷ 0.693147.
  • Check answers with the inverse: if log_b(x) = y, then b^y should equal x.

Log Calculator vs. Other Tools

  • Scientific Calculator: powers, roots, trig, logs, and more.
  • Exponent Calculator: powers and exponents.
  • Half-Life Calculator: exponential decay and half-life.
  • Quadratic Formula Calculator: solve ax² + bx + c = 0.
  • Binary Calculator: binary arithmetic and conversion.

Frequently Asked Questions (FAQ)

What is a logarithm?

A logarithm tells you what power a base must be raised to in order to get a number. log₂(8) = 3 because 2³ = 8.

Ask what power of the base gives the number. For other values, use a calculator, or use the change of base formula: log_b(x) = ln(x) ÷ ln(b).

log usually means base 10, and ln means base e (about 2.71828). For example, log(100) = 2 and ln(100) ≈ 4.605.

Use log₂(x) = ln(x) ÷ ln(2). For example, log₂(10) = 2.302585 ÷ 0.693147 ≈ 3.3219.

Use the change of base formula. For log₇(50), it is ln(50) ÷ ln(7) ≈ 2.0104.

It is 0 for every valid base, because any number to the power of 0 is 1.

It is undefined. No power of a positive base gives 0.

Not in real numbers. It is only possible with complex numbers.

 Product: log(xy) = log x + log y. Quotient: log(x/y) = log x − log y. Power: log(xⁿ) = n log x.

 It is the inverse of a log. The antilog of y in base b is b^y. For example, the base-10 antilog of 2.5 is 10^2.5 ≈ 316.23.

Take the log of both sides and use the power rule. For 2ˣ = 50, x = log(50) ÷ log(2) ≈ 5.644.

Yes. It is free, with no registration and no limits.

Results are calculated with standard double precision and shown to about 12 significant digits. Whole-number answers are exact.

Disclaimer

This calculator is for general and educational use. Results are shown to about 12 significant digits and may contain tiny rounding differences. Check important results yourself before using them for work in engineering, chemistry, finance, or safety, and follow your teacher’s rules on the form of the answer.