HomeCalculatorsMathPowers, Roots & LogarithmsLog Calculator
Math calculator

Log Calculator

Solve logarithms for the result, argument or base. Explore real graphs, view calculation steps, and share or export complete results for REST and MCP use.

Instant result
Result
—

Enter values to calculate.

Inputs—
Mode—
Formula—
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.; plus45 independent Decimal200 complete packs:4ULP forward/argument and128ULP solved base, known inputs exact. No whole-domain guarantee.
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.6 · CVP VERIFIED · CVP protocol 1.0.0-proposed · Core assurance· View Manifest · CVP overview · Specification
Versions
Calculation 1.1.6 · CVP protocol 1.0.0-proposed · Evidence 2026-10-28.metric-scope-v3
Verification revision
2026-10-28.metric-scope-v3 · 2/2 property · digest 396f8ab4a4e4
Legacy regression
45/45 tests · Production surface contract 6/6
Trust layers
Verification VERIFIED · Production CURRENT · Overall CVP state: VERIFIED under CVP 1.0.0-proposed
Reference
O1 model · O3 expected_values · O3 numerical_behavior · O2 expected_values · O2 numerical_behavior · O2 expected_values · O2 numerical_behavior
Interfaces
PASS · UI (SSR) / REST / MCP / URL→result→graph — Success 3/3. Error-path engine·REST·MCP 3/3 (status, code, calculation_version). SSR compared on URL-canonical requested calculations; empty query is idle (not an error) and JSON-typed object/array inputs are REST/MCP-only. Integration: URL → SSR result → Live graph current point (4/4). Hydration/slider/history are URL-canonical contracts, not a live browser session.
Supplemental domain review
Not performed
Named expert review
Not performed
CVP suite
48/48 golden · 23/23 CVP boundary · 23/23 invalid · 2/2 property · 2/2 metamorphic · 3/3 round-trip · 14/14 O3 · 6/6 cross-interface · 12/12 cross-calculator · 4/4 URL→result→graph · 6/6 CVP contract · Manifest
Sources
Sources
Evidence
22 legacy golden · 23 legacy boundary · legacy regression suite · 48/48 oracle-backed golden · 23/23 invalid · Artifact integrity PASS
This calculator CURRENT · Public schema 1.1.6 matches · Semantic contract ✓ · Production attested · Public/cache ✓ · Origin ✓
Semantic contract
PASS
Full verification

Manifest identity, reference classes, interfaces, suite, and production records.

Formulas

Core equations used by this calculator.

Definitionlog_b(x) = y ⇔ bʸ = x
Change of baselog_b(x) = log_k(x) / log_k(b)
Commonlog₁₀(x) = ln(x) / ln(10)
Naturalln(x) = log_e(x)
Solve argumentx = bʸ
Solve baseb = x^(1/y)
iRequire x > 0, base b > 0 and b ≠ 1. log_b(1)=0, log_b(b)=1, log_b(0) undefined. Type e for base ≈ 2.71828.

How to use

1

Choose or enter the base

Use 10 (common), e (natural), 2 (binary), or any valid custom base. Shortcuts fill the base field.

2

Enter any two values

Choose Solve y, Solve x or Solve b, then enter the other two values.

3

Read the solved variable

The selected unknown is calculated (y, x, or b). The result card shows the solved value, inverse check, live graph, and compact details.

Example calculations

Common configurations with formula and result.

ϟ

Common log of 100

Base 10

log₁₀(100)
2
ϟ

log of 2

Base 10

log₁₀(2)
≈ 0.30103
ϟ

Binary log

log₂(8)

2ʸ = 8
3
ϟ

Solve for x

log₁₀(x) = 3

x = 10³
1000
ϟ

Solve for base

log_b(8) = 3

b = 8^(1/3)
2
ϟ

Change of base

log₅(2)

ln2/ln5
≈ 0.4307

Common log₁₀ values

Common values at a glance.

xlog₁₀(x)
0.001−3
0.01−2
0.1−1
10
2≈ 0.30103
101
1002
10003
i Binary: log₂(8)=3. Natural: ln(e)=1, ln(1)=0. Applications of log₁₀ include pH, decibels, and Richter magnitude.

Log calculator specification

Version 1.1.6 · Engine tested

Calculation status

