Przejdź do treści
Liczbnik
Current for 2026Methodology

Logarithm Calculator — log_b(x), ln and log10

The logarithm calculator computes the logarithm of a number to any base, as well as the natural logarithm (ln) and the common logarithm (log10). Enter a number x and a base b — the tool returns log_b(x) along with the natural and common logarithms. Useful in math, physics, chemistry (pH) and engineering (decibels).

Na tej stronie

How the calculator computes the logarithm

Change of base formula: log_b(x) = ln(x) / ln(b) Natural logarithm: ln(x) = log to base e (e ≈ 2.71828) Common logarithm: log10(x) = log to base 10 Conditions: x > 0, b > 0 and b ≠ 1. Results are rounded to 6 decimal places.

Example: number 100, base 10

For x = 100 and base b = 10: log_10(100) = ln(100) / ln(10) = 2, because 10² = 100. The natural logarithm ln(100) ≈ 4.60517, and the common logarithm log10(100) = 2.

Frequently asked questions

What is a logarithm?

The logarithm of a number x to base b (log_b(x)) is the exponent to which the base b must be raised to get x. For example log_2(8) = 3, because 2³ = 8. It is the inverse operation of exponentiation. The base must be positive and not equal to 1, and x must be positive.

What is the difference between ln and log10?

The natural logarithm ln(x) has base e ≈ 2.71828 (Euler’s number). The common logarithm log10(x) has base 10. They differ only in their base. The natural log dominates in math and physics, the common log in engineering and measurements.

How does the change of base formula work?

The formula is log_b(x) = ln(x) / ln(b), or equivalently log_b(x) = log(x) / log(b). It lets you compute a logarithm of any base using ln or log10. This calculator uses log_b(x) = ln(x) / ln(b).

For any positive base b ≠ 1, log_b(1) = 0, because any number raised to the power 0 equals 1 (b⁰ = 1). Regardless of the base, the logarithm of one is always zero.

Key rules: log(a·b) = log(a) + log(b), log(a/b) = log(a) − log(b), and log(aⁿ) = n·log(a). They turn multiplication into addition, which is why logarithms historically simplified calculations.

No — over the real numbers the logarithm exists only for x > 0. The log of zero tends to negative infinity, and the log of a negative number does not exist. That is why the calculator requires x > 0.

One raised to any power always gives 1, so you cannot obtain any other number. A logarithm with base 1 would be undefined. Therefore the base must satisfy b > 0 and b ≠ 1.

In the pH scale (acidity), the decibel scale (loudness), the Richter scale (earthquakes), finance (compound interest), computer science (algorithm complexity) and statistics. Wherever data spans many orders of magnitude.

A scale where equal spacing corresponds to multiplying by a constant factor (e.g. ×10) rather than adding. It fits both very small and very large values on one chart. Used in acoustics, seismology and exponential growth analysis.

It takes a number x and base b and computes log_b(x) = ln(x) / ln(b), the natural logarithm ln(x) and the common logarithm log10(x). Results are rounded to 6 decimal places. For x ≤ 0, b ≤ 0 or b = 1 it returns zeros.

The calculator is for educational and computational purposes. Results are rounded to 6 decimal places, so they may differ slightly from exact values. For x ≤ 0, b ≤ 0 or b = 1 the logarithm is undefined and the calculator returns zeros.

  • Roots and powers calculator

    Calculate square root, cube root, nth root or any power of a number. Free math calculator — no signup required, instant results.

  • Number base converter

    Convert numbers between binary, octal, decimal and hexadecimal. Free online number base calculator — instant conversion, no signup required.