Log Calculator

This calculator finds the logarithm of any positive number in any base, working out what power the base must be raised to in order to produce that number. Logarithms turn multiplication and huge ranges of values into manageable addition, and they underpin everything from decibels and pH to compound growth and computer science, so checking one quickly with full working shown is genuinely useful for study or work. You enter the number you want the logarithm of, then choose a base: base 10 (the common log), base e (the natural log, ln), base 2 (the binary log used in computing), or your own custom base, plus the decimal places you want the result shown to. The calculator instantly returns the expression you are solving, the logarithm result itself, and a verification line showing the base raised to that result to confirm it matches your original number. Below that it shows full step-by-step working using the change-of-base formula, the key values used along the way such as ln(x) and ln(b), and a table converting the same number into the other common bases for quick comparison. Use it to check homework, convert a value between logarithm bases, or see exactly how the change-of-base formula produces its answer. Results are calculated with standard double-precision arithmetic and are accurate to roughly fifteen significant figures.

Calculate.co.nz is proud to be partnered with Health Based Building, a leader in sustainable and health-conscious building innovation. With over a century of experience, they develop high-performance systems like Foreverbreathe Specification, Magnum Board, and Foreverbreathe Paints to support energy-efficient, non-toxic living environments. Their commitment to healthier homes aligns with our belief that informed choices lead to better outcomes for Kiwi households.
Calculate.co.nz partner: Health Based Building
Advertise on this page
Standard Formula  Change-of-base formula: logˣ(x) = ln(x) / ln(b). Verified against standard mathematical definitions.

1. Input

2. Notation

Worked example: log₁₀(1000) = 3 exactly, because 10³ = 1000.

Result

Expression
log₁₀(1000)
What you are calculating
Logarithm Result
3.0000
Exact integer result
Verification
103 ≈ 1000
base ^ result = x

Step-by-Step Working

Key Values

Number (x)1000
Base (b)10
ln(x)6.9078
ln(b)2.3026
logˣ(x) = ln(x) / ln(b)3.0000

Related Logarithms

log₁₀(x)3.0000
ln(x)6.9078
log₂(x)9.9658
logˣ(x) [your base]3.0000

What Is a Logarithm?

A logarithm is the inverse of exponentiation. Where an exponent says "what is b raised to the power y?", a logarithm asks "to what power must b be raised to produce x?" The relationship is:

logˣ(x) = y   means   bʸ = x

For example, log₁₀(1000) = 3 because 10³ = 1000. The number b is called the base, x is the argument (or antilogarithm), and y is the logarithm.

Common Logarithm Bases

BaseSymbolCommon NameUsed In
10log or log₁₀Common logarithmEngineering, decibels, pH, Richter scale
e (2.71828...)lnNatural logarithmCalculus, growth/decay, statistics
2log₂ or lbBinary logarithmComputer science, information theory, bits

The Change-of-Base Formula

Most calculators only provide log base 10 and ln. To find a logarithm in any other base, use the change-of-base formula:

logˣ(x) = ln(x) / ln(b) = log₁₀(x) / log₁₀(b)

This works because if logˣ(x) = y, then bʸ = x. Taking the natural log of both sides gives y · ln(b) = ln(x), so y = ln(x) / ln(b).

Example: log₂(32) = ln(32) / ln(2) = 3.4657... / 0.6931... = 5, confirming that 2⁵ = 32.

Logarithm Rules

RuleFormulaExample
Product rulelogˣ(xy) = logˣ(x) + logˣ(y)log(100 × 10) = log(100) + log(10) = 2 + 1 = 3
Quotient rulelogˣ(x/y) = logˣ(x) - logˣ(y)log(100/10) = log(100) - log(10) = 2 - 1 = 1
Power rulelogˣ(xˣ) = p · logˣ(x)log(10³) = 3 · log(10) = 3
Log of 1logˣ(1) = 0Any base raised to 0 = 1
Log of baselogˣ(b) = 1log₁₀(10) = 1
Change of baselogˣ(x) = ln(x) / ln(b)log₂(8) = ln(8)/ln(2) = 3

Worked Example

Default inputs: x = 1000, base = 10.

  1. We want log₁₀(1000).
  2. Apply the change-of-base formula: ln(1000) / ln(10).
  3. ln(1000) = 6.907755... and ln(10) = 2.302585...
  4. 6.907755 / 2.302585 = 3.0000 exactly.
  5. Verification: 10³ = 1000. Correct.

Related Calculators

Sources and method: Change-of-base formula: logˣ(x) = ln(x) / ln(b), derived from standard logarithm theory. Definitions from NIST Digital Library of Mathematical Functions (dlmf.nist.gov). JavaScript uses Math.log() (natural log) for all calculations.

This calculator computes logarithms using IEEE 754 double-precision floating-point arithmetic. Results are accurate to approximately 15 significant figures. For x very close to 0 or extremely large, rounding may affect the final displayed decimal places.