Home / Mathematics / Algebra, Geometry & Trigonometry / Logarithm Change of Base Formula

Formula & Calculator

Logarithm Change of Base Formula

This lets you convert a logarithm from any base into one you can compute with a standard calculator. It says log_b(x) = ln(x) / ln(b). For example, log₂(8) equals ln(8)/ln(2) = 3, which matches our expectation. Most calculators have only base-10 and base-e logarithms, so this formula is used all the time in maths, science, and engineering.

Mathematics Algebra Daily Life
VORZEP · ALGEBRA & LOGARITHM TOOLS

Logarithm Change of Base Calculator

Evaluate logb(x) for any base using the change-of-base identity — and solve for the argument or the base in either direction. Step-by-step working, a live log-curve chart with reference bases, the equivalent power relation bL = x, and companion metrics in ln, log10, log2 and arbitrary bases.

logb(x) = ln(x) / ln(b) · bL = x · b = x1/L
Solve for
Base (b) The base of the logarithm. Must be greater than zero and not equal to 1. Common bases: 2 (binary, computer science), e ≈ 2.71828 (natural, calculus and physics), 10 (common, engineering and decibels). Bases below 1 reverse the direction of the curve.
b
Base b must be greater than zero.
Argument (x) The number whose logarithm you are taking. Must be strictly greater than zero — the logarithm of zero or a negative number is undefined in the real numbers. Values below 1 give a negative logarithm; values above the base give a positive one.
x
Argument x must be greater than zero.
Result (logb x) The value of the logarithm — the exponent to which the base must be raised to obtain the argument. Can be any real number: negative when x < 1, zero when x = 1, positive when x > 1. When solving for the base, the result must not be zero.
L
Result L must be a real number.
LOGARITHM logb(x)
3
log₂(8) = 3 · because 2³ = 8
POSITIVE — ARGUMENT ABOVE BASE
logb(x) = ln(x) / ln(b)
Step-by-step solution
The logarithm curve y = logb(x)
Current base b Reference bases 2 / e / 10 Current point (x, logbx)
The inverse relation x = bL
Exponential curve x = bL Current point (L, x)
Sensitivity
Companion logarithm metrics
The change-of-base identity — and the power relation behind it
logb(x) = ln(x) / ln(b)  ⟺  bL = x
2base b
^
3exponent L = logbx
=
8argument x
CHANGE OF BASE — HOW THE IDENTITY IS BUILT 1. Let L = logb(x) 2. By definition of a logarithm: bL = x 3. Take the natural logarithm of both sides: ln(bL) = ln(x) 4. Apply the power rule ln(bL) = L · ln(b) 5. Divide by ln(b)  (b ≠ 1 so ln(b) ≠ 0): L = ln(x) / ln(b) log₂(8) = ln(8) / ln(2) = 3.000000
Base b Exponent L = logb(x) Argument x — the result of raising b to L
What the change-of-base identity really measures
logb(x)logarithm
=
ln(x)natural log of argument
÷
ln(b)natural log of base

The identity is a ratio of two logarithms

A logarithm answers the question "to what power must I raise the base to get the argument?" The change-of-base identity simply says that this power, measured on any scale, is the ratio of the argument's log to the base's log on that same scale. Because the ratio cancels the scale, the result is independent of which logarithm you use — natural, common or any other.

It converts any base into any other

Calculators and programming languages typically offer only ln and log10. The change-of-base identity is what lets you compute log2(1024) = ln(1024)/ln(2) = 10, or log5(125) = ln(125)/ln(5) = 3, without a dedicated function. It is the single most-used logarithm identity in practical computation.

Base and argument are symmetric in a specific way

Swapping base and argument inverts the logarithm: logb(x) = 1 / logx(b). This follows immediately from the identity, since flipping numerator and denominator reciprocates the ratio. It is a useful mental shortcut: if you know log2(8) = 3, then log8(2) = 1/3 without any further calculation.

It underpins information theory, acoustics and finance

Shannon entropy is measured in bits (log2), decibels use log10, continuous growth and decay use ln, and musical pitch intervals are ratios of log2. Every conversion between these scales — bits to nats, decibels to nepers, semitones to octaves — is an application of the change-of-base identity.

How to Use This Calculator

Three quantities are linked by two identities: L = logb(x), bL = x. Choose which one you want the tool to find, then fill in the other two.

1. Choose what to solve for

Pick the logarithm, the argument x, or the base b. The calculator rearranges L = ln(x)/ln(b) for whichever you choose, using x = bL or b = x1/L as needed.

