Log Calculator

Compute logarithms in any base — common log (log₁₀), natural log (ln), binary log (log₂), or any custom base — with full change-of-base working.

Logarithm inputs

Results update live as you type.

choose a preset or custom
must be > 0
x
110,000
used when "Custom" selected
b
220
Equivalent exponential10^3 = 1000
Live calculation

log₁₀(1000)

3

because 10^3 ≈ 1000

log₁₀(x)

3

common log

ln(x)

6.907755

natural log (base e)

log₂(x)

9.965784

binary log

log_b(x)

3

current base b = 10

Curve y = log_b(x) with your point highlighted
IdentityFormExample
Productlog(xy) = log x + log ylog(6) = log 2 + log 3
Quotientlog(x/y) = log x − log ylog(5/2) = log 5 − log 2
Powerlog(xⁿ) = n · log xlog(2⁵) = 5 log 2
Identitylog_b(b) = 1log₁₀(10) = 1
Zerolog_b(1) = 0ln(1) = 0
Change of baselog_b(x) = ln x / ln blog₂(8) = ln 8 / ln 2 = 3

The Definition

How logarithms work

A logarithm is the inverse of exponentiation. The statement log_b(x) = y is exactly the same as b^y = x. So log₁₀(1000) = 3 because 10³ = 1000. Calculators normally only have log₁₀ and ln built in — to compute a log in any other base you use the change-of-base formula: log_b(x) = ln(x) / ln(b). Logs have neat properties that turn multiplication into addition (the original purpose of slide rules and log tables) and turn powers into multiplication.

Working for your inputs

log₁₀(1000) = ln(1000) / ln(10) = 6.90776 / 2.30259 = 3
b base (10)
x argument (1000)
y log_b(x) (3)
b^y inverse check (1000)
Working (change of base):
ln(x) = ln(1000) = 6.907755
ln(b) = ln(10) = 2.302585
log₁₀(1000) = ln(x) / ln(b) = 3

Inverse check:
10^3 = 1000 ≈ 1000 ✓

About This Tool

What Is a Log Calculator?

A log calculator computes logarithms in any base. The three logs that show up in everyday work are the common log (base 10, written log or log₁₀), the natural log (base e ≈ 2.71828, written ln), and the binary log (base 2, written log₂ or lb). This tool returns all three at once, plus your custom base result, every time you change the argument.

Logarithms were invented by John Napier in 1614 as a way to turn the painful multiplication of long decimal numbers into much easier addition: log(a · b) = log(a) + log(b). For 350 years scientists and engineers carried log tables and slide rules everywhere. Today the practical use has shifted — logs underpin the decibel scale for sound, the Richter scale for earthquakes, the pH scale in chemistry, information theory (entropy in bits = log₂), and algorithm analysis in computer science (O(log n) is binary search; O(n log n) is mergesort).

Mathematically, this calculator uses JavaScript's Math.log (natural log) and Math.log10/Math.log2 for the canonical bases, with the change-of-base formula log_b(x) = ln(x) / ln(b) for any custom base. Results are exact up to IEEE 754 double precision — about 15–17 significant digits.

Use this free log calculator for homework, physics, chemistry, finance (doubling time = ln 2 / r), computer science, or any time you need to invert an exponential. Everything runs in your browser — no sign-up, no tracking, no data leaves your device.

Any Base

log₁₀, ln, log₂ presets plus any custom base you supply.

All Three at Once

Common, natural, and binary log shown side by side.

Inverse Check

Confirms b^y = x — a built-in sanity verification.

Change-of-Base Working

Step-by-step ln(x) / ln(b) so you can show your work.

100% Free & Private

No account, no tracking — every calculation runs locally in your browser.

Curve Visualisation

Plot of y = log_b(x) with your specific point marked.

How to Use This
Log Calculator

Pick a base, type the argument, read the answer.

1

Pick the Base

Choose log₁₀, ln, log₂, or Custom. The first three are by far the most common — pick one before reaching for a custom base.

2

Enter the Argument

Type the number you want the log of, into x. The argument must be strictly positive — there is no real logarithm of zero or negative numbers.

3

Set a Custom Base (Optional)

If you picked "Custom", type the base b. Any positive number except 1 works. Common choices outside the presets: log₃ for ternary, log₁₆ for hex digits.

4

Read the Answer

The summary card shows log_b(x) in your chosen base. Stat tiles show all three standard bases — useful for cross-checking when a textbook asks for one specifically.

5

Inspect the Curve

The chart shows y = log_b(x) with your point marked. Note how the curve rises steeply near x = 0 and then flattens — logs grow slowly.

6

Check the Working

The formula card shows the change-of-base arithmetic and verifies b^y = x — exactly the steps you would write out in a homework solution.

Reference

Common Logarithm Values (log, ln and log₂)

These are the values people look up most often. Powers of the base always give whole-number answers: log 1,000,000 = 6 because 10⁶ = 1,000,000, and log₂ 1024 = 10 because 2¹⁰ = 1024. Every other input gives an irrational decimal, shown here to six places.

