Date Calculator API

GET

Measure the exact span between two dates in days, months, and years.

Date Calculator computes the difference between two calendar dates in minutes, hours, days, weeks, months, and years. Supply start and end dates in YYYY-MM-DD format to receive exact interval breakdowns.

Try it — live request, no key required

Request
GETapi.apiverve.com/v1/datecalculator?start=2022-01-01&end=2022-12-31
Query parameters
Verification
Format

No key required to try it. Get a key to use it in your app.

Example
{
  "status": "ok",
  "error": null,
  "data": {
    "minutes": 524160,
    "hours": 8736,
    "days": 364,
    "weeks": 52,
    "months": 11,
    "years": 0,
    "start": {
      "date": "2022-01-01",
      "day": "Saturday",
      "month": "January",
      "year": "2022",
      "words": "Saturday, January 1st 2022"
    },
    "end": {
      "date": "2022-12-31",
      "day": "Saturday",
      "month": "December",
      "year": "2022",
      "words": "Saturday, December 31st 2022"
    }
  }
}

About the Date Calculator API

Date Calculator works by analyzing the dates provided and calculating the date difference. It uses advanced algorithms to calculate the date difference based on the dates and returns the calculated date difference.

What people use it for

Billing Cycle Tracking
Subscription management platforms calculate elapsed days and months between customer signup dates and renewal periods to generate accurate prorated invoices.
Milestone Deadline Tracking
When managing sprint deadlines, engineering tools track remaining weeks and days against delivery targets to flag overdue milestones.
Hotel Stay Calculation
Booking engines compute total nights and days between check-in and check-out dates to present stay lengths and determine nightly rate totals.
Insurance Policy Eligibility
To determine policy eligibility, insurance portals calculate the total years and months between an incident date and policy inception.

Ways to call it

One endpoint, many ways in — REST with JSON, XML, YAML and CSV, plus GraphQL and an MCP interface for AI agents.

JSON
Default REST response
XML
Markup format
YAML
Human-readable
CSV
Tabular export
Beta
GraphQL
Query language
New
MCP
For AI agents

Other ways to use Date Calculator

Same data, same APIVerve account, same credit balance — one key works on all of them.

Questions.

Common questions about the Date Calculator API.

Read the docs
What units of time difference does the API return?
Every request returns the total elapsed time across multiple units: minutes, hours, days, weeks, months, and years. You also get formatted calendar values for both the start and end dates.
Which plan fits 25,000 date calculations a month?
The Starter plan handles this easily. At 2 credits per calculation, 25,000 requests consume 50,000 of the 200,000 credits included on Starter, which works out to about $0.30 per 1,000 calls. The Free plan offers 100 calculations per month for testing.
Are day and month names included on the Free plan?
No. The day of the week, month name, and written date descriptions for the start and end dates are premium fields. Any paid plan, starting with Starter, unlocks these text fields alongside the numeric difference values.
What date format does the API accept?
Both the start and end dates must use the standard YYYY-MM-DD format. Omitting either date or using a different date layout prevents Date Calculator from processing the calculation.
Does it calculate time spans across multiple years?
Yes. You can compare dates separated by days or across many years. The response breaks down the entire elapsed duration into total minutes, hours, days, weeks, months, and full years.

Ready to build with Date Calculator? Start with 200 free credits — one key unlocks all 300+ APIs.

Explore the catalog

300+ APIs on the same key and the same response shape.

Browse all APIs