Log Calculator

A log calculator takes the guesswork out of computing logarithms. Whether you need a quick answer for a math class, an engineering problem, or a data analysis task, punching numbers into a logarithm calculator beats working through the arithmetic by hand every time. This page covers everything you need: how to use the calculator, the most common log bases, the rules that govern logarithms, worked examples, and where logs actually show up in the real world.

Enter Details

Log type

x

Result

Logarithm

Note — This result is an estimate. Talk to a healthcare provider for personalized guidance.

How to Use the Log Calculator

Using a log calculator is straightforward. You generally need two things: the number you want to take the log of (called the argument) and the base of the logarithm. Enter both, hit calculate, and the result is your answer.

  • Number (argument): Must be a positive value. Logarithms are not defined for zero or negative numbers.
  • Base: Must be a positive number other than 1. Common choices are 10, e (roughly 2.718), or 2.

If you leave the base field blank, most calculators default to base 10. Some let you switch between log, ln, and log₂ with a single button. Once you have your result, you can use it directly or plug it into a larger equation.

Calculate Logarithms with Any Base

While base 10, base e, and base 2 get most of the attention, logarithms work with any valid base. Need log base 5 of 125? Or log base 7 of 2401? No problem.

The general form is: logb(x) = y, which means b raised to the power y equals x. So log₅(125) = 3 because 5³ = 125. Simple enough once you see the pattern.

When your calculator does not have a dedicated button for an arbitrary base, you can use the change of base formula (covered below) to compute it using natural log or log base 10. Most scientific calculators and online tools handle arbitrary bases directly, saving you that extra step.

Common Logarithm (Base 10)

The common logarithm, written as log(x) without any subscript, always means base 10. It asks: "10 to what power gives me x?" So log(1000) = 3, because 10³ = 1000.

Base 10 became standard largely because of how well it maps to our decimal number system. It was especially useful in the days before electronic calculators, when scientists and engineers used printed log tables to handle multiplication and division of large numbers.

Today, common logs still appear in chemistry (the pH scale is defined as the negative log base 10 of hydrogen ion concentration), acoustics (decibels), and the Richter scale for earthquakes. Anytime you see a measurement scale that compresses enormous ranges into manageable numbers, log base 10 is usually behind it.

Natural Logarithm (ln or Base e)

The natural logarithm uses the base e, an irrational constant approximately equal to 2.71828. It's written as ln(x) rather than loge(x), though both mean the same thing.

Why does a strange, non-integer base matter so much? Because e shows up naturally in processes involving continuous growth or decay. Compound interest calculated continuously, radioactive decay, population growth models, and cooling rates all follow equations built around e. The natural log is simply the inverse of those processes.

In calculus, ln(x) has an especially clean derivative: the derivative of ln(x) is just 1/x. That simplicity makes it the preferred log in higher mathematics, physics, and engineering. If you're working in any of those fields, you'll use ln far more often than log base 10.

Binary Logarithm (Base 2)

The binary logarithm, log₂(x), answers the question: "2 to what power gives me x?" So log₂(8) = 3 because 2³ = 8, and log₂(1024) = 10 because 2¹⁰ = 1024.

Base 2 is the native language of computers and digital systems. Everything in binary computing comes down to powers of 2, so log base 2 shows up constantly in fields related to computing, data, and information theory.

Applications of Log Base 2

Log base 2 is not just a curiosity for computer scientists. It has concrete, practical uses across several areas.

  • Computer science and algorithms: The number of steps in a binary search is log₂(n), where n is the size of the dataset. It's one of the most important relationships in algorithm analysis.
  • Information theory: Claude Shannon defined a bit as the amount of information needed to distinguish between two equally likely outcomes. The number of bits required to represent n possibilities is log₂(n).
  • Data storage: Storage capacities (kilobytes, megabytes, gigabytes) are all powers of 2, so log base 2 helps convert between them or calculate how many bits a value requires.
  • Music and audio: Each octave in music represents a doubling of frequency, so the number of octaves between two frequencies is log₂(f₂/f₁).

Basically, whenever a system doubles with each step, log base 2 is the tool you reach for.

Change of Base Formula

Your calculator probably has buttons for log (base 10) and ln (base e). What happens when you need a different base? That's where the change of base formula comes in.

The formula is: logb(x) = log(x) / log(b), or equivalently, ln(x) / ln(b). Both versions give the same result. You're essentially rescaling the logarithm into a base your calculator already understands.

For example, to find log₅(200) using a standard calculator: log(200) / log(5) ≈ 2.301 / 0.699 ≈ 3.292. You can verify this by checking that 5^3.292 ≈ 200.

Converting Between Log Bases

Converting between log bases is really just applying the change of base formula in a specific direction. A few conversions come up often enough to be worth knowing.

ConversionFormulaExample
Any base → base 10logb(x) = log(x) / log(b)log₂(8) = log(8)/log(2) = 3
Any base → base elogb(x) = ln(x) / ln(b)log₂(8) = ln(8)/ln(2) = 3
Base 10 → base eln(x) = log(x) / log(e) ≈ log(x) / 0.4343ln(100) ≈ 2.301/0.4343 ≈ 4.605
Base e → base 10log(x) = ln(x) / ln(10) ≈ ln(x) / 2.3026log(100) = ln(100)/2.3026 ≈ 2

Once you're comfortable with the pattern, switching between bases becomes second nature. The key insight is that the ratio of two logs in the same base always gives you the log in a new base.

Logarithm Rules and Properties

