Log Calculator

Find the logarithm of any positive number in base 10, base e, base 2 or any custom base, with the change-of-base steps shown, an inverse check, and a curve that shows where your point sits.

What you get
  • Any base, instantlyBase 10, natural log, binary log or a custom base.
  • Steps, not just answersDefinition, change of base, division and an inverse check.
  • Curve with your pointSee exactly where your logarithm sits on the graph.

Logarithm

Results update as you type

Enter the base and the number, and the calculator returns the logarithm. In logb(x) = y, you give b and x.
The base must be positive and cannot be 1, and the number must be positive. Type e in the base field for the natural logarithm.

Runs entirely in your browser. Nothing you type is sent or saved

Logarithm guide

What a logarithm is

A logarithm answers an exponent question. Instead of asking "what is 10 cubed?", it asks the reverse: "10 to what power gives 1000?" The answer, 3, is written log10(1000) = 3. In general:

by = x   means the same as   y = logb(x)

b is the base · x is the number · y is the logarithm, the exponent that connects them

The logarithm is the inverse of exponentiation, in the same sense that subtraction is the inverse of addition. That one idea carries everything else on this page, including why logarithms turn multiplication into addition, why they compress huge ranges onto a page of graph paper, and why they show up wherever quantities grow by fixed percentages.

The three common bases

Any positive number except 1 can serve as a base, but three bases dominate practice:

  • Base 10, the common logarithm, written log. It counts zeros and orders of magnitude, which is why science and engineering reach for it: log(1000) = 3.
  • Base e, the natural logarithm, written ln, where e ≈ 2.71828 is Euler's number. It is the base of continuous growth and decay, and it appears everywhere in calculus, physics and finance: ln(e) = 1.
  • Base 2, the binary logarithm, the native scale of computing: log2(8) = 3 says that 8 is three doublings from 1, and algorithms analysts count halvings with it.

Other bases appear when a problem supplies them. One useful anchor set worth memorizing: log3(81) = 4, because 3 × 3 × 3 × 3 = 81, and logb(b) = 1 and logb(1) = 0 for every valid base b.

Change of base

Your calculator chip only computes natural logs; every other base is reached through the change-of-base formula:

logb(x) = ln(x) ÷ ln(b)

divide the natural log of the number by the natural log of the base, whatever the base is

Worked check: log3(81) = ln(81) ÷ ln(3) = 4.3944 ÷ 1.0986 = 4, exactly as counting the threes promises. The calculator above shows this division with your own numbers substituted, and then verifies the answer in reverse by computing by and confirming it lands back on x.

The logarithm laws

Three rules let a logarithm unwind multiplication, division and powers into simple arithmetic. Each is just the exponent laws wearing a different coat:

  • Product rule: log(x · y) = log(x) + log(y). Check with base 10: log(100 × 1000) = log(100000) = 5, and log(100) + log(1000) = 2 + 3 = 5.
  • Quotient rule: log(x ÷ y) = log(x) - log(y). Check: log(10 ÷ 2) = 1 - 0.30103 = 0.69897.
  • Power rule: log(xn) = n · log(x). Check: log(26) = 6 × log(2) = 6 × 0.30103 = 1.80618.
Why the product rule matters historically: before electronic computers, these rules were the whole point of logarithms. Multiplying two seven-digit numbers by hand took minutes and bred errors; looking up two logarithms, adding them, and looking the sum back up took seconds. Slide rules are nothing but the product rule made physical with sliding scales.

Log scales in real life

  • pH: acidity is a base-10 log of hydrogen ion concentration. Each pH step of 1 is a tenfold change in acidity, which is why lemon juice (pH 2) and seawater (pH 8) differ by a factor of a million.
  • Decibels: sound level is a log of intensity. Every 10 dB is ten times the acoustic power, so a rock concert at 110 dB carries a hundred times the power of a lawnmower at 90 dB.
  • Richter scale: earthquake magnitudes are logarithmic too. Magnitude 7 releases roughly thirty-two times the energy of magnitude 6, not a little more.
  • Compound growth: the time for money to double at rate r is ln(2) ÷ ln(1 + r), the natural log hiding inside the rule of 72.

The common thread: whenever a quantity spans enormous ranges, or grows by fixed percentages, a logarithmic scale is the honest way to draw or describe it.

Using the calculator well

  • Pick the mode that names your unknown: in logb(x) = y, any two of the three decide the third. The logarithm mode finds y, the number mode finds x from b and y, and the base mode finds b from x and y.
  • Mind the domain: the number x must be positive, and the base must be positive and not equal to 1. The logarithm of 0 or of a negative number is undefined over the real numbers, and a base of 1 would make every answer the same, so the calculator rejects both instead of inventing values.
  • Pick the base your problem uses: a chemistry pH question wants base 10, a continuous growth question wants e, a computer-science halving count wants 2. The presets cover all three.
  • Read the steps, not just the number: the change-of-base card shows the two natural logs and their quotient, which is exactly the line a grader wants to see, and the inverse check (by = x) catches typos immediately.
  • Estimate with round numbers: knowing log(100) = 2 and log(1000) = 3 brackets any argument between them, so a wild answer shows itself before you trust it.
  • Watch the curve: the graph card plots logb(x) with your point marked. The curve passes through (1, 0) and (b, 1) always, another quick sanity check of the base you entered.

Common questions

By long-standing convention, a bare log means base 10, and ln means base e. Calculators and programming languages mostly follow this, though some textbooks and programming contexts use log for the natural logarithm, so check which convention your course or tool uses before comparing answers. This calculator labels every base explicitly to avoid the ambiguity.

Because the logarithm asks "to what power must I raise the base to get 1?", and any positive base raised to the power 0 gives 1. So log(1) = 0 in every base at once, which is why the curve on the graph card always passes through the point (1, 0) no matter which base you enter.

A base of 1 raises to give 1 forever, so no exponent could ever produce a number other than 1 and the logarithm would have no answer. Negative bases swing between positive and negative values as the exponent changes, so the function is not consistently defined. Only bases greater than 0 and different from 1 give a clean, single-valued logarithm, which is what the calculator requires.

Use the change-of-base formula: divide the natural log of your number by the natural log of your base. For log base 3 of 81, compute ln(81) ÷ ln(3) = 4.3944 ÷ 1.0986 = 4. This works for any valid base because the ratio of the two natural logs carries the same information as the original logarithm.

Yes, whenever the argument is between 0 and 1. For example log(0.01) = -2, because 10 to the power -2 is 0.01. Negative logarithms are common in chemistry and signal processing; the curve on the graph card dips below the axis exactly there.

Only the base: log is base 10 and ln is base e, about 2.71828. They differ by a fixed factor, since ln(x) = log(x) ÷ log(e) ≈ log(x) ÷ 0.4343. Numbers that are round in one scale are not round in the other: log(100) = 2 while ln(100) ≈ 4.6052. Use log for orders of magnitude and ln for continuous growth, decay and calculus.

That is exactly what a logarithm computes: y = log base b of x. Enter the base and the target value here and the result is the exponent. For example, to learn how many doublings take 1 to 8, ask for log base 2 of 8, and the answer 3 says 2 × 2 × 2 = 8.

No. Every calculation runs in your browser. Nothing is stored or transmitted.

Every log, any base, with the work shown.

Browse all math calculators