About the Log Calculator
Logarithms appear in pH values, decibels, earthquake magnitudes, compound growth and computer science. This log calculator finds the logarithm of any positive number in any base and shows the natural log, common log and binary log together: log10 of 1,000 is 3, ln 2 is about 0.6931 and log2 of 1,024 is 10. It also calculates antilogs and explains the change-of-base step.
Calculators only have built-in logs for a couple of bases, so other bases use the change-of-base rule: log_b(x) = ln(x) ÷ ln(b). The calculator shows that step with your numbers. In antilog mode it computes b^y, the number whose logarithm is y. Logs are only defined for positive numbers, and the base must be positive and not equal to 1.
Example: log₁₀(1,000) = 3, ln(1,000) ≈ 6.907755279 and log₂(1,000) ≈ 9.965784285, which says 1,000 is just under 2¹⁰ = 1,024. In base 2, log₂(8) = 3 exactly. The antilog of 2 in base 10 is 10² = 100.
Logarithms turn multiplication into addition, which is why they appear in pH, decibels, earthquake magnitudes and compound interest. For powers see the exponent calculator, for chemistry the pH calculator, and for growth over time the compound interest calculator.
How to use the Log Calculator
- Choose logarithm or antilogPick Logarithm to find log_b(x), or Antilog to find b^y.
- Enter the numberType a positive number x, or the logarithm value y for an antilog.
- Enter the baseUse 10, 2, e (type e) or any positive base other than 1.
- Read the resultsSee the result plus ln, log10 and log2, with the change-of-base step.
Log Calculator features
- Logarithm in any base
- Natural log (ln), log10 and log2 at once
- Antilog (inverse logarithm)
- Type e for the natural base
- Change-of-base working shown
- Clear errors for zero, negatives and base 1
- Precise to about 12 significant digits
Common uses
- Solving exponential equations in algebra
- Chemistry pH and pKa calculations
- Computer science work with log base 2
- Decibel and Richter scale questions
- Finance problems on doubling time
Logarithms in everyday life: decibels, earthquakes, pH and doubling times
A logarithm asks "what power gives this number?" That simple idea lets scientists squeeze enormous ranges into manageable scales. Sound, earthquakes, acidity and the brightness of stars are all measured on logarithmic scales, and logarithms also solve everyday questions such as how long money takes to double. This guide explains those scales, information measured in bits, Benford's law and the history of logarithms, with worked examples.
Squeezing big ranges into small numbers
On a logarithmic scale, each step represents a multiplication rather than an addition. In base 10, going from 1 to 2 on the scale means ten times more, and from 1 to 3 means a hundred times more. That is useful when quantities vary over many powers of ten, as sound intensity, earthquake energy and acidity do.
Decibels
Sound levels are measured in decibels, which are ten times the base-10 logarithm of an intensity ratio. An increase of 10 dB means ten times the sound intensity, which people perceive as roughly twice as loud. An increase of 3 dB means about double the intensity. This is why a sound at 90 dB is far more intense than one at 60 dB, not just 50% louder, and why hearing protection matters in loud workplaces.
Earthquake magnitudes
Earthquake magnitude scales are logarithmic too. On the moment magnitude scale used today, each increase of one whole number corresponds to about 31.6 times more energy released. A magnitude 7 earthquake releases about 1,000 times more energy than a magnitude 5. That is why a difference of one or two points in magnitude makes such a dramatic difference in damage.
pH and acidity
The pH scale is the negative logarithm of the concentration of hydrogen ions. A solution with pH 3 is ten times more acidic than one with pH 4, and a hundred times more acidic than pH 5. Pure water is neutral at pH 7, lemon juice is around pH 2 and household bleach is strongly alkaline at around pH 12 to 13.
Star brightness
Astronomers measure brightness in magnitudes, a scale where five magnitudes correspond to a factor of 100 in brightness, and brighter objects have lower numbers. The system dates back to ancient Greek astronomers, who ranked stars from first to sixth magnitude by eye, and was later made precise using logarithms.
Information and bits
Information is measured in bits, and the number of bits needed to choose between options is the base-2 logarithm of the number of options. Eight equally likely options need 3 bits, because 2³ is 8. Password strength is often described this way: a random 12-character password drawn from 94 printable characters has about log₂(94¹²), roughly 78.7 bits of entropy, which is far harder to guess than a common word.
A worked example: doubling time
How long does money take to double at 8% a year? Solving 1.08ᵗ = 2 with logarithms gives t = ln 2 ÷ ln 1.08, which is about 9.0 years. The rule of 72, a popular shortcut, gives 72 ÷ 8 = 9 years, the same answer, and the logarithm explains why such rules work.
The same method answers questions such as how long a population takes to triple or how many half-lives until a medicine falls below a certain level.
Benford's law
In many real collections of numbers, such as populations of towns, river lengths and company accounts, the leading digit is 1 about 30% of the time, much more often than 9. The expected share for leading digit 1 is log₁₀(2), about 30.1%. Auditors use this pattern, known as Benford's law, to spot suspicious figures, because invented numbers rarely follow it.
A short history
John Napier published logarithms in 1614 as a way to turn difficult multiplications into additions, a huge help for astronomers and navigators. Tables of logarithms and, from the 1620s, slide rules based on them remained essential calculating tools for over three centuries, until electronic calculators replaced them in the 1970s.
Common mistakes
- Treating logarithmic scales as if they were linear.
- Confusing log, usually base 10, with ln, the natural log.
- Taking the logarithm of zero or a negative number.
- Forgetting that a 10 dB increase is ten times the intensity.
Related tools
For the inverse, use Exponent Calculator. For password strength, try Password Strength Checker, and for growth over time, Compound Interest Calculator.
Logarithmic charts
Charts of things that grow by percentages, such as share prices over decades or the early spread of an epidemic, are often drawn with a logarithmic vertical axis. On such a chart, equal distances represent equal multiplications, so steady percentage growth appears as a straight line, and a change in the growth rate shows up as a change in slope. Reading the axis labels is essential: a gentle-looking line on a log chart can represent an enormous rise.
Limits
Results are computed with standard floating-point arithmetic and rounded for display.
Frequently asked questions
What is a logarithm?
It is the exponent needed to produce a number from a base. log₁₀(100) = 2 because 10² = 100, and log₂(32) = 5 because 2⁵ = 32.
How do I calculate a log in any base?
Use change of base: log_b(x) = ln(x) ÷ ln(b). For log₅(125): ln 125 ÷ ln 5 = 4.8283 ÷ 1.6094 = 3. That makes sense, because 5³ = 125.
What is ln?
ln is the natural logarithm, the log to base e ≈ 2.718281828. It appears naturally in growth, decay and calculus. For example, ln(e) = 1, ln(1) = 0 and ln(10) ≈ 2.302585093.
What is an antilog?
The inverse of a logarithm: antilog_b(y) = b^y. The antilog of 3 in base 10 is 1,000. In base e, the antilog of 1 is e itself, about 2.718281828.
Why can't I take the log of zero or a negative number?
No power of a positive base gives zero or a negative number, so those logarithms are undefined in the real numbers. As x approaches zero, log(x) heads toward negative infinity.
What are the main log rules?
log(ab) = log a + log b, log(a ÷ b) = log a − log b, log(aⁿ) = n log a, and log_b(b) = 1, log_b(1) = 0.
Where are logarithms used in real life?
pH in chemistry, decibels for sound, the Richter and moment magnitude scales for earthquakes, star brightness, information theory and the time it takes money to grow at compound interest.
What is the difference between log and ln?
On most calculators, log means the common logarithm to base 10 and ln means the natural logarithm to base e. In higher mathematics and many programming languages, log on its own often means the natural log, so check which convention is being used.
How do I solve an exponential equation with logs?
Take the logarithm of both sides and bring the exponent down. For 2ˣ = 50, x = log(50) ÷ log(2) = 1.69897 ÷ 0.30103 ≈ 5.6439. Enter 50 with base 2 in this calculator to get the same answer directly.