Logarithms follow a consistent set of rules that let you simplify, expand, or combine log expressions. Knowing these rules is essential for solving equations and working through more complex problems without a calculator. They also explain why logs were so valuable as a calculation tool before computers existed.

The three core rules are the product rule, the quotient rule, and the power rule. A few additional properties are also worth keeping handy:

  • logb(1) = 0 for any valid base, because b⁰ = 1.
  • logb(b) = 1, because b¹ = b.
  • logb(bⁿ) = n, a direct consequence of the power rule.

Product Rule

The product rule states: logb(x · y) = logb(x) + logb(y).

In plain terms, the log of a product equals the sum of the logs. This is why logarithms were used for multiplication before calculators existed. Multiplying large numbers is hard; adding their logs is easy.

Example: log(2 × 50) = log(2) + log(50) ≈ 0.301 + 1.699 = 2. And sure enough, log(100) = 2. The rule checks out.

Quotient Rule

The quotient rule states: logb(x / y) = logb(x) - logb(y).

Division inside the log becomes subtraction outside it. This is the counterpart to the product rule, and it was equally useful in the pre-calculator era for handling division of large numbers.

Example: log(1000 / 10) = log(1000) - log(10) = 3 - 1 = 2. Which is just log(100) = 2. Consistent.

Power Rule

The power rule states: logb(xⁿ) = n · logb(x).

An exponent inside the log can be pulled out front as a multiplier. This is especially useful when solving for an unknown exponent in an equation, since it lets you bring that exponent down to a level where normal algebra can handle it.

Example: log(10³) = 3 · log(10) = 3 · 1 = 3. Or a more practical case: to solve 2ˣ = 50, take the log of both sides to get x · log(2) = log(50), then x = log(50) / log(2) ≈ 5.644.

Logarithm Formula

The core logarithm formula is written as:

logb(x) = y  ⟺  by = x

Read it as: the logarithm of x in base b equals y, which is the same as saying b raised to the y equals x. The two forms are completely interchangeable and simply express the same relationship from opposite directions. The log form solves for the exponent; the exponential form solves for the result.

A few constraints apply to make the formula valid:

  • b > 0 and b ≠ 1 (the base must be a positive number, not equal to 1)
  • x > 0 (the argument must be positive)
  • y can be any real number, including negative values and fractions

Understanding this two-way relationship between logarithms and exponents is the foundation for everything else. Once it clicks, the rules and formulas stop feeling arbitrary and start making sense.

Logarithm Calculation Examples

Let's walk through several examples covering different bases and scenarios.

  1. log(10,000): Base 10, argument 10,000. Since 10⁴ = 10,000, the answer is 4.
  2. log₂(64): Since 2⁶ = 64, the answer is 6.
  3. ln(e³): The natural log of e³ is simply 3, by the power rule.
  4. log₅(25): Since 5² = 25, the answer is 2.
  5. log(0.001): 0.001 = 10⁻³, so the answer is -3. Negative results are perfectly valid when the argument is between 0 and 1.
  6. log₃(100) using change of base: log(100) / log(3) ≈ 2 / 0.4771 ≈ 4.192.
  7. ln(50): Using a calculator, ln(50) ≈ 3.912. Check: e^3.912 ≈ 50. ✓

Notice how negative logs come up when the argument is less than 1, and fractional results are common when the argument is not a perfect power of the base. Both are completely normal.

Antilog (Inverse Logarithm) Calculator

If a logarithm finds the exponent, the antilog reverses the process. Given a log value y and a base b, the antilog gives you back x: the original number before the log was taken.

The formula is: antilogb(y) = by.

So if log(x) = 3, then x = 10³ = 1000. If ln(x) = 2, then x = e² ≈ 7.389. You're just evaluating an exponent. On most calculators, the antilog for base 10 is the 10ˣ button, and for natural log it's the button.

Antilogs come up constantly in practice. In chemistry, if you know the negative log of a concentration (pH), you use an antilog to recover the actual concentration. In acoustics, converting decibels back to a sound intensity ratio requires an antilog. Any time you've applied a log to compress data and need to expand it back, the antilog is your tool.

Real-World Applications of Logarithms

Logarithms are everywhere once you start looking. They're not just a math class hurdle.

  • pH in chemistry: pH = -log[H⁺]. A solution with pH 3 has ten times more hydrogen ions than one with pH 4. The log scale makes it practical to express concentrations that span many orders of magnitude.
  • Decibels (dB): Sound intensity is measured on a log scale because the human ear perceives loudness logarithmically. A 20 dB increase represents a tenfold rise in sound pressure.
  • Earthquake magnitude: The Richter scale is logarithmic. A magnitude 7 quake releases roughly 31.6 times more energy than a magnitude 6, not just 1.something more.
  • Finance and compound interest: The time needed for an investment to reach a target value is solved with a logarithm: t = ln(A/P) / (r), where r is the continuous interest rate.
  • Data compression and information theory: Shannon entropy, which measures the average information content in a message, is computed using log base 2.
  • Machine learning: Log loss (cross-entropy) is a standard loss function for classification models. Logarithms are also central to maximum likelihood estimation.
  • Astronomy: The apparent magnitude scale for star brightness is logarithmic, going back to ancient Greek classifications that were later formalized with a log base ~2.512 relationship.

The common thread is scale compression. Whenever a phenomenon spans many orders of magnitude, a logarithm turns an unwieldy range into something human-readable and mathematically tractable. That's why they've stuck around for centuries and aren't going anywhere.

Other Maths Calculators

Explore all