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.
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
Logarithm Lookup Across Common Bases
Computed from logb(x) = ln(x) / ln(b). Values rounded to six decimal places.
| x | log₂(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.
| Base | Name | Notation | Used in | Key property |
|---|---|---|---|---|
| 2 | Binary logarithm | log₂, lb | Computer science, information theory, music theory | log₂(2ⁿ) = n; one bit of information |
| e ≈ 2.71828 | Natural logarithm | ln, loge | Calculus, physics, biology, finance | d/dx ln(x) = 1/x; the simplest derivative |
| 10 | Common logarithm | log, log₁₀, lg | Engineering, decibels, pH, Richter scale | log₁₀(10ⁿ) = n; matches decimal notation |
| 3 | Ternary logarithm | log₃ | Ternary computing, some number theory | Optimal radix for balanced number systems |
| 5 | Quinary logarithm | log₅ | Some game design, niche computing | Used in balanced quinary arithmetic |
| 0.5 | Reciprocal-base log | log₀.₅ | Halving processes, radioactive decay | log₀.₅(x) = −log₂(x) |
| 1 | Undefined | — | — | No exponent n satisfies 1ⁿ = x unless x = 1 |
Variable Reference
| Symbol | Meaning | Domain | Typical range |
|---|---|---|---|
| b | Base of the logarithm | b > 0 and b ≠ 1 | 0.01 – 100 (0.5, 2, e, 10 most common) |
| x | Argument of the logarithm | x > 0 | 10⁻⁹ – 10¹² |
| L | Value of the logarithm, logb(x) | Any real number | −20 – 20 in typical use |
| ln(x) | Natural logarithm of x | x > 0 | −20.7 – 27.6 for the range above |
| log₁₀(x) | Common logarithm of x | x > 0 | −9 – 12 |
| log₂(x) | Binary logarithm of x | x > 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:
Rearranged to solve for the other two unknowns:
b = x1/L
An equivalent formulation using any logarithm base k:
And the reciprocal identity, which follows by swapping numerator and denominator:
Why the Identity Works
The proof is three lines long and worth committing to memory. Start with the definition of the logarithm:
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
log₂(8) = ln(8) / ln(2) = 2.0794415 / 0.6931472 = 3
log₁₀(1000) = ln(1000) / ln(10) = 6.9077553 / 2.3025851 = 3
log₂(1024) = ln(1024) / ln(2) = 6.9314718 / 0.6931472 = 10
x = 5³ = 125
b = 81^(1/4) = 3
log₁₀(0.01) = ln(0.01) / ln(10) = −4.6051702 / 2.3025851 = −2
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.
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| Parameter | Value |
|---|---|
| x | 100 |
| b | 10 |
| Parameter | Value |
|---|---|
| x | 8 |
| b | 2 |
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
Related calculators · Algebra, Geometry & Trigonometry
Recently updated formulas
Suggest an improvement
Found a mistake? Have a better example? Let us know.
You may send up to 3 suggestions per 24 hours.