Math & Statistics Calculator API for AI Agents
Exact arithmetic and statistics for AI agents and apps. Evaluate math expressions safely and get count, sum, mean, median, mode, variance and standard deviation for a list of numbers, so your LLM stops guessing the numbers.
Run it on Apify · Source on GitHub
Pricing
US$0.002 per calculation run. Billed per use through your Apify account; new accounts get free monthly credit.
Example
Input:
{
"expressions": [
"2+3*4"
]
}
Output:
{
"type": "expression",
"expression": "2+3*4",
"result": 14
}
Use it from code (API)
curl -X POST "https://api.apify.com/v2/acts/axzkhcYBuNggX5xpz/run-sync-get-dataset-items" \
-H "Authorization: Bearer $APIFY_TOKEN" -H "Content-Type: application/json" \
-d '{"expressions":["2+3*4"]}'