Uni-Sine
MathematicsAlgebra

What is a logarithm?

Try it

Logarithm Calculator

Evaluate logs in any base and see the log rules at work

Go to its page

What is a logarithm, in plain words?

A logarithm answers one question: what power do I need? log₁₀ 1000 asks "10 to what power is 1000?" The answer is 3, because 10 × 10 × 10 = 1000. The small number is the base, and the answer is the exponent.

\log_b x=y\ \ \ \text{means}\ \ \ b^y=x

Every log statement is an exponent statement written the other way round. OpenStax College Algebra defines the logarithm this way, for a base b that is positive and not 1. Being able to switch between the two forms is the key skill:

Exponent formLog formRead as
2³ = 8log₂ 8 = 3log base 2 of 8 is 3
3⁴ = 81log₃ 81 = 4log base 3 of 81 is 4
10² = 100log₁₀ 100 = 2log base 10 of 100 is 2
10⁻² = 0.01log₁₀ 0.01 = −2log base 10 of 0.01 is −2
5⁰ = 1log₅ 1 = 0log base 5 of 1 is 0

Notice two patterns: the log of 1 is always 0, whatever the base, and the log of a number between 0 and 1 is negative. You can't take the log of 0 or a negative number, because no power of a positive base gives one.

practice
Pick an answer, then check it.
What is log₂ 32?

Common logs and natural logs

  • log with no base written usually means base 10, the common logarithm. log 1000 = 3. Calculators label it log.
  • ln means base e, the natural logarithm. e is a constant, about 2.718, that appears naturally in growth and decay. ln e5 = 5, and ln 20 ≈ 3.00, because e³ ≈ 20.
  • log₂, base 2, is common in computer science, where it counts how many times you can halve something: log₂ 1024 = 10.

A base 10 log tells you the size of a number in powers of ten. A number with log 6.3 is between a million (10⁶) and ten million (10⁷). Try a question on powers of ten:

Write a tiny size as a power of ten, or a power of ten as a decimal.

Press Mark to have your answer marked in the Smallest Thing course.

The graph of a logarithm

y = \log_{10}\left( x\right)
123456789101112-1-0.50.51(1, 0)(10, 1)
Drag to pan, scroll to zoom. x from 0.1 to 12, y from -1.42 to 1.5.

Here x is the input and y is its base 10 log. It is zero at x = 1, reaches 1 at x = 10, and rises ever more slowly: x has to multiply by 10 for y to go up by just 1. It plunges towards minus infinity as x gets close to 0 and never touches the y-axis. It is the mirror image of y = 10x in the line y = x, because the two functions undo each other. Explore other bases in our Log Graph Calculator.

The log rules, and why they work

Because logs are exponents, the log rules are just the exponent rules in disguise. When you multiply powers of the same base you add the exponents, so when you multiply numbers you add their logs.

RuleIn symbolsExample
Product rulelog(xy) = log x + log ylog 2 + log 5 = log 10 = 1
Quotient rulelog(x/y) = log x − log ylog₂ 48 − log₂ 3 = log₂ 16 = 4
Power rulelog(xⁿ) = n log xlog 10⁷ = 7 log 10 = 7
Log of 1log 1 = 0ln 1 = 0
Log of the baselog_b b = 1log₃ 3 = 1
Change of baselog_b x = ln x ÷ ln blog₃ 50 = ln 50 ÷ ln 3 ≈ 3.561

The rules only work for logs with the same base, and there is no rule for log(x + y). The change of base rule lets you work out a log in any base on a calculator that only has log and ln buttons. Our log calculator guide has more worked calculations.

Using logs to solve equations

Logs earn their keep when the unknown is in the exponent. To solve 3x = 40, take the log of both sides and use the power rule to bring x down:

x\log3=\log40\ \ \Rightarrow\ \ x=\frac{\log40}{\log3}\approx3.358

A money example: £500 is saved at 4% interest a year. How long until it reaches £800? Each year multiplies the money by 1.04, so 500 × 1.04n = 800, which means 1.04n = 1.6. Taking natural logs, n = ln 1.6 ÷ ln 1.04 ≈ 11.98, so it takes 12 years. Check: 500 × 1.0412 ≈ £800.52.

Where logarithms are used

  • pH in chemistry: pH is the negative log of the hydrogen ion concentration (OpenStax Chemistry). A concentration of 10−3 mol/dm³ is pH 3, and each step of 1 on the pH scale is a factor of 10.
  • Decibels: sound level in decibels is 10 times the log of the intensity ratio (OpenStax Physics), so a sound 10 times more intense is 10 dB louder.
  • Earthquake magnitudes use a log scale, so each whole number step is a much bigger quake.
  • Computer science: binary search through a million sorted items takes about log₂ 1,000,000 ≈ 20 steps.
  • Growth and decay: population growth, interest and radioactive half-life questions all need logs to find the time.

Logs were invented to save time. The Scottish mathematician John Napier published the first tables of logarithms in 1614, according to MacTutor. They turned slow multiplications and divisions into quick additions and subtractions, and astronomers such as Kepler used them in their calculations.

Common mistakes

  • Splitting log(x + y). It is not log x + log y. The product rule is for log(xy).
  • Dividing instead of finding a power. log₂ 32 is 5, not 32 ÷ 2.
  • Cancelling the log in log 40 ÷ log 3. That is not log(40 ÷ 3); work out each log first.
  • Taking the log of zero or a negative number. It isn't defined for real numbers.
  • Mixing up log and ln. log is base 10 on most calculators; ln is base e.
  • Using the rules across different bases. Change base first.

Common questions

What is a logarithm in simple terms?
The power you need to raise a base to in order to get a number. log₁₀ 100 = 2 because 10² = 100.
What is the difference between log and ln?
log usually means the base 10 logarithm, and ln means the natural logarithm, base e (about 2.718). The rules are the same for both.
Why are logarithms useful?
They solve equations where the unknown is an exponent, and they squeeze huge ranges of numbers onto small scales, such as pH, decibels and earthquake magnitudes.
What is log of 1?
0, in any base, because any positive base raised to the power 0 is 1.
Can a logarithm be negative?
Yes. The log of a number between 0 and 1 is negative: log₁₀ 0.001 = −3. But you can't take the log of a negative number.
Who invented logarithms?
John Napier, a Scottish mathematician, who published them in 1614 to make long calculations quicker.

Revision cards

Read the front, say your answer, then flip to check.

Where to go next

  • Solve it

    Logarithm Calculator

    Evaluate logs in any base and see the log rules at work

    Open the tool
  • Learn it

    Algebra

    Master equations, inequalities and the language of abstract mathematics

    Start the course
  • Test it

    AP Precalculus

    A new exam-style paper every day, with instant marking and a mark scheme

    Start today's paper
Read next
Maths · AlgebraLog rules: the laws of logarithms with examplesAll the log rules in one place: product, quotient and power laws, change of base and ln rules, with worked examples, solving equations and practice.