Common logarithm (base 10)
xlog₁₀(x)xlog₁₀(x)
10101
20.3010301002
2.50.3979401,0003
30.47712110,0004
50.6989701,000,0006
0.1−110,000,0007
Natural log (ln, base e) and binary log (log₂)
ExpressionValueExpressionValue
ln 10log₂ 21
ln 20.693147log₂ 83
ln e1log₂ 164
ln 102.302585log₂ 325
log₃ 814log₂ 103.321928

How to calculate a log on a calculator

  1. Base 10: press log, enter the number and press equals. For example, log 1000 = 3.
  2. Natural log: press ln, enter the number and press equals. For example, ln 10 = 2.302585.
  3. Any other base: use the change-of-base formula, logb(x) = ln(x) ÷ ln(b). For log₂ 32, compute ln 32 ÷ ln 2 = 3.465736 ÷ 0.693147 = 5.

Decibel example: expressions like 20 log 3 come from signal gain in dB. log₁₀ 3 = 0.477121, so 20 × 0.477121 = 9.542 dB.

Logarithms undo exponents. To go the other way, use the exponent calculator. For very large or very small numbers, the scientific notation calculator shows the power of ten directly. For a full keypad, open the scientific calculator.

Frequently Asked Questions

Everything you need to know about logarithms — bases, identities, and where they appear.

A logarithm answers the question "what power do I raise the base to in order to get this number?". log_b(x) = y means b^y = x. So log₁₀(1000) = 3 because 10³ = 1000, and log₂(32) = 5 because 2⁵ = 32. Logs are the inverse of exponentials.

By convention, log (with no base shown) means log₁₀ in engineering and elementary maths, and ln means the natural logarithm with base e ≈ 2.71828. In pure mathematics and physics, "log" sometimes means ln — so always check context. In computer science, "log" often means log₂. This calculator shows all three together to avoid ambiguity.

To compute log_b(x) using only logs your calculator natively supports (typically log₁₀ and ln): log_b(x) = log_k(x) / log_k(b) for any valid base k. Using ln: log_b(x) = ln(x) / ln(b). This is how this tool computes custom-base logs internally.

No — the real logarithm log_b(x) is only defined for x > 0. As x → 0⁺, log x → −∞; the log of zero or any negative number is undefined in the real numbers. Complex logarithms extend the definition (log(−1) = iπ for ln) but most calculators, including this one, work in the reals.

log_b(1) = 0 for every valid base b, because b⁰ = 1. Similarly log_b(b) = 1 (since b¹ = b), and log_b(b^n) = n. These three identities — log(1) = 0, log(b) = 1, log(b^n) = n — are the easiest sanity checks when working with logs.

The base e ≈ 2.71828 is "natural" because the derivative of ln(x) is simply 1/x — the cleanest derivative of any logarithm. It also arises naturally in continuous growth: anything compounding at rate r over time t becomes e^(rt). Base 10 is a convention from our number system; base 2 from binary; but base e is the one that falls out of calculus.

Almost everywhere quantities span many orders of magnitude. pH = −log₁₀[H⁺] (chemistry). Decibels use 10·log₁₀ of a power ratio (sound, signal). The Richter scale for earthquakes is log₁₀ of seismic wave amplitude (each "magnitude" is 10× larger). Information in bits = log₂(possibilities). Algorithm analysis — binary search runs in O(log n) time. Compound interest doubling time ≈ ln(2)/r.

The three "laws of logs": log(xy) = log x + log y (product rule), log(x/y) = log x − log y (quotient rule), and log(xⁿ) = n · log x (power rule). These are why logs were so useful before calculators — they turn multiplication into addition, division into subtraction, and powers into multiplication.

Most logs are irrational and have non-terminating decimal expansions — for example log₁₀(2) ≈ 0.30103…. Only special inputs (like x being a power of b) give integer or clean rational answers. The calculator reports 4–8 decimal places, accurate to IEEE 754 double precision.

They are inverse functions: log_b(b^x) = x and b^(log_b x) = x. Graphically, y = log_b(x) is the reflection of y = b^x across the line y = x. Anywhere you see a log, you can rewrite it as an exponential, and vice versa — useful when solving equations involving either.

Yes — any positive b ≠ 1 is a valid base. For 0 < b < 1, log_b(x) is a decreasing function: log_b(1) = 0, but log_b(x) becomes negative for x > 1. The case b = 1 is excluded because 1^y = 1 for all y, so log₁ has no inverse.

Calculations use JavaScript's Math.log / Math.log10 / Math.log2, which are implemented in IEEE 754 double precision — accurate to about 15–17 significant digits. For typical use this is far more precision than any physical measurement could justify. For arbitrary-precision computation you would need a big-decimal library.

Sources & methodology

  1. NIST DLMF §4.2 – Logarithm, exponential and powers: definitions
  2. Weisstein EW. "Logarithm." MathWorld – A Wolfram Web Resource
  3. IEEE 754-2019 – Standard for Floating-Point Arithmetic (double precision, ~15–17 significant digits)

Important note

Every calculation runs in your browser with standard double-precision arithmetic, and each result is checked against worked examples before we publish. Nothing you type is sent to our servers.

Spotted an error or out-of-date figure? Tell us. We review every report and correct confirmed mistakes promptly.