Date Math v1.7.0
Date Math / Tools / subscription_dates

Subscription renewal and proration dates

Subscription and contract date math: current billing period, next renewal, upcoming renewals, cancel-by date for a notice period, free-trial start, and day-based proration of a price. Month-end anchors stay at month end (Jan 31, Feb 28, Mar 31). Use for SaaS billing, renewals, cancellation deadlines and refunds.

MCP tool subscription_datesHTTP POST /v1/subscription25 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.

subscription_dates
result
{
  "start": "2026-01-31",
  "billing_start": "2026-01-31",
  "interval": "month",
  "interval_count": 1,
  "as_of": "2026-03-10",
  "status": "active",
  "current_period": {
    "number": 2,
    "start": "2026-02-28",
    "end": "2026-03-30",
    "days": 31,
    "days_elapsed": 10,
    "days_remaining": 21
  },
  "next_renewal": "2026-03-31",
  "next_renewal_weekday": "Tuesday",
  "cancel_by": "2026-03-24",
  "cancel_by_passed": false,
  "upcoming_renewals": [
    "2026-03-31"
  ],
  "proration": {
    "amount": 30,
    "daily_rate": 0.967742,
    "used": 9.68,
    "unused": 20.32,
    "ratio_unused": 0.677419
  },
  "note": "Renewals are measured from the first billing date, so month-end anchors stay at month end (Jan 31 -> Feb 28 -> Mar 31). Proration is by whole days as of the start of as_of."
}

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 subscription_dates 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/subscription \
  -H "Content-Type: application/json" \
  -d '{"start":"2026-01-31","interval":"month","as_of":"2026-03-10","notice_days":7,"amount":30}'

Full schema: OpenAPI · llms.txt