Review policy · Evidence

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 identity, reciprocal, Math.sqrt or Math.cbrt for y=1,-1,2,3; otherwise Math.pow(x,1/y).
  • REST and SSR return the engine object; result_detail.value is the complete engine object, whose value field is the solved number. The on-page result may round for display (normally 12 significant digits, with extra digits near 1 to avoid displaying an excluded base 1; scientific notation follows the rounded JavaScript numeric representation).
  • 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 6/6 · 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, Powers
    Supports: Logarithm as the inverse of the exponential; log_b(x)=y ⇔ b^y=x
  • NIST DLMF §4.2 — Logarithm: definitions and inverse of the exponential
    Supports: 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 ≠ 1
    Supports: Unspecified log is common (base 10); custom bases may be in (0, 1); real log requires x > 0
Calculation version
1.1.6

Background

Interpretation and common distinctions.

What does this log calculator compute?

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.

The published formula or method is y = log_b(x) ⇔ x = bʸ ⇔ b = x^(1/y). The following references support the stated mathematics or method:

Which inputs and limits should you check?

Follow the input domain, units, branch or solve direction, and rounding policy in the specification. Preserve exact outputs and any additional candidates or warnings.

The worked example uses Base 10 with log₁₀(100). Compare it with the Example calculations and the complete result for the same inputs.

How can you verify and cite this result?

CalculatorX is responsible for this page. The mathematical references above explain the model; implementation checks and their scope are documented separately in the math.log v1.1.6 Evidence and capability contract. Read the displayed verification and production state together with the specification's numerical limits.

Use the clean calculator URL to cite the tool. A shared input link identifies a particular calculation. Content updates, numerical verification, and domain reviews have separate dates and scopes.

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.6.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.; plus45 independent Decimal200 complete packs:4ULP forward/argument and128ULP solved base, known inputs exact. No whole-domain guarantee.declared_before_evaluation=true
  • Cross-calculator (CVP-XCAL-01): antilog(log₁₀ x) = x vs published Antilog; log_e(x) = ln(x) vs Ln; log₁₀(10ⁿ) = n vs 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-ssr is not a live browser session.
  • Versions stay distinct: calculation 1.1.6 · CVP Proposed 1.0 · evidence revision 2026-10-27.full-review-v3. Adding verification does not by itself change the logarithm algorithm.
  • Expert review is optional and is not required for CVP Verified.

Precision and machine contract

The engine uses normalized finite binary64 inputs. Strict decimal/scientific text up to 512 characters or e is accepted; nonzero text rounded to zero rejects NUMERIC_UNDERFLOW. Known-input aliases must match; unknown keys, null known values, booleans, objects, hexadecimal and nonfinite numbers reject. Omitted base defaults to10 only when solving y or x. The legacy three-filled request chooses y; requested-output fields are ignored, and normalized inputs contain only the known variables.

Solve y uses Math.log for symbolic base e, Math.log10 for10, Math.log2 for2 and change of base otherwise. Numeric bases retain their exact binary64 value; no proximity snapping to e/2/10. Solve x uses Math.exp for symbolic e and Math.pow otherwise. Solve b uses identity, reciprocal, sqrt or cbrt for y=1,-1,2,3, otherwise Math.pow(x,1/y). No solved-base snapping occurs. A valid base that rounds to1 rejects RESULT_ROUNDED_TO_ONE; this is a representation limit, distinct from NO_REAL_SOLUTION or NON_UNIQUE_BASE.

Independent Decimal200 reference partitions accept4 ULP for logarithm/argument and128 ULP for solved base; known inputs are retained exactly. Existing16 common-log O3 vectors retain2 ULP. These are finite test claims, not a whole-domain guarantee. Input decimal rounding, transcendental approximation and reciprocal-exponent error are separate. Conditioning grows near b=1 and near y=0 for solved base. Display normally uses12 significant digits; values close to1 retain enough digits to avoid displaying an excluded base1. Native JSON/CSV retain the complete typed pack and provided input text. Reverse substitution is not proof of exactness.

Typing runs locally. Shared URLs and REST/MCP send inputs and may enter logs. Overview has a fixed positive window; Focus uses finite bounds around the current argument.

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. Choose Solve x to compute x = bʸ (antilog), or Solve b 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.