Root Calculator
Calculate square, cube, and nth real roots with a live graph. Check negative radicands and index limits, then share inputs or export full precision 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 · 7/7 declared partitions (sqrt-path, cbrt-path, pow-path, identity-n1, odd-negative, invalid-domain, xcal) · Matrix
- Numerical scope
- Path-specific ULP vs O3 applies only to the 19 published tabulated vectors: identity n=1 (0 ULP); Math.sqrt including tiny/huge (≤2); Math.cbrt including odd-negative and tiny/huge (≤2); moderate Math.pow including odd-negative, ⁸√15, and max safe n (≤2); extreme Math.pow at |a|=1e±300 (≤64). It is not a whole-domain guarantee. Even roots of a<0 and illegal n are contract errors (NOT_REAL / INVALID_INDEX), not ULP claims.; plus103 independently generated Decimal250 reference vectors with path-specific0/2/64ULP, scalar type strict and identity exact; not whole-domain.
- Known limitations
- Positive safe-integer n; even roots of a<0 are NOT_REAL; odd-negative uses the real branch. Declared partitions cover identity n=1, Math.sqrt, Math.cbrt, Math.pow, odd-negative, invalid-domain, and XCAL vs Square Root / Exponent — not a whole-domain claim.
- Core CVP does not include live graph, viewport, or pointer interaction.
- Model
- The principal real nth root b = ⁿ√a. For a ≥ 0, b = a^(1/n). For a < 0 and odd n, b = −(−a)^(1/n). Default index is n = 2 when omitted.
- Scope
- Real principal root only. This engine does not return complex values.
- Verification
- Engine tested · Source checked · v1.0.6 · CVP VERIFIED · CVP protocol 1.0.0-proposed · Core assurance· View Manifest · CVP overview · Specification
- Versions
- Calculation 1.0.6 · CVP protocol 1.0.0-proposed · Evidence 2026-10-26.root-complete-contract-v2
- Verification revision
- 2026-10-26.root-complete-contract-v2 · 4/4 property · digest e1f0a9ed78e2
- Legacy regression
- 24/24 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
- Supplemental domain review
- Not performed
- Named expert review
- Not performed
- CVP suite
- 108/108 golden · 14/14 CVP boundary · 17/17 invalid · 4/4 property · 2/2 metamorphic · 3/3 round-trip · 19/19 O3 · 1/1 cross-interface · 5/5 cross-calculator · 4/4 URL→result→graph · 6/6 CVP contract · Manifest
- Sources
- NIST Digital Library of Mathematical Functions, Chapter 4
- NIST DLMF §4.2(iv)
- CalculatorX mathematical conventions
- Evidence
- 10 legacy golden · 14 legacy boundary · legacy regression suite · 108/108 oracle-backed golden · 17/17 invalid · Artifact integrity PASS
- Semantic contract
- PASS
Full verification
Formulas
Core equations used by this calculator.
How to use
Choose square, cube, or nth root
For nth root, enter the index n as a positive safe integer (1 ≤ n ≤ Number.MAX_SAFE_INTEGER). Share URLs always include a and n.
Enter the radicand a
Negatives are allowed for odd integer roots only. Even roots of a < 0 are not real on this page.
Read the value and steps
See a^(1/n), a decimal approximation, and the algorithm and numerical limits. REST and shared URLs use the same engine.
Example calculations
Common configurations with formula and result.
Square root
√16
Estimate √27
to 3 decimals
Cube root
∛27
Odd root of negative
∛(−8)
8th root
⁸√15
Quick checks
Common values at a glance.
| Expression | Result |
|---|---|
| √16 | 4 |
| √27 ≈ | 5.196 |
| ∛27 | 3 |
| ∛(−8) | −2 |
| ⁴√16 | 2 |
| ⁸√15 ≈ | 1.403 |
Root calculator specification
Version 1.0.6 · Engine tested
- Engine tested 24/24 tests · Production surface contract 6/6
- Named expert review Not performed
- Calculation version 1.0.6
- Definition
- The nth root of a number a is the principal real number b such that bⁿ = a, written ⁿ√a = b. The index n is a positive safe integer. For a ≥ 0, b = a^(1/n). For a < 0 and odd n, b = −(−a)^(1/n). Square root is n = 2; cube root is n = 3. For even n, b ≥ 0.
- What it calculates
- The principal real nth root b = ⁿ√a. For a ≥ 0, b = a^(1/n). For a < 0 and odd n, b = −(−a)^(1/n). Default index is n = 2 when omitted.
- Inputs
- Radicand a (finite real)
- Index n (positive safe integer n ≥ 1; maximum Number.MAX_SAFE_INTEGER = 9007199254740991; default 2)
- Outputs
- Principal real root b
- Formula
ⁿ√a = a^(1/n) (a ≥ 0); ⁿ√a = −(−a)^(1/n) (a < 0, n odd); not real (a < 0, n even)- Assumptions
- Real principal root only. This engine does not return complex values.
- Index n is a positive safe integer (1st, square, cube, 4th, …, nth root). Generalized powers a^(1/n) with non-integer, negative, or non-safe-integer n belong on the Exponent calculator.
- Even n requires a ≥ 0 and returns b ≥ 0. Odd n allows a < 0 (for example ∛(−8) = −2).
- n = 2 uses Math.sqrt. n = 3 uses Math.cbrt, returning an implementation-approximated binary64 result (including negatives). Other n use a^(1/n) for a ≥ 0, or −(|a|)^(1/n) for odd n and a < 0.
- The Square Root calculator is a different contract: √(x<0) returns the principal imaginary. This page rejects that case as NOT_REAL.
- Units
- This calculator operates on numeric scalar values and does not perform unit conversion. If the radicand represents a dimensioned quantity with unit U, the resulting dimension is U^(1/n).
- Boundary conditions
- Strict decimal/scientific text up to 512 characters; hex, commas and unknown keys reject. Input aliases must agree. Nonzero text rounded to zero returns NUMERIC_UNDERFLOW; explicit zero remains valid.
- Index text must represent an exact positive safe integer before binary64 rounding; for example 2.00000000000000001 is not a valid integer index.
- Missing or blank a returns MISSING_REQUIRED_INPUT. Omitted n defaults to 2; explicit blank or null n is rejected.
- Non-numeric, object, array, boolean, NaN, or Infinity inputs return INVALID_NUMBER.
- n that is not a positive safe integer (including n = 0, n < 0, non-integers such as 2.5, and n outside JavaScript's safe-integer range) returns INVALID_INDEX.
- a < 0 with even n returns NOT_REAL.
- a = 0 returns 0.
- Defensive guards exist for unexpected non-finite numerical outcomes (RESULT_OVERFLOW / RESULT_UNDERFLOW). Overflow or underflow is not expected for valid finite nth-root inputs.
- Numerical precision
- Independent CPython Decimal250 exp/ln reference vectors check full binary64 scalar results with path-specific 0/2/64 ULP budgets. These are declared vectors, not a whole-domain accuracy proof. Relative condition number in a is 1/n away from zero; the derivative is singular at zero for n>1. Raising a rounded root to n may overflow or amplify approximation errors.
- Computation uses IEEE-754 binary64 (JavaScript Number): Math.sqrt for n=2, Math.cbrt for n=3, otherwise Math.pow(a, 1/n) or −Math.pow(−a, 1/n) for odd n and a < 0. Math.cbrt is implementation-approximated; ECMAScript does not require correctly rounded cbrt.
- REST and SSR return that engine number. The on-page result may round for display (up to 12 significant digits; scientific notation when |b| ≥ 1e12 or 0 < |b| < 1e-6).
- Values exact in binary64 (for example ⁴√16 = 2 and ∛(−8) = −2) display exactly. Irrational results such as √27 are rounded on the page; the API keeps the full binary64 value.
- Interactive evaluation runs in the browser. Shared URLs and REST use the same engine server-side. The work panel describes the actual algorithm and numerical limits.
- The Result Card includes an engine-linked Live graph of y = x^(1/n) using the same Overview / Focus template as Log (even n: x ≥ 0; odd n: all real x). Overview is a bounded shape view; Focus shows a finite window around the current point. The legend preserves the current coordinates.
- Example
- ∛27 = 3; ⁴√16 = 2; √27 ≈ 5.19615242271
- Validation cases
15 published on this page · 24/24 tests · Production surface contract 6/6 · View evidence
- a=16, n=2 → 4
- a=27, n=2 → ≈5.19615242271
- a=27, n=3 → 3
- a=-8, n=3 → −2
- a=16, n=4 → 2
- a=15, n=8 → ≈1.40285055201
- a=0, n=2 → 0
- a=42, n=1 → 42
- a=-9, n=2 → error NOT_REAL
- n=0 → error INVALID_INDEX
- a=16, n=2.5 → error INVALID_INDEX
- a=16, n=-2 → error INVALID_INDEX
- a=16, n=9007199254740991 → ≈1
- a=16, n=9007199254740992 → error INVALID_INDEX
- empty a → error MISSING_REQUIRED_INPUT
- Sources
- NIST Digital Library of Mathematical Functions, Chapter 4 — Logarithm, Exponential, PowersSupports: nth root as the principal real value of a^(1/n) when it exists
- NIST DLMF §4.2(iv) — Powers: principal value z^a = exp(a ln z)Supports: Principal a^(1/n) for a > 0. Negative a is restricted here to odd integer n so the result stays the real odd root, not the complex principal power.
- CalculatorX mathematical conventions — Real nth root; even roots of negatives are NOT_REAL; n is a positive safe integerSupports: Distinct from the Square Root calculator’s principal-imaginary contract for x < 0. Polynomial roots belong on Quadratic. Non-integer or non-safe-integer n is a generalized power (Exponent), not this nth-root contract. Negative odd roots use −(−a)^(1/n).
- NIST Digital Library of Mathematical Functions, Chapter 4 — Logarithm, Exponential, Powers
- Calculation version
- 1.0.6
Background
Interpretation and common distinctions.
What does this root calculator compute?
The nth root of a number a is the principal real number b such that bⁿ = a, written ⁿ√a = b. The index n is a positive safe integer. For a ≥ 0, b = a^(1/n). For a < 0 and odd n, b = −(−a)^(1/n). Square root is n = 2; cube root is n = 3. For even n, b ≥ 0.
The published formula or method is ⁿ√a = a^(1/n) (a ≥ 0); ⁿ√a = −(−a)^(1/n) (a < 0, n odd); not real (a < 0, n even). The following references support the stated mathematics or method:
- NIST DLMF §4.2 — Logarithm, Exponential, Powers: Definitions and mathematical identities for logarithms, exponentials, and powers.
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 √16 with 16^(1/2). 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.root v1.0.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 root (radical)?
The nth root of a number a is the principal real number b such that b^n = a, with
ⁿ√(a) = a^(1/n) if a ≥ 0; −(−a)^(1/n) if a < 0, n odd; not real if a < 0, n even
The index n is a positive safe integer. For even n, b ≥ 0, so √(4) = 2 even though (−2)² = 4. For a negative radicand and odd n, this engine uses −(|a|)^(1/n) so ³√(−8) = −2, not the complex principal value of (−8)^(1/3).
| Name | Index n | Notation |
|---|---|---|
| Square root | 2 | √(a) |
| Cube root | 3 | ³√(a) |
| General | n ≥ 1 | ⁿ√(a) |
Estimating by hand (Newton)
To approximate ⁿ√(a):
- Guess b.
- Compute c = a / bⁿ⁻¹.
- Set b ← [(n−1) b + c] / n.
- Repeat until the desired decimals stabilize.
Graph sketch
Plotting this calculator’s radicand a ≥ 0 against the principal root for a fixed index (default square root, n = 2):
b = a^(1/n) (a ≥ 0); b = −(−a)^(1/n) (a < 0, n odd); not real (a < 0, n even)
- At a = 0, b = 0
- For n = 2, the graph is the usual √(a) curve in the first quadrant
- Negative a is omitted unless n is an odd integer (then b < 0)
For the dedicated principal square root, including √(x<0) = √(|x|) i, use the Square Root calculator.
CVP (Calculator Verification Protocol)
Math graph pilot under CVP 1.0 Proposed. Profile: core (unitless principal nth root, not an engineering model).
- Evidence Manifest: /evidence/math.root/1.0.6.cvp.json
- Verification sources and digest commitments: /evidence/math.root/1.0.6. Full reference vectors and generators remain in the maintainer tree.
- Independent reference: O1 (NIST DLMF model) + dedicated O3 mpmath/MPFR expected values and numerical behavior + O2 live identities
- Numerical policy: IEEE-754 binary64; path-specific ULP vs tabulated O3 (
declared_before_evaluation=true). Identity n=1 is 0 ULP;Math.sqrt/Math.cbrt/ moderateMath.pow≤2 ULP; extremeMath.powat |a|=1e±300 ≤64 ULP. - Interfaces: UI (SSR), REST, and MCP must agree. A separate integration check covers URL → result → Live graph.
ui-ssris not a live browser session. - Cross-calculator: n=2 on a≥0 agrees with Square Root; even-negative is a documented contract split (
NOT_REALvs principal imaginary), not a numeric identity. - Expert review is optional and is not required for CVP Verified.
- Public claim: CalculatorX CVP Verified · Core · Proposed 1.0 · Evidence available. That is CalculatorX's own CVP run plus a independent reference table retained for maintainers. It is not expert review, not a third-party certification, and not a claim that a reviewer has independently reproduced the suite.
Input precision, sharing, and exports
Enter decimal or scientific numbers such as a=-8&n=3 (result −2). Missing index means 2; an explicitly blank index is an error. The aliases aInput, nInput, and index are accepted only when they agree with the corresponding canonical value. Text is limited to 512 characters. Nonzero text such as 1e-400 cannot be represented in binary64 and returns NUMERIC_UNDERFLOW; subnormal 5e-324 is accepted. Index text must describe an exact positive safe integer before rounding. JSON numeric literals arrive as binary64 and permit ordinary finite rounding; send an index as text when the original decimal must be validated exactly.
Typing computes locally. Shared input links, SSR, REST and MCP send inputs to the server and may enter logs; browser history may retain them. No fixed retention period, deletion guarantee or processing region is claimed here. CSV and JSON retain the full binary64 scalar, raw supplied inputs and calculation version. The 12 significant digit display is an approximation. Shared links use the current engine and show a notice for an older version pin.
Related tools
Other calculators in this family: Antilog Calculator, Exponent Calculator, Exponential Growth Calculator, Log Calculator, Natural Log (ln) Calculator, Square Root Calculator . Explore all Powers, Roots & Logarithms.
Frequently asked questions
Key distinctions behind the calculation.
What is an nth root?
The principal real number b such that bⁿ = a. Notation: ⁿ√a = b. For a ≥ 0 this is a^(1/n). For a < 0 and odd n it is −(−a)^(1/n), not the complex principal power. For even n, b ≥ 0, so √4 = 2 even though (−2)² = 4.
What are square and cube roots?
Square root is the 2nd root (√a). Cube root is the 3rd root (∛a).
Can I take an even root of a negative number?
Not in the reals — this page returns NOT_REAL for √(−4). Odd roots of negatives are real: ∛(−8) = −2. The dedicated Square Root calculator instead reports the principal imaginary (√(−9) = 3i).
How is a root related to exponents?
For a ≥ 0, ⁿ√a = a^(1/n). For a < 0 and odd n, ⁿ√a = −(−a)^(1/n) so the result stays the real odd root (∛(−8) = −2), not the complex principal value of (−8)^(1/3). Raising the principal root to n recovers a: (ⁿ√a)ⁿ = a (when defined). The converse is not automatic for even n: bⁿ = a does not imply b = ⁿ√a unless b ≥ 0.
How can I estimate a root by hand?
Guess b, compute c = a / b^(n−1), then replace b with [(n−1)·b + c] / n. Repeat until stable (Newton / Babylonian method).
Is this the same as roots of an equation?
No. Here “root” means radical (nth root of a number). Roots of an equation are values that make it zero — use the Quadratic calculator for ax²+bx+c=0.
What about n = 0, fractions, or negative n?
n must be a positive safe integer: 1 ≤ n ≤ Number.MAX_SAFE_INTEGER (2⁵³−1). n = 0 is undefined. n = 1 gives ¹√a = a. Non-integer, negative, or non-safe-integer n is not an nth-root index on this page — use the Exponent calculator for a^(1/n) in that case.