Log Calculator
Evaluate logarithms (common, natural, or arbitrary base) for x > 0. Fast local calculation with shareable, machine-readable results.
Enter values to calculate.
Live graph
Interactive plot
Trust summary CVP VERIFIED · CVP protocol 1.0.0-proposed · Core assurance
- Input interpretation
- Enter values to calculate.
- Result
- —
- Assurance
- Core
- Declared partition coverage
- PASS · 5/5 declared partitions (log-y, log-x, log-b, invalid-domain, xcal) · Matrix
- Numerical scope
- ≤2 ULP vs O3 applies to the 14 published tabulated common-log vectors (log₁₀ of 1, 10, 100, 0.1, 2, 1000 plus 8 seeded random x = 10^(u·6−2) in about [0.01, 10⁴]). It is not a guarantee over all bases, the whole positive reals, or unlisted neighborhoods of 0 and 1.
- Known limitations
- Real log: x>0; b>0,b≠1
- Core CVP does not include live graph, viewport, or pointer interaction.
- Model
- The real logarithm equation y = log_b(x) ⇔ x = bʸ ⇔ b = x^(1/y). solve_for selects which variable to compute (y, x, or b). Supports common (base 10), natural (base e), base 2, or a custom base.
- Scope
- Real arithmetic; argument x > 0; base b > 0 and b ≠ 1.
- Verification
- Engine tested · Source checked · v1.1.5 · CVP VERIFIED · CVP protocol 1.0.0-proposed · Core assurance· View Manifest · CVP overview · Specification
- Versions
- Calculation 1.1.5 · CVP protocol 1.0.0-proposed · Evidence 2026-09-08.xcal
- Verification revision
- 2026-09-08.xcal · 2/2 property · digest f983352a55ff
- Legacy regression
- 45/45 tests · Production surface contract 3/3
- Reference
- O1 model · O3 expected_values · O3 numerical_behavior · O2 expected_values · O2 numerical_behavior
- Interfaces
- PASS · UI (SSR) / REST / MCP / URL→result→graph
- Supplemental domain review
- Not performed
- Named expert review
- Not performed
- CVP suite
- 3/3 golden · 23/23 CVP boundary · 23/23 invalid · 2/2 property · 2/2 metamorphic · 3/3 round-trip · 14/14 O3 · 1/1 cross-interface · 12/12 cross-calculator · 4/4 URL→result→graph · 1/1 CVP contract · Manifest
- Sources
- NIST Digital Library of Mathematical Functions, Chapter 4
- NIST DLMF §4.2
- CalculatorX mathematical conventions
- Evidence
- 22 legacy golden · 23 legacy boundary · legacy regression suite · 3/3 oracle-backed golden · 23/23 invalid · Artifact integrity PASS
- Semantic contract
- PASS
Full verification
Formulas
Core equations used by this calculator.
How to use
Choose or enter the base
Use 10 (common), e (natural), 2 (binary), or any valid custom base. Shortcuts fill the base field.
Enter any two values
Fill base b, argument x, and/or result y — leave one blank to solve for it.
Read the solved variable
The blank field is the target (y, x, or b). The result card shows the solved value, inverse check, live graph, and compact details (including characteristic / mantissa for non-negative common logs).
Example calculations
Common configurations with formula and result.
Common log of 100
Base 10
log of 2
Base 10
Binary log
log₂(8)
Solve for x
log₁₀(x) = 3
Solve for base
log_b(8) = 3
Change of base
log₅(2)
Common log₁₀ values
Common values at a glance.
| x | log₁₀(x) |
|---|---|
| 0.001 | −3 |
| 0.01 | −2 |
| 0.1 | −1 |
| 1 | 0 |
| 2 | ≈ 0.30103 |
| 10 | 1 |
| 100 | 2 |
| 1000 | 3 |
Log calculator specification
Version 1.1.5 · Engine tested
- Engine tested 45/45 tests · Production surface contract 3/3
- Named expert review Not performed
- Calculation version 1.1.5
- Definition
- A logarithm answers “to what power must base b be raised to get x?” If bʸ = x, then log_b(x) = y. The published engine solves any one of y, x, or b from the other two. Plain “log” often means base 10; ln means base e.
- What it calculates
- The real logarithm equation y = log_b(x) ⇔ x = bʸ ⇔ b = x^(1/y). solve_for selects which variable to compute (y, x, or b). Supports common (base 10), natural (base e), base 2, or a custom base.
- Inputs
- solve_for: y (default) | x | b. If omitted, inferred from which of b, x, y are present.
- Base b (10, e, 2, or custom) — required when solving for y or x; omitted when solving for b
- Argument x > 0 — required when solving for y or b
- Logarithm y — required when solving for x or b
- Outputs
- Object { solve_for, value, b, x, y }. value is the solved variable.
- Formula
y = log_b(x) ⇔ x = bʸ ⇔ b = x^(1/y)- Assumptions
- Real arithmetic; argument x > 0; base b > 0 and b ≠ 1.
- Unspecified log is common (base 10). ln is the dedicated natural-log page; this engine also accepts base e.
- UI, SSR share URLs, REST, and validation cases all call this same three-mode engine.
- When b, x, and y are all present with no explicit solve_for, the engine computes y and ignores the extra y (legacy share URLs).
- Units
- Dimensionless numeric result. In physical applications, logarithms are normally applied to dimensionless ratios or normalized quantities.
- Boundary conditions
- Invalid given base (≤ 0 or 1) returns INVALID_BASE.
- x ≤ 0 returns INVALID_ARGUMENT (real log is undefined).
- 0 < b < 1 is valid (for example log_{0.5}(0.25) = 2 and inverse x = 0.5² = 0.25).
- x = 1 returns y = 0 for every valid base; x = b returns y = 1.
- Solving for b with x = 1 and y = 0 returns NON_UNIQUE_BASE (any valid base satisfies b⁰ = 1).
- Solving for b with x ≠ 1 and y = 0 returns NO_REAL_SOLUTION.
- Solving for b when the only real candidate is b = 1 (x = 1, y ≠ 0) returns NO_REAL_SOLUTION.
- Extreme inputs that overflow or underflow IEEE-754 return RESULT_OVERFLOW / RESULT_UNDERFLOW, not Infinity or 0.
- Invalid solve_for returns INVALID_SOLVE_FOR.
- Missing both x and y returns MISSING_REQUIRED_INPUT.
- Numerical precision
- Computation uses IEEE-754 binary64 (JavaScript Number): Math.log10(x) for base 10, Math.log(x) for base e, Math.log2(x) for base 2, otherwise ln(x)/ln(b). Solving for x uses b**y (or Math.exp(y) when b = e). Solving for b uses exp(ln(x)/y).
- REST and SSR return the engine object; result_detail.value is the solved number. The on-page result may round for display (up to 12 significant digits; scientific notation when |value| ≥ 1e12 or 0 < |value| < 1e-6).
- Values exact in binary64 (for example log₁₀(100)) display as 2. Irrational results such as log₁₀(2) are rounded on the page; the API keeps the full binary64 value.
- Non-finite results are RESULT_OVERFLOW, not Infinity or a silent 0. Underflow to 0 is RESULT_UNDERFLOW.
- Interactive evaluation, shared URLs, and REST use the same formulas and error codes.
- The Result Card inverse check under the primary result uses ≈ because it restates the inverse with display-rounded values, not a claim of exact equality in binary64.
- Result Card visual order is primary result (heading, value, inverse check), then Live graph, then compact Result details (solved variable; characteristic/mantissa when applicable).
- The Live graph panel samples y = log_b(x) with the same engine formulas (Math.log10 / Math.log / Math.log2 / ln(x)/ln(b)). The curve is clipped to x > 0; invalid bases are not plotted.
- Function view uses a canonical window 0.1 ≤ x ≤ 10 so (1, 0), decade landmarks, and x → 0⁺ stay readable. The y-range is the sampled curve plus about 12% padding, not the next integer. The current point does not expand that window; if (x, y) is outside, a compact Focus control appears. Function ticks are integers and 0.1 / 1 / 10; Focus uses local numeric ticks around the current point. The status line labels the result as Current (x, y).
- Characteristic / mantissa (base 10) are shown only when solving for y, the base is 10, and y ≥ 0, using characteristic = floor(y) and mantissa = y − floor(y). Negative common logs use a different table convention and are not split on the page.
- Example
- log₁₀(100) = 2; 10³ = 1000; 8^(1/3) = 2
- Validation cases
27 published on this page · 45/45 tests · Production surface contract 3/3 · View evidence
- base 10, x=100 → 2
- base 10, x=2 → ≈0.301029995665
- base e, x=e → 1
- base 2, x=8 → 3
- base 10, x=0.01 → −2
- base 10, x=1 → 0
- base 0.5, x=0.25 → 2
- base 0.5, x=4 → −2
- base 1.5, x=2.25 → 2
- base 5, x=2 → ≈0.430676558073
- base 1 → error INVALID_BASE
- base 0 → error INVALID_BASE
- base −2 → error INVALID_BASE
- x=0 → error INVALID_ARGUMENT
- x=−1 → error INVALID_ARGUMENT
- empty x and empty y → error MISSING_REQUIRED_INPUT
- base 10, y=3 (solve x) → 1000
- base 2, y=10 (solve x) → 1024
- base 0.5, y=2 (solve x) → 0.25
- x=100, y=2 (solve b) → 10
- x=8, y=3 (solve b) → 2
- x=0.25, y=2 (solve b) → 0.5
- x=1, y=0 (solve b) → error NON_UNIQUE_BASE
- x=2, y=0 (solve b) → error NO_REAL_SOLUTION
- x=1, y=5 (solve b) → error NO_REAL_SOLUTION
- base 10, y=400 (solve x) → error RESULT_OVERFLOW
- base 10, y=−400 (solve x) → error RESULT_UNDERFLOW
- Sources
- NIST Digital Library of Mathematical Functions, Chapter 4 — Logarithm, Exponential, PowersSupports: Logarithm as the inverse of the exponential; log_b(x)=y ⇔ b^y=x
- NIST DLMF §4.2 — Logarithm: definitions and inverse of the exponentialSupports: b^(log_b x) = x and log_b(b^y) = y for valid real b and x > 0
- CalculatorX mathematical conventions — Common (base 10), natural (base e), and real bases b > 0, b ≠ 1Supports: Unspecified log is common (base 10); custom bases may be in (0, 1); real log requires x > 0
- NIST Digital Library of Mathematical Functions, Chapter 4 — Logarithm, Exponential, Powers
- Calculation version
- 1.1.5
Background
Interpretation and common distinctions.
What is a logarithm?
If
b^y = x,
then
log_b(x) = y.
The logarithm is the exponent that turns base b into x.
- Common log: log₁₀(x) (often written log x or lg x)
- Natural log: ln(x) = logₑ(x)
- Binary log: log₂(x) (computer science)
Examples: log₁₀(100)=2, log₁₀(0.01)=−2, ln(e)=1, log₂(8)=3.
Change of base
log_b(x) = (logₖ(x))/(logₖ(b)) = (ln(x))/(ln(b))
Example: log₅(2) = ln 2 / ln 5 ≈ 0.4307.
Log rules
log_b(xy)=log_b x+log_b y, log_b(x/y)=log_b x−log_b y, log_b(x^n)=nlog_b x
Also log_b(1)=0, log_b(b)=1, and log_b(c)=1/log_c(b).
Characteristic and mantissa (base 10)
When this calculator solves for y = log₁₀(x) and y ≥ 0, it reports:
characteristic = ⌊ y ⌋, mantissa = y − ⌊ y ⌋.
This matches the usual split for non-negative common logs (for example log₁₀(100)=2 → characteristic 2, mantissa 0). Traditional log tables represent negative logarithms differently (for example log₁₀(0.2)≈ −0.69897 is written as overline1.30103 = −1 + 0.30103), so this page does not show a characteristic/mantissa block when y < 0. CalculatorX does not use tables; it evaluates log_b(x) directly.
Graph sketch (base 10)
Plotting this calculator’s input x against result y:
y = log₁₀(x)
- As x → 0⁺, y → −∞
- As x → +∞, y grows without bound
- At x = 1, y = 0
The same qualitative shape holds for any base b > 1. For 0 < b < 1, log_b(x) decreases as x increases.
Where log₁₀ appears
pH in chemistry, decibel scales, earthquake magnitude, and scientific notation for very large or small quantities.
CVP (Calculator Verification Protocol)
Math pilot under CVP 1.0 Proposed. Profile: core (pure logarithm, not an engineering model).
- Evidence Manifest: /evidence/math.log/1.1.5.cvp.json
- Reproduce: /evidence/math.log/reproduce — tabulated O3 inputs, expected values, generator, and re-run commands
- Independent reference: O1 (model) + O3 mpmath/MPFR common-log table + O2 live change-of-base identities
- Numerical policy: IEEE-754 binary64; ≤2 ULP vs O3 applies to the 14 published tabulated common-log vectors (log₁₀ of 1, 10, 100, 0.1, 2, 1000 plus 8 seeded random x = 10^(u·6−2) in about [0.01, 10⁴]). It is not a guarantee over all bases, the whole positive reals, or unlisted neighborhoods of 0 and 1.
declared_before_evaluation=true - Cross-calculator (
CVP-XCAL-01):antilog(log₁₀ x) = xvs published Antilog;log_e(x) = ln(x)vs Ln;log₁₀(10ⁿ) = nvs Exponent. Listed scientific notation does not share those identities (N/A). - Coverage: solve y = log_b(x), solve argument x, solve base b, invalid domain, cross-calculator
- Interfaces: UI (SSR), REST, and MCP must agree. A separate integration check covers URL → result → Live graph.
ui-ssris not a live browser session. - Versions stay distinct: calculation
1.1.5· CVP Proposed 1.0 · evidence revision2026-09-08.xcal. Adding verification does not by itself change the logarithm algorithm. - Expert review is optional and is not required for CVP Verified.
Related tools
Other calculators in this family: Antilog Calculator, Exponent Calculator, Exponential Growth Calculator, Natural Log (ln) Calculator, Root Calculator, Square Root Calculator . Explore all Powers, Roots & Logarithms.
Frequently asked questions
Key distinctions behind the calculation.
What is a logarithm?
It is the inverse of exponentiation. If bʸ = x, then log_b(x) = y — the exponent that turns base b into x.
What does log mean without a base?
In many science and engineering contexts, log means log₁₀ (common logarithm). In pure math, log sometimes means ln. This tool defaults to base 10 unless you change it.
What is the difference between log₁₀ and ln?
log₁₀ uses base 10; ln uses base e ≈ 2.718. They convert by ln(x) = log₁₀(x) / log₁₀(e).
What is log₁₀(1)?
0, because 10⁰ = 1. For any valid base b, log_b(1) = 0.
What is log₁₀(0)?
Undefined. No real power of 10 equals 0. As x → 0⁺, log₁₀(x) → −∞.
Can the result be negative?
Yes. When 0 < x < 1, log_b(x) is negative for b > 1 (e.g. log₁₀(0.01) = −2).
What are the basic log rules?
log(xy)=log x + log y; log(x/y)=log x − log y; log(xⁿ)=n log x; and change of base log_b(x)=log_k(x)/log_k(b).
Where is log₁₀ used in real life?
pH (chemistry), decibels (sound/electronics), Richter magnitude (earthquakes), and compressing large scientific scales.
What bases are invalid?
Real log requires b > 0 and b ≠ 1. Base 1, 0, and negative bases are rejected. Bases between 0 and 1 are valid: log_{0.5}(0.25) = 2.
Can I solve for x or the base?
Yes. Leave x blank to compute x = bʸ (antilog). Leave b blank to compute b = x^(1/y). The UI, share URL, REST API, and validation cases all use the same engine with solve_for = y, x, or b.
What if I fill in all three values?
The engine solves for y = log_b(x) and ignores the extra y. Clear x to solve for the argument, or clear b to solve for the base.