Business days between two dates
How many days, weeks, months or business days between two dates or datetimes: calendar (Y/M/D), totals, and business days (weekdays in [from, to) minus holidays; pass country to exclude its public holidays). Use for age, tenure, countdowns, notice periods and working days until a deadline.
MCP tool date_diffHTTP POST /v1/diff25 free calls a day, then $0.001
Try it
Runs the real tool over MCP. Edit the arguments and run. Uses your daily free calls.
date_diff
result
{
"from": "2026-01-31",
"to": "2026-03-15",
"direction": "forward",
"total_days": 43,
"total_weeks": 6,
"calendar": {
"years": 0,
"months": 1,
"days": 15
},
"business_days": 29,
"iso_duration": "P1M15D"
}
The result shown before you run is a saved example response.
Use it from your agent
Add the MCP server once and your agent can call date_diff and the other 19 tools.
Claude Code
One command in your terminal.
claude mcp add --transport http date-math https://date-math.datemath.workers.dev/mcp
Any MCP client
Claude Desktop, Cursor, VS Code, Windsurf.
{
"mcpServers": {
"date-math": {
"url": "https://date-math.datemath.workers.dev/mcp"
}
}
}HTTP + x402
POST JSON; pay the 402 with any x402 client.
curl -X POST https://date-math.datemath.workers.dev/v1/diff \
-H "Content-Type: application/json" \
-d '{"from":"2026-01-31","to":"2026-03-15","country":"US"}'