Skip to content

Calculator API

This API provides a high-precision mathematical calculator. It allows for complex expression evaluationI, useful for bots, apps or other applications needing safe math parsing.

  • Arithmetic: +, -, *, /, ^
  • Functions: sqrt(), sin(), cos(), log()
  • Unit conversion: 5 cm to inch
POST /api/v1/calc

The following parameters are accepted in the request body:

FieldTypeRequiredDescription
exprstringYesThe mathematical expression to evaluate.
Terminal window
curl -X POST https://heavstal.com.ng/api/v1/calc \
-H "Content-Type: application/json" \
-H "x-api-key: <YOUR_API_KEY>" \
-d '{"expr": "sqrt(16) + 5^2"}'
{
"status": "success",
"creator": "HEAVSTAL TECH",
"data": {
"expression": "sqrt(16) + 5^2",
"result": "29"
}
}