CalculatorX Developers
REST API
Call deterministic calculation engines over HTTP. MCP capabilities live in the catalog — this page documents REST engine ids, including tools that are not MCP capabilities yet.
curl -X POST 'https://www.calculatorx.com/api/v1/calc/amps-to-va' \
-H 'Content-Type: application/json' \
-H 'CalculatorX-Spec-Version: 1.4.3' \
-d '{"inputs":{"mode":"amps-va","primary":12,"volts":230,"phase":"single"}}'POST https://www.calculatorx.com/api/v1/calc/amps-to-va
Content-Type: application/json
{
"inputs": {
"mode": "amps-va",
"primary": 12,
"volts": 230,
"phase": "single"
}
}200 OK
{
"id": "amps-to-va",
"engine": "amps-va",
"status": "success",
"result": 2760,
"result_detail": {
"value": 2760,
"unit": "VA",
"formatted": "2,760 VA"
},
"calculation_version": "1.4.3",
"spec_version": "1.4.3"
}Public beta HTTP access to the same deterministic engines that power CalculatorX pages. No API key yet — treat responses as informational and verify critical numbers yourself.
Call with a page alias (tool_id, for example amps-to-va). The response always includes the resolved engine. MCP agents should use capability_id instead — see MCP, the agent guide, and the mapping below.
Ids: tool, engine, capability
Use capability_id when you need a stable semantic identity (MCP and the catalog). REST tool_id is a human-friendly page alias. engine is the implementation that ran — do not couple client logic to it.
| Kind | Example | Role |
|---|---|---|
capability_id |
electrical.apparent_power |
Canonical semantic ID |
tool_id |
amps-to-va |
REST / page alias (POST /api/v1/calc/amps-to-va) |
engine |
amps-va |
Resolved implementation in the response |
Not every REST engine is an MCP capability yet. Some grade/dev helpers (for example gpa) stay engine-tested REST until promoted. Browse templated agent capabilities at /capabilities/.
Endpoint
GET /api/v1/calc
POST /api/v1/calc/:id
Content-Type: application/json
:id may be a public tool alias (amps-to-va) or a callable engine id (amps-va). The response engine is the implementation that ran.
GET /api/v1/calc returns calculation_version, the full list of acceptable ids (canonical + aliases), plus electrical and math catalogs with page links.
Pin a published calculation version with CalculatorX-Spec-Version or calculation_version in the body — mismatch returns HTTP 409. Immutable snapshots and share URLs: Snapshots. Error payloads and rate limits: Errors.
POST body
{ "inputs": { … } }
You may also send the inputs object as the top-level JSON body (without wrapping in inputs).
Success (200)
{
"id": "amps-to-va",
"tool": "amps-to-va",
"engine": "amps-va",
"status": "success",
"inputs": {
"mode": "amps-va",
"primary": 12,
"volts": 230,
"phase": "single"
},
"result": 2760,
"result_detail": {
"value": 2760,
"unit": "VA",
"formatted": "2,760 VA"
},
"formula": {
"id": "amps-to-va_primary",
"expression": "S = V_RMS × I_RMS",
"label": "Single-phase apparent power"
},
"assumptions": [
"AC steady-state with RMS voltage and current magnitudes.",
"Three-phase mode is balanced sinusoidal AC using line-to-line RMS voltage, where V_LL = √3 V_LN and line currents are equal. IEEE 1459 covers a wider set of conditions; this calculator does not.",
"Total power factor λ is not applied to VA/kVA results."
],
"warnings": [
"Result is engine-tested but not expert-reviewed; verify critical use independently."
],
"verification": {
"engine_tested": true,
"expert_reviewed": false,
"source_checked": true,
"reviewed_by": null,
"last_reviewed": null
},
"api_version": "v1",
"api_contract_version": "1.0.0",
"calculation_version": "1.4.3",
"spec_version": "1.4.3",
"page": "https://www.calculatorx.com/calc/electric/amps-to-va"
}
result remains the raw engine value for backward compatibility. Prefer result_detail, formula, assumptions, warnings, and verification for agents. Computational verification is defined by CVP. Supplemental domain review is defined by the Review policy.
When power_factor (λ) is supplied for electrical.apparent_power, the success body also includes derived.estimated_real_power (P_est = S × λ, unit W). Omit power_factor and derived is omitted. Apparent power itself is unchanged.
Version fields:
| Field | Meaning |
|---|---|
api_version |
HTTP API surface (v1) |
api_contract_version |
Shared response/engine contract (bump on breaking API shape changes) |
calculation_version / spec_version |
This tool's calculation version (matches the on-page Spec) |
Incomplete or illegal inputs return HTTP 400 with status: "error" — never success with a NaN result. A valid empty dataset (for example GPA with no counted credits) is HTTP 200 with engine status: "empty" and a null result value. Full status table, ApiError shape, and rate limits: Errors.
id is the id you requested (page alias or canonical). engine is the resolved engine that ran. Both are always present.
CORS is open (Access-Control-Allow-Origin: *).
Base URL is your CalculatorX host, for example https://www.calculatorx.com.
Runnable examples live on Quick start. Agent tools: MCP. Catalog: /capabilities/.
Engine catalog
Engines are grouped like the site hubs. Field names are case-sensitive and match the JSON inputs object. Electrical page aliases (slug leaf) resolve to the same engines used on the calculator pages.
Finance
engineId |
Inputs | Result highlights |
|---|---|---|
compound-interest |
principal, ratePct, years, compoundsPerYear |
fv, interest |
simple-interest |
principal, ratePct, term, termUnit (years / months / days), optional mode |
interest, balance |
vat |
mode (add / extract), amount, ratePct |
net, vat, gross |
loan-payment |
principal, ratePct, termMonths |
payment, totalPaid, totalInterest |
amortization |
same as loan-payment | payment totals + schedule (first 12 periods) |
roi |
cost, gain |
roiPct, profit |
break-even |
fixedCost, price, variableCost |
units, contribution, revenue |
profit-margin |
revenue, cost |
marginPct, profit |
cagr |
startValue, endValue, years |
cagrPct |
discount |
originalPrice, discountPct |
salePrice, saved |
markup |
cost, sellingPrice |
markupPct, marginPct |
present-value |
futureValue, ratePct, years, compoundsPerYear |
pv |
savings-goal |
goal, ratePct, years, principal |
payment |
Matching pages: Finance calculators.
Electrical (page alias → engine)
Generated from the capability registry. MCP electrical tool ids, including adc-error-budget:
Call with (id) |
Resolves to engine |
Inputs (summary) | Page |
|---|---|---|---|
amps-to-va / amps-va |
amps-va |
mode, primary, volts, phase |
/calc/electric/amps-to-va |
watts-to-amps / watts-amps |
watts-amps |
dir, powerOrCurrent, volts, circuit, pf |
/calc/electric/watts-to-amps |
ohms-law |
ohms-law |
any two of V, I, R, P |
/calc/electric/ohms-law |
power-factor |
power-factor |
mode, V, I, P_kW |
/calc/electric/power-factor |
voltage-drop |
voltage-drop |
mode, I, length_m, R_ohm_per_km |
/calc/wire/voltage-drop |
voltage-divider |
voltage-divider |
exactly three of Vin, R1, R2, Vout |
/calc/electric/voltage-divider |
energy-consumption / energy |
energy |
W, hours |
/calc/electric/energy-consumption |
energy-cost |
energy-cost |
mode, W, hours, days, kWh, rate |
/calc/electric/energy-cost |
watt-volt-amp |
watt-volt-amp |
any two of P, V, I, R |
/calc/electric/watt-volt-amp |
electricity / electricity-bill |
electricity-bill |
mode, kWh/prev/curr, rate, standing, days, fee |
/calc/electric/electricity |
amps-to-kw |
phase-product |
a, b, phase, pf, factor (e.g. 0.001) |
/calc/electric/amps-to-kw |
volts-to-kw |
volts-kw |
mode v-kw|kw-v, a, b, phase, pf in (0, 1] |
/calc/electric/volts-to-kw |
power |
electric-power |
mode power-vi|power-ir|power-energy (aliases vi_dc vi_ac_single vi_ac_three_phase_ll i2r energy_average); V×I: a|V, b|I, phase, power_factor in [0, 1] (blank→1, PF=0 is valid); I²R: a|R, b|I; energy: a|E, b|Δt>0 |
/calc/electric/power · MCP electrical.power |
kva-to-amps |
phase-quotient |
a, b, phase, pf, factor |
/calc/electric/kva-to-amps |
amps-to-volts |
amps-volts |
mode plus current/resistance/power/voltage; watts: system; AC requires power_factor; DC must omit it (REST ignore + POWER_FACTOR_IGNORED) |
/calc/electric/amps-to-volts |
watts-to-volts |
phase-quotient |
a, b, phase, pf |
related electric pages |
va-to-kva |
scale |
a, factor |
/calc/electric/va-to-kva |
kw-to-va / watts-to-kva / kwh-to-watts |
scale-quotient |
a, factor |
related electric pages |
watts-to-va |
watts-va |
mode, a|P|S, b|power_factor |
PF required in (0, 1] |
kva-to-kw / volts-to-joules / watts-to-joules |
product |
a, b |
related electric pages |
ev-to-volts / volts-to-ev |
ev-voltage |
mode ev-v-e|ev-v-c|v-ev-e|v-ev-c (or direction + charge_unit); energy_eV|a, voltage_V|a, charge_value|b. Charge is magnitude; Q=0 when solving for V → ZERO_CHARGE. Exact SI e = 1.602176634×10⁻¹⁹ C. MCP electrical.ev_voltage |
/calc/electric/ev-to-volts |
kwh-to-kw |
quotient |
a, b |
related electric pages |
mah-to-wh |
scale-product |
a, b (and scale fields) |
/calc/electric/mah-to-wh |
awg-to-mm / wire-gauge-chart / awg |
awg |
awg, optional field (mm/mm2) |
/calc/wire/awg-to-mm |
swg-to-mm / swg |
swg |
swg, optional field |
/calc/wire/swg-to-mm |
adc-error-budget |
adc-error-budget |
n_bits (integer 1…32), FSR_V, gain_err_LSB, offset_err_LSB, inl_LSB, dnl_LSB, combine (rss / worst_case). MCP electrical.adc.error_budget |
/calc/electric/adc-error-budget |
Canonical helper ids (phase-product, scale-quotient, …) remain callable directly. Browse: Electrical · Wire. The full electrical.* MCP list is generated from the capability registry at the bottom of this page.
Math
Call with (id) |
Resolves to engine |
Inputs (summary) | Page |
|---|---|---|---|
percentage / percent |
percentage |
mode (of / is-what / of-what / change / adjust-up / adjust-down / difference; UI aliases what whole adjust diff); p x y old new a b (share aliases pInput xInput yInput oldInput newInput aInput bInput) |
/calc/math/percentage · MCP math.percentage |
percent-change / percentage-change |
percent-change |
any two of v1, v2, p; optional solve_for (p default / v2 / v1). Aliases v1Input/oldV, v2Input/newV, pInput. Inverse v1 can have 0, 1, or 2 solutions because the denominator is ` |
V₁ |
anti-log / antilog |
antilog |
y (log value); optional base (10 / e / 2 / custom) or b |
/calc/math/anti-log |
log / logarithm |
log |
any two of x, y, optional base/b; optional solve_for (y / x / b) |
/calc/math/log · MCP math.log |
ln / natural-log |
ln |
x (argument > 0; token e allowed) |
/calc/math/ln |
exponent |
exponent |
optional solve_for (y default / a / n); a, n, and/or y |
/calc/math/exponent |
square-root / sqrt |
square-root |
x (radicand; x < 0 → principal imaginary) |
/calc/math/square-root |
pythagorean / pythagoras |
pythagorean |
any two of a, b, c; optional solve_for (a / b / c) or mode=verify. All three without solve_for → verify. Aliases aInput, bInput, cInput. |
/calc/math/pythagorean · MCP math.pythagorean |
root / nth-root |
root |
a (radicand); optional n (positive safe integer index, default 2) |
/calc/math/root |
sin / sine |
sin |
theta; optional unit (deg default / rad) |
/calc/math/sin |
cos / cosine |
cos |
theta; optional unit (deg default / rad) |
/calc/math/cos |
tan / tangent |
tan |
theta; optional unit (deg default / rad); exact poles → UNDEFINED; near-pole → finite + NEAR_SINGULARITY |
/calc/math/tan |
arcsin / asin |
arcsin |
x ∈ [−1, 1]; result { deg, rad } |
/calc/math/arcsin |
arccos / acos |
arccos |
x ∈ [−1, 1]; result { deg, rad } |
/calc/math/arccos |
arctan / atan |
arctan |
x any finite real; result { deg, rad } |
/calc/math/arctan |
multiplication |
multiplication |
a, b; optional mode (product / long) |
/calc/math/multiplication · MCP math.multiplication |
add / sum |
sum |
values array or sumInput text list; optional mode (sum / long) |
/calc/math/add · MCP math.sum |
division / divide |
divide |
a, b; optional mode (quotient / long), decimals |
/calc/math/division · MCP math.divide |
exponential-growth |
exponential-growth |
x0, ratePct, t; optional model (periodic / continuous) |
/calc/math/exponential-growth · MCP math.exponential_growth |
scientific-notation |
scientific-notation |
mode (dec-sci / sci-dec / convert / engineering / normalize / operate) plus mode fields |
/calc/math/scientific-notation · MCP math.scientific_notation |
subtraction / subtract |
subtraction |
any two of minuend, subtrahend, difference; optional mode (difference / long). Share aliases minInput, subInput, diffInput. Long mode: non-negative, minuend may be smaller (negative difference). |
/calc/math/subtraction · MCP math.subtraction |
factorial |
factorial |
n (integer, 0 ≤ n ≤ 5000; alias nInput) |
/calc/math/factorial · MCP math.factorial |
gcf / gcd / hcf |
gcf |
values (integer array, ≥ 2) or share-URL numsInput |
/calc/math/gcf · MCP math.gcf |
lcm / lcd |
lcm |
values (integer array, ≥ 2) or share-URL numsInput |
/calc/math/lcm · MCP math.lcm |
ratio |
ratio |
mode (simplify / proportion / scale / split / compare / convert); a b optional c d k total (share aliases aInput…) |
/calc/math/ratio · MCP math.ratio |
fractions |
fractions |
mode (operate / simplify / to-dec / from-dec); op (+ − * /, aliases add…); aNum aDen bNum bDen (optional aWhole bWhole); decimal for from-dec |
/calc/math/fractions · MCP math.fractions |
/api/v1/calc/percentage
{
"inputs": {
"mode": "of",
"p": 20,
"x": 250
}
}
{ "mode": "of", "value": 50, "Y": 50, "formula": "Y = X × P / 100", … }
/calc/math/percentage?pInput=20&xInput=250&mode=of. UI aliases pInput/xInput and REST names p/x are equivalent. MCP capability: math.percentage. Percent change uses |old| in the denominator; percentage difference is defined for A ≥ 0, B ≥ 0, A+B ≠ 0./api/v1/calc/percent-change
{
"inputs": {
"v1": 60,
"v2": 72
}
}
{ "solve_for": "p", "value": 20, "direction": "increase", … }
{ "inputs": { "solve_for": "v1", "v2": 25, "p": 200 } } → status: "multiple_solutions" with solutions: [8.333…, -25]. Share URL: /calc/math/percentage-change?solve_for=p&v1Input=60&v2Input=72. Alias percentage-change. Signed convention: % change = (V₂−V₁)/|V₁|×100%. MCP capability: math.percent_change. CVP cross-interface PASS for this tool is SSR query-result HTML · REST · MCP handler equivalence, not a live browser session./api/v1/calc/anti-log
{
"inputs": {
"y": 3,
"base": "10"
}
}
1000
/calc/math/anti-log?y=3&base=10. MCP capability: math.antilog./api/v1/calc/log
{
"inputs": {
"x": 100,
"base": "10"
}
}
{
"solve_for": "y",
"value": 2,
"b": 10,
"x": 100,
"y": 2
}
{ "inputs": { "base": "10", "y": 3 } } → x = 1000; { "inputs": { "x": 8, "y": 3 } } → b = 2. Share URL: /calc/math/log?x=100&base=10. MCP capability: math.log. The Log page also shows an engine-linked Live graph of y = log_b(x) sampled with the same formulas as the numeric result and clipped to x > 0. Function view (default) uses a canonical window 0.1 ≤ x ≤ 10 so (1, 0) stays readable; Focus zooms around the current point. The same Live graph template (Function / Focus, engine-linked sampling) is used on ln, antilog, exponent, square root, root, sin, cos, tan, arcsin, arccos, and arctan./api/v1/calc/ln
{
"inputs": {
"x": 10
}
}
{ "y": ln(10), "value": ln(10), "verification": { "expression": "exp(result)", "passed": true } }
/calc/math/ln?x=10. MCP capability: math.ln. Inverse x = e^y is Antilog with base: "e"./api/v1/calc/exponent
{
"inputs": {
"a": 2,
"n": 10
}
}
1024
{ "inputs": { "solve_for": "n", "a": 2, "y": 1024 } } → { "solve_for": "n", "value": 10, ... }; { "inputs": { "solve_for": "a", "n": 2, "y": 4 } } → principal 2 with solutions: [2, -2] and TWO_REAL_SOLUTIONS. Share URL: /calc/math/exponent?solve_for=y&a=2&n=10. MCP capability: math.exponent. Forward 0^0 is UNDEFINED_POWER. Even integer bases of a positive power report both real signs./api/v1/calc/square-root
{
"inputs": {
"x": 144
}
}
{
"principal": 12,
"real": 12,
"imag": 0
}
/calc/math/square-root?x=144. MCP capability: math.square_root. For x < 0 the principal imaginary is in imag (for example x: -9 → imag: 3)./api/v1/calc/pythagorean
{
"inputs": {
"a": 3,
"b": 4
}
}
{ "solve_for": "c", "value": 5, "c": 5, "area": 6, "perimeter": 12, … }
{ "inputs": { "solve_for": "a", "b": 4, "c": 5 } } → a = 3. All three sides without solve_for verifies a²+b²=c² instead of overwriting c: { "inputs": { "a": 3, "b": 4, "c": 5 } } → mode: "verify". Share URLs: /calc/math/pythagorean?solve_for=c&aInput=3&bInput=4 and /calc/math/pythagorean?mode=verify&aInput=3&bInput=4&cInput=5. MCP capability: math.pythagorean./api/v1/calc/root
{
"inputs": {
"a": 27,
"n": 3
}
}
3
/calc/math/root?a=27&n=3. MCP capability: math.root. Index n is a positive safe integer (Number.isSafeInteger(n) && n ≥ 1, default 2, maximum Number.MAX_SAFE_INTEGER = 9007199254740991). Even roots of a < 0 return NOT_REAL (unlike Square Root, which returns an imaginary). Non-integer, negative, or non-safe-integer n (including n outside JavaScript’s safe-integer range) returns INVALID_INDEX — those are generalized powers on Exponent, not this nth-root contract. For a < 0 and odd n, the engine uses −(|a|)^(1/n), not the complex principal power./api/v1/calc/sin
{
"inputs": {
"theta": 30,
"unit": "deg"
}
}
0.5
/calc/math/sin?theta=30. MCP capability: math.sin. Default unit is degrees./api/v1/calc/cos
{
"inputs": {
"theta": 60,
"unit": "deg"
}
}
0.5
/calc/math/cos?theta=60. MCP capability: math.cos./api/v1/calc/tan
{
"inputs": {
"theta": 45,
"unit": "deg"
}
}
1
/calc/math/tan?theta=45. MCP capability: math.tan. Exact odd multiples of 90° return UNDEFINED (not Infinity). Angles extremely close to a pole return a finite value with warnings: [{ code: "NEAR_SINGULARITY" }]./api/v1/calc/arcsin
{
"inputs": {
"x": 0.5
}
}
{ "deg": 30, "rad": π/6 }
/calc/math/arcsin?x=0.5. MCP capability: math.arcsin. Values outside [−1, 1] return NOT_REAL./api/v1/calc/arccos
{
"inputs": {
"x": 0.5
}
}
{ "deg": 60, "rad": π/3 }
/calc/math/arccos?x=0.5. MCP capability: math.arccos./api/v1/calc/arctan
{
"inputs": {
"x": 1
}
}
{ "deg": 45, "rad": π/4 }
/calc/math/arctan?x=1. MCP capability: math.arctan./api/v1/calc/factorial
{
"inputs": {
"n": 5
}
}
{
"n": 5,
"value": 120,
"exact": "120",
"digits": 3,
"expansion": "5! = 5 × 4 × 3 × 2 × 1",
"scientific": "1.2 × 10^2",
"max_n": 5000
}
/calc/math/factorial?n=5. MCP: search_capabilities → inspect_capability → execute_calculation with capability_id: "math.factorial" (pin 1.0.2). Ordinary factorial only; Gamma for non-integers is out of scope. Domain 0 ≤ n ≤ 5000 is a CalculatorX product bound, not a NIST bound. On-page display omits scientific notation when digits ≤ 30./api/v1/calc/gcf
{
"inputs": {
"values": [
8,
12,
20
]
}
}
{ "value": 4, "exact": "4", "formula": "GCF(a,b,c,…) = GCF(GCF(a,b),c,…)", "methods": { "agree": true, … } }
/calc/math/gcf?numsInput=8,12,20. MCP: execute_calculation with capability_id: "math.gcf" (pin 1.0.2). Exact BigInt Euclidean fold; zeros are ignored unless every input is 0 (UNDEFINED). Integers beyond Number.MAX_SAFE_INTEGER must be decimal strings. Each integer ≤ 48 digits./api/v1/calc/lcm
{
"inputs": {
"values": [
8,
12
]
}
}
{ "value": 24, "exact": "24", "formula": "LCM(a,b,c,…) = LCM(LCM(a,b),c,…)", "methods": { "agree": true, … } }
/calc/math/lcm?numsInput=8,12. MCP: execute_calculation with capability_id: "math.lcm" (pin 1.0.3). Exact BigInt GCF-identity fold LCM(a,b)=|a/GCF(a,b)×b| (divide first; both nonzero). If any input is 0, LCM = 0; LCM(0,0)=0 is a CalculatorX/Python convention (the identity would divide by zero). Integers beyond Number.MAX_SAFE_INTEGER must be decimal strings. Each integer ≤ 48 digits./api/v1/calc/ratio
{
"inputs": {
"mode": "simplify",
"a": 12,
"b": 18
}
}
{ "value": "2:3", "terms": [2, 3], "gcf": 6, … }
/calc/math/ratio?aInput=12&bInput=18&mode=simplify. MCP: execute_calculation with capability_id: "math.ratio" (pin 1.0.2). Terms are exact rationals (integers, terminating decimals, simple a/b). Simplify clears denominators by their LCM, then divides by GCF. Split requires every term ≥ 0 and Σ terms > 0 (SPLIT_NEGATIVE_TERM / SPLIT_ZERO_SUM). Integer simplify work omits a no-op decimal-clearing step./api/v1/calc/fractions
{
"inputs": {
"mode": "operate",
"op": "+",
"aNum": 3,
"aDen": 4,
"bNum": 1,
"bDen": 6
}
}
{ "improper": "11/12", "n": 11, "d": 12, … }
/calc/math/fractions?aNum=3&aDen=4&bNum=1&bDen=6&mode=operate. MCP: execute_calculation with capability_id: "math.fractions" (pin 1.0.5). Add/subtract use LCD (LCM of denominators); (ad ± bc)/bd is an equivalent check only. Denominator 0 → DENOMINATOR_MUST_BE_NONZERO; a/b ÷ 0/n → DIVISION_BY_ZERO./api/v1/calc/subtraction
{
"inputs": {
"minuend": 245,
"subtrahend": 147
}
}
{ "solve_for": "difference", "value": 98, "formula": "a − b = d", … }
/calc/math/subtraction?minInput=245&subInput=147&mode=difference. Solve-for: omit minuend to get ? − 6 = 9 → 15. Long mode (mode=long) keeps the minuend on top; 45 − 123 = −78. MCP capability: math.subtraction./api/v1/calc/add
{
"inputs": {
"sumInput": "1,2,3"
}
}
{ "value": 6, "sum": 6, … }
/calc/math/add?sumInput=1,2,3. MCP capability: math.sum./api/v1/calc/multiplication
{
"inputs": {
"a": 8,
"b": 6
}
}
{
"product": 48,
"productStr": "48",
"mode": "product"
}
/calc/math/multiplication?a=8&b=6. MCP capability: math.multiplication. Long mode (mode: "long") adds partial-product work. Missing a or b → INVALID_INPUT./api/v1/calc/division
{
"inputs": {
"a": 20,
"b": 4
}
}
{ "mode": "quotient", "value": 5, … }
/calc/math/division?a=20&b=4. MCP capability: math.divide. b = 0 → DIVISION_BY_ZERO./api/v1/calc/exponential-growth
{
"inputs": {
"x0": 100,
"ratePct": 5,
"t": 2
}
}
110.25
/calc/math/exponential-growth?x0=100&ratePct=5&t=2. MCP capability: math.exponential_growth. Periodic model requires ratePct > −100./api/v1/calc/scientific-notation
{
"inputs": {
"mode": "dec-sci",
"value": 12300
}
}
{
"coef": 1.23,
"exp": 4
}
/calc/math/scientific-notation?mode=dec-sci&value=12300. MCP capability: math.scientific_notation.Grade
Call with (id) |
Resolves to engine |
Inputs (summary) | Page |
|---|---|---|---|
gpa |
gpa |
mode (courses / quick / planner), scale (4.33 / 4.0; legacy custom = 4.33 base), optional aplus (A+ overlay on the selected base), courses or totals / planner fields |
/calc/grade/gpa |
final-grade |
final-grade |
mode (need / overall / weighted / points), currentInput, goalInput, weightInput (and mode-specific fields) |
/calc/grade/final-grade · MCP education.final_grade |
Courses mode accepts courses as an array of { name?, credits, grade } or compact name:credits:grade rows.
Empty dataset is a valid non-result, not an input error. Zero counted credits return HTTP 200 with { gpa: null, status: "empty" } — never NaN. Negative credits, incomplete prior GPA/credits, or planner A = 0 return engine status: "invalid" with a code (CREDITS_OUT_OF_RANGE, PRIOR_CREDITS_REQUIRED, ADDITIONAL_CREDITS_MUST_BE_POSITIVE, …). Unknown scale ids canonicalize to 4.33; a filled aplus replaces A+ only and keeps other letters on the selected 4.33 or 4.0 base (scale=custom is the legacy 4.33-base alias).
Planner mode adds reachability (secured / attainable / unreachable), unreachable, minAdditionalCredits, and unreachableExact when the target equals the selected scale maximum while current GPA is below it (no finite credit load hits the exact cap; limitApproaches is the scale maximum).
Need-on-final uses Needed = (Goal×100 − Current×(100−W)) / W. W = 0 returns { status: "invalid", code: "WEIGHT_REQUIRED" }. Results include reachability: attainable, unreachable (> 100%), or secured (≤ 0%). Share URL example: /calc/grade/final-grade?currentInput=85&goalInput=90&weightInput=40&mode=need. MCP: search_capabilities → inspect_capability → execute_calculation with capability_id: "education.final_grade" (pin 1.1.1).
Dev / data helpers
engineId |
Inputs | Result |
|---|---|---|
base64 |
mode (encode / decode), text |
Encoded or decoded string |
url-codec |
mode (encode / decode), text |
URL-encoded string |
ascii |
char |
dec, hex, bin |
http-status |
code |
Status metadata |
hex-to-rgb |
hex |
r, g, b |
rgb-to-hex |
r, g, b |
#RRGGBB |
base-convert |
value, fromBase, toBase |
Converted string |
Versioning
api_contract_version is 1.0.0. It bumps only when the HTTP response shape or engine contract breaks callers.
Each tool response sets calculation_version / spec_version from that tool's on-page Spec (for example Amps to VA is 1.4.3). Pin integrations against both the numeric result and the tool version. See Versioning & trust.
Limits and beta notes
- No authentication or per-key quota yet — do not hammer the endpoint. Rate limits: Errors.
- Engines throw on illegal inputs → HTTP
400with anerrormessage. - Image converters and similar UI-only tools are not in this API.
- Prefer page aliases (
amps-to-kw) in integrations so URLs match the site;enginein the response tells you what ran. - MCP
execute_calculationcovers the core capability catalog, includingeducation.final_grade,math.factorial,math.fractions,math.gcf,math.lcm, andmath.ratio. Registry engines such asgpaandantilogare available on RESTPOST /api/v1/calc/:ideven when they are not yet MCP capabilities.
See also
Capability engine catalog
Generated from the capability registry (GET /.well-known/calculatorx-capabilities.json). Every electrical.* MCP tool is listed here — including
adc-error-budget. Prefer this table over hand-maintained summaries when discovering Agent endpoints.