Skip to content

Heavstal Calculator

Heavstal Calc is a high-precision mathematical engine powered by MathJS. It allows for complex expression evaluation via API, useful for bots or apps needing safe math parsing.

POST /calc

FieldTypeRequiredDescription
exprstringYesThe mathematical expression to evaluate.
  • Arithmetic: +, -, *, /, ^
  • Functions: sqrt(), sin(), cos(), log()
  • Unit conversion: 5 cm to inch
const res = await fetch('https://heavstal.com.ng/api/v1/calc', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'x-api-key': 'YOUR_API_KEY'
},
body: JSON.stringify({ "expr": "sqrt(16) + 5^2" })
});
const data = await res.json();
{
"status": "success",
"creator": "HEAVSTAL TECH",
"data": {
"expression": "sqrt(16) + 5^2",
"result": "29"
}
}