2. Use realistic presets

Base presets cover 0.5, 2, 3, 5, 10 and e. Argument presets cover 0.5 up to 1,024 and e. Result presets cover −2 through 10, including the important values 0 and 1.

3. Watch the domain rules

The argument must be strictly positive, and the base must be positive and not equal to 1. The tool flags violations inline and will not compute an undefined result.

4. Read the result and verdict

The result card shows the value with the equivalent natural, common and binary logarithms, plus a badge classifying the sign and magnitude — negative, zero, fractional, unity, or positive above the base.

5. Check the log curve and power relation

The chart plots y = logb(x) for the current base with reference curves for log2, ln and log10, and marks your point. The power visual shows bL = x with the actual numbers.

6. Switch to Advanced for depth

Advanced mode adds the inverse exponential curve x = bL, a sensitivity panel, and a companion table including ln, log10, log2, the reciprocal logarithm logx(b), and the derivative 1/(x·ln b).

What This Tool Offers

Built around the change-of-base identity logb(x) = ln(x) / ln(b), the fundamental link between logarithms in different bases.

Three-way solving

Solve for the logarithm, the argument, or the base. The calculator rearranges the identity for whichever variable you choose.

Live log curve

An auto-scaling plot of y = logb(x) for the current base, with faded reference curves for log2, ln and log10 and a marker at your point.

Sign and magnitude verdict

Each result is classified from large negative through negative, zero, fractional, unity, small positive and up to large positive, with a coloured badge.

Multi-base hints

Every field shows the same quantity expressed in ln, log10 and log2, so you can cross-check against any calculator or programming language.

Inverse exponential chart

Advanced mode plots the inverse relation x = bL, showing the same identity from the exponent's point of view.

Reference tables

A live base converter, a log lookup grid across five bases, common bases and their uses, and a full variable reference table.

Reference Tables & Conversions

A live cross-base converter, a logarithm lookup grid, and a reference of common bases and their applications.

Cross-base logarithm converter

x
base 2
base e
base 10
base 3
base 5
= log₂(8) = 3 · ln(8) = 2.0794415 · log₁₀(8) = 0.9030900 · log₃(8) = 1.8927893 · log₅(8) = 1.2920297

Logarithm Lookup Across Common Bases

Computed from logb(x) = ln(x) / ln(b). Values rounded to six decimal places.

xlog₂(x)ln(x)log₁₀(x)log₃(x)log₅(x)

Common Bases and Their Applications

Each base exists because a particular field found it natural. The change-of-base identity lets you move between them freely.

BaseNameNotationUsed inKey property
2Binary logarithmlog₂, lbComputer science, information theory, music theorylog₂(2ⁿ) = n; one bit of information
e ≈ 2.71828Natural logarithmln, logeCalculus, physics, biology, financed/dx ln(x) = 1/x; the simplest derivative
10Common logarithmlog, log₁₀, lgEngineering, decibels, pH, Richter scalelog₁₀(10ⁿ) = n; matches decimal notation
3Ternary logarithmlog₃Ternary computing, some number theoryOptimal radix for balanced number systems
5Quinary logarithmlog₅Some game design, niche computingUsed in balanced quinary arithmetic
0.5Reciprocal-base loglog₀.₅Halving processes, radioactive decaylog₀.₅(x) = −log₂(x)
1Undefined——No exponent n satisfies 1ⁿ = x unless x = 1

Variable Reference

SymbolMeaningDomainTypical range
bBase of the logarithmb > 0 and b ≠ 10.01 – 100 (0.5, 2, e, 10 most common)
xArgument of the logarithmx > 010⁻⁹ – 10¹²
LValue of the logarithm, logb(x)Any real number−20 – 20 in typical use
ln(x)Natural logarithm of xx > 0−20.7 – 27.6 for the range above
log₁₀(x)Common logarithm of xx > 0−9 – 12
log₂(x)Binary logarithm of xx > 0−30 – 40

What Does logb(x) = ln(x) / ln(b) Measure?

A logarithm answers a deceptively simple question: to what power must I raise the base b to obtain the argument x? The answer is logb(x). The change-of-base identity tells you that this power is the same regardless of which logarithm you use to measure it — the ratio ln(x)/ln(b) is identical to log10(x)/log10(b) and to log2(x)/log2(b). The scale cancels because it appears in both numerator and denominator.

The Change-of-Base Formula

The identity in its standard form:

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

Rearranged to solve for the other two unknowns:

