Scientific Calculator API
Evaluate a maths expression safely (no eval): + − × ÷ ^, brackets, factorial (!), percent, trig and inverse trig, hyperbolic, logs, roots, exp, abs, rounding, and the constants pi, e and tau.
POST /api/v1/tools/scientific-calculatorMCP scientific_calculatorCalculatorsA free scientific calculator with trig in degrees or radians, logs, powers, roots, factorials and brackets. Type an expression or use the keypad.
Input
Send these as a JSON object. Unknown fields are rejected.
- expression
- The expression, up to 1,000 characters, e.g. "2^10 + sqrt(144) * sin(30)". Functions: sin cos tan asin acos atan sinh cosh tanh sqrt cbrt ln log (base 10) log2 exp abs floor ceil round. Implicit multiplication works (2pi, 3(4+5)). x! is factorial (up to 170!). (string, up to 1000 characters, required)
- angle
- Angle unit for trig functions: deg (degrees) or rad (radians). (string, one of deg, rad, default "deg")
- ans
- Value to use for `ans` (the previous result) in the expression. (number, default 0)
curl https://pithlab.com/api/v1/tools/scientific-calculator \n -H "Authorization: Bearer $PITHLAB_KEY" \n -H "Content-Type: application/json" \n -d '{"expression":"2^10 + sqrt(144) * sin(30)","angle":"deg"}'Example response
{
"ok": true,
"result": {
"value": 1030,
"formatted": "1030"
}
}