πŸ“‰ Logarithm Calculator

A logarithm answers one question: what power do I raise this base to in order to get that number? This does it for any base, including base 10 and the natural log, using the change of base rule.

Use 10 for common log, 2.718281828 for natural log, or 2 for binary.

Logarithms, change of base, and why they turn multiplication into addition

A logarithm answers one question: what power do I raise this base to in order to get this number? If 10³ = 1,000, then log₁₀(1,000) = 3. That is the whole definition, and every property of logarithms is a restatement of an exponent rule in the other direction.

logb(x) = y  ⇔  by = x

The three bases you will meet
NotationBaseUsed for
log or log₁₀10Orders of magnitude, decibels, pH
lne β‰ˆ 2.71828Growth, decay, calculus
logβ‚‚2Computing, information theory

Notation is a persistent source of confusion. In most of mathematics and on most calculators, β€œlog” means base 10 and β€œln” means base e. In pure mathematics papers and in several programming languages, bare β€œlog” means the natural logarithm. When it is ambiguous, check against a known value: log(100) is 2 in base 10 and about 4.605 in base e.

Change of base

logb(x) = ln(x) / ln(b) = log10(x) / log10(b)

A calculator with only log and ln keys can produce a logarithm in any base through this identity, and it is how this tool computes every result. To find log₂(1,000): ln(1,000) / ln(2) = 6.907755 / 0.693147 = 9.965784. The choice of intermediate base makes no difference, because the ratio cancels it.

The property that made logarithms famous

Logarithm rules
RuleForm
Productlog(xy) = log(x) + log(y)
Quotientlog(x/y) = log(x) βˆ’ log(y)
Powerlog(xn) = n Γ— log(x)
Rootlog(n√x) = log(x) / n
Of onelogb(1) = 0
Of the baselogb(b) = 1

The product rule turns multiplication into addition, which is why logarithm tables and then slide rules dominated calculation for three hundred years: to multiply two awkward numbers you looked up their logs, added them, and looked up the result backwards. The power rule is the one that still earns its keep, because it is how you get an unknown out of an exponent.

Logarithms of zero and of negative numbers do not exist in the real numbers, because no real power of a positive base produces them. log(0) tends to minus infinity as you approach it from above, which is why a logarithmic axis can never include zero β€” a recurring annoyance when plotting data with genuine zeroes.

Solving for an exponent

This is the most common practical use. To find how long money takes to double at 7% a year, solve 1.07ⁿ = 2. Take logs of both sides, apply the power rule to get n × log(1.07) = log(2), and divide: n = 0.301030 / 0.029384 = 10.24 years. The famous rule of 72 β€” divide 72 by the percentage rate β€” gives 10.29, which is a very good approximation of exactly this calculation.

The same shape solves half-lives, population growth and loan terms. Anything where a quantity is multiplied repeatedly becomes a logarithm when you ask β€œhow many times”. The compound interest calculator runs the forward version of this arithmetic.

Logarithmic scales in the wild

Several familiar scales are logarithmic, which means a one-unit step is a fixed multiplication rather than a fixed addition. The Richter scale adds one for every tenfold increase in amplitude and roughly 31.6-fold in energy, so a magnitude 7 releases about a thousand times the energy of a magnitude 5. Decibels add 10 for every tenfold increase in power, so 90 dB carries a hundred times the acoustic power of 70 dB. The pH scale runs backwards: each step down is ten times the hydrogen ion concentration.

Human perception is roughly logarithmic across several senses β€” loudness, brightness, pitch β€” which is why these scales feel linear to us even though they are not. It is also why a chart on a log axis can make exponential growth look like a straight line, the single most useful property of a log plot and the easiest one to misread.

A worked example

Carbon-14 has a half-life of 5,730 years. A sample retains 23% of its original carbon-14. Solve 0.5n = 0.23, where n is the number of half-lives: n = ln(0.23) / ln(0.5) = −1.46968 / −0.69315 = 2.12. Multiply by 5,730 and the sample is about 12,150 years old. Note that both logarithms are negative and the division makes the answer positive β€” a sign slip here is the usual source of an impossible result.

Most people arrive here on the way to something else, so it is worth knowing the exponent calculator, which handles the next part, and the root calculator, which covers the case just beyond.

Frequently Asked Questions (FAQs)

What is a logarithm?

The power you need to raise a base to in order to get a given number. Since 10 cubed is 1,000, the base-10 logarithm of 1,000 is 3. It is the inverse of raising to a power, in the same way that subtraction is the inverse of addition.

What is the difference between log and ln?

On most calculators log means base 10 and ln means base e, about 2.71828. In pure mathematics and in several programming languages a bare log often means the natural logarithm, so check against a known value if it is ambiguous.

How do I calculate a log in a base my calculator does not have?

Use change of base: divide the log of the number by the log of the base, using either log or ln consistently. For log base 2 of 1,000, that is ln(1,000) divided by ln(2), which gives 9.9658.

Why can't you take the log of zero or a negative number?

Because no real power of a positive base produces zero or a negative result. The logarithm heads towards minus infinity as the input approaches zero from above, and negative inputs have no real logarithm at all β€” only a complex one.

How do logarithms solve for an exponent?

Take the logarithm of both sides and use the power rule to bring the exponent down as a multiplier. To solve 1.07 to the n equals 2, you get n times log(1.07) equals log(2), so n is about 10.24.

What does it mean that a scale is logarithmic?

That each step is a multiplication rather than an addition. A magnitude 7 earthquake has ten times the amplitude of a magnitude 6, and 90 decibels carries ten times the power of 80, which is why small-looking differences on these scales are large physical ones.

Why do people plot data on a log scale?

Because exponential growth becomes a straight line, which makes the growth rate easy to read and compare. The cost is that the axis is easy to misread, since equal distances represent equal ratios rather than equal amounts, and zero can never appear on it.