x = bL   (where L = logb(x))
b = x1/L

An equivalent formulation using any logarithm base k:

logb(x) = logk(x) / logk(b)   for any valid base k

And the reciprocal identity, which follows by swapping numerator and denominator:

logb(x) = 1 / logx(b)

Why the Identity Works

The proof is three lines long and worth committing to memory. Start with the definition of the logarithm:

Let L = logb(x).
By definition: bL = x.
Take ln of both sides: ln(bL) = ln(x).
Apply the power rule: L · ln(b) = ln(x).
Divide by ln(b) (valid since b ≠ 1 ⟹ ln(b) ≠ 0):
L = ln(x) / ln(b).

Every step is an application of either the definition of a logarithm or the power rule for logarithms, ln(an) = n · ln(a). Nothing else is required, which is why the identity is universal — it holds for any positive base other than 1 and any positive argument.

How Each Variable Affects the Result

Because the logarithm is the inverse of exponentiation, the behaviour of logb(x) as its inputs change is the mirror image of how bL behaves. Fixing the base b > 1 and increasing the argument x makes the logarithm increase, but very slowly — doubling x adds a constant ln(2)/ln(b) rather than doubling the result. Fixing the argument and increasing the base makes the logarithm decrease, approaching zero as the base grows without bound. When the base drops below 1, the direction reverses: log0.5(x) = −log2(x), so the curve is the mirror image of the base-2 curve across the x-axis.

Three anchor points are worth memorising for any base: logb(1) = 0 always, because b⁰ = 1; logb(b) = 1 always, because b¹ = b; and logb(1/b) = −1 always, because b⁻¹ = 1/b. Every logarithm problem you will ever meet is in some sense a variation on these three facts.

Worked Examples

Given: b = 2, x = 8 — solve for log₂(8)
log₂(8) = ln(8) / ln(2) = 2.0794415 / 0.6931472 = 3
Given: b = 10, x = 1000 — solve for log₁₀(1000)
log₁₀(1000) = ln(1000) / ln(10) = 6.9077553 / 2.3025851 = 3
Given: b = 2, x = 1024 — solve for log₂(1024)
log₂(1024) = ln(1024) / ln(2) = 6.9314718 / 0.6931472 = 10
Given: b = 5, L = 3 — solve for x
x = 5³ = 125
Given: x = 81, L = 4 — solve for b
b = 81^(1/4) = 3
Given: b = 10, x = 0.01 — solve for log₁₀(0.01)
log₁₀(0.01) = ln(0.01) / ln(10) = −4.6051702 / 2.3025851 = −2
Given: b = e, x = e — solve for ln(e)
ln(e) = ln(e) / ln(e) = 1

Frequently Asked Questions

Because a logarithm is just an exponent in disguise. If L = logb(x), then by definition bL = x. Taking the natural logarithm of both sides gives ln(bL) = ln(x), and the power rule ln(bL) = L · ln(b) turns this into L · ln(b) = ln(x). Dividing both sides by ln(b) — which is safe because b ≠ 1 means ln(b) ≠ 0 — gives L = ln(x)/ln(b). The whole identity is just the definition of the logarithm plus one application of the power rule.

If the base were 1, then 1L = 1 for every value of L, so you could never reach any argument other than 1 — the logarithm would not be a well-defined function. That is why the change-of-base formula requires ln(b) ≠ 0, which fails exactly when b = 1. Negative bases are excluded for a related reason: a negative number raised to a fractional power is not a real number, so bL = x has no real solution for most x when b < 0. Restricting the base to positive numbers other than 1 gives a clean, single-valued, real-valued function on the whole positive domain.

They are all logarithms — they differ only in base. "ln" always means the natural logarithm, base e ≈ 2.718281828. "log₁₀" (sometimes written "lg") means the common logarithm, base 10. The bare "log" is ambiguous: in pure mathematics and most programming languages it means the natural logarithm, in engineering it usually means base 10, and in computer science it often means base 2. When you see "log" without a base, always check the context. This calculator lets you set the base explicitly so there is no ambiguity.

Memorise the powers of 2: 2¹ = 2, 2² = 4, 2³ = 8, 2⁴ = 16, 2⁵ = 32, 2⁶ = 64, 2⁷ = 128, 2⁸ = 256, 2⁹ = 512, 2¹⁰ = 1,024. If your argument is an exact power of 2, the answer is the exponent — that is why log₂(1,024) = 10. For arguments between powers, use the approximation log₂(x) ≈ 3.32 · log₁₀(x), or remember that log₂(10) ≈ 3.3219, so multiplying the number of decimal digits by 3.32 gives a quick estimate. A doubling of the argument always adds exactly 1 to the base-2 logarithm, which is the property that makes bits a natural unit for information.

You get a negative logarithm. Because b⁰ = 1 for any base, logb(1) = 0 exactly, and any argument below 1 must correspond to a negative exponent: logb(0.5) = −logb(2), logb(0.1) = −logb(10), and so on. There is no lower bound — as the argument approaches zero from the positive side, the logarithm tends to −∞. This is why the log curve has a vertical asymptote at x = 0 and why the logarithm of zero is undefined rather than merely very negative.

Multiply or divide by the constant ln(10) ≈ 2.302585. Specifically, ln(x) = log₁₀(x) · ln(10) ≈ 2.302585 · log₁₀(x), and log₁₀(x) = ln(x) / ln(10) ≈ 0.4342945 · ln(x). This is just the change-of-base identity with b = 10 and k = e, or vice versa. The factor 0.4342945 = 1/ln(10) is worth remembering — it is the conversion constant between the two logarithm scales, just as 2.54 is the conversion constant between inches and centimetres.

For any valid base b and positive argument x, logb(x) = 1 / logx(b). It follows directly from the change-of-base identity: logb(x) = ln(x)/ln(b) and logx(b) = ln(b)/ln(x), so the two quantities are reciprocals of each other. This is genuinely useful: if you know log₂(8) = 3, you immediately know log₈(2) = 1/3 without any calculation. It also explains why switching base and argument reflects the curve across the line y = x.

Everywhere a logarithm appears and the available function uses a different base. Calculating entropy in bits when your language only offers ln requires a factor of 1/ln(2). Converting between decibels (base 10) and nepers (base e) uses a factor of 20/ln(10). Musical pitch intervals are ratios of base-2 logarithms, so converting a frequency ratio to cents uses 1,200/ln(2). Radioactive half-life calculations use base 2, while continuous decay uses base e, and the change-of-base identity converts between them. It is arguably the most-used logarithm identity in applied work.

Calculating...

Variables

Symbol Quantity Unit
log_b(x) Logarithm of x in base b
ln(x) Natural logarithm of x
ln(b) Natural logarithm of the base b

What it means

The change of base formula allows you to compute a logarithm in any base using natural or common logarithms. For any positive b (b≠1), log_b(x) = ln(x)/ln(b) = log₁₀(x)/log₁₀(b). This is essential because calculators typically only have ln (base e) and log₁₀ (base 10). It is used in scientific computing, data analysis (logarithmic plots), and algorithm analysis (e.g., complexity classes). Understanding this formula is important for working with exponential and logarithmic functions, and it underpins many mathematical transformations in engineering and physics.

Worked example

Log Change of Base – Two Examples

Real‑World
Scenario: Compute log₁₀(100) using natural logs.
ParameterValue
x100
b10
1log₁₀(100) = ln(100)/ln(10) = 4.6052/2.3026 = 2
Result 2 ✓ Correct
Scenario: Compute log₂(8) using natural logs.
ParameterValue
x8
b2
1log₂(8) = ln(8)/ln(2) = 2.0794/0.6931 = 3
Result 3 ✓ Correct
Insight: log_b(x) = ln(x)/ln(b) = log(x)/log(b) for any base. Useful when calculators lack arbitrary bases.

Common mistakes

  • Change of base: log_b(x) = ln(x) / ln(b) – any base can be used.
  • Common choices: Natural log (ln) or common log (log₁₀).
  • Domain: x > 0, b > 0, b ≠ 1.
  • Check: Verify that b^log_b(x) = x.
  • Applications: Useful when calculators do not have the desired base.

Applications

The change of base formula, log_b(x) = ln(x)/ln(b), allows conversion of logarithms from one base to another. This is essential in mathematics, science, and engineering when working with different logarithmic scales. Engineers use it for signal decibels (dB), earthquake magnitudes (Richter), pH, and logarithmic plots. In computer science, it relates logarithms for algorithm complexity (base 2 vs. natural). By applying this formula, professionals can compute logarithms in any base using only natural logs or common logs, which are widely available. This flexibility is crucial in data analysis, scientific computation, and algorithm design.

  • Decibel (dB) conversions in acoustics and electronics
  • pH and pKa calculations in chemistry
  • Richter magnitude and other logarithmic scales
  • Algorithm complexity analysis (log base conversion)
  • Log‑log plots and data transformation for linearisation