Home › APIs › Calculators & dates
Date Calculator API
Counts the days between two dates, or adds days, weeks or months to a date.
Used by: Small businesses, HR and payroll, finance apps and everyday users.
Days, weeks, months and years between two dates, or add/subtract days, weeks, months or years to a date. Runs on our server, files are deleted right after the call, nothing stored.
Try it live, no sign-up
Run the example as is, or change the input. 5 own tries a day without a key.
Example request
curl -X POST https://radarbg.com/v1/date-calculator \
-H "X-API-Key: YOUR_KEY" -H "Content-Type: application/json" \
-d '{"mode": "between", "date": "2026-01-01", "date2": "2026-12-31"}'
Answer: {"ok": true, "count": N, "items": [...], "usage": {...}}. Failed calls are not counted.
Inputs
| Field | Type | Description |
|---|---|---|
mode | string | between, add or sub |
date | string | Date YYYY-MM-DD |
date2 | string | Second date (mode=between) |
includeBoth | boolean | Count first and last day (mode=between) |
number | integer | How many (mode=add/sub) |
unit | string | days, weeks, months or years |
Price
Included in every plan: 500 calls a month free, then from €9 a month for 5,000 calls across all APIs. Pro, €29 for 25,000 calls, is the one we recommend.
Questions
What does the Date Calculator API do?
Counts the days between two dates, or adds days, weeks or months to a date.
Where does the data come from?
Days, weeks, months and years between two dates, or add/subtract days, weeks, months or years to a date. Runs on our server, files are deleted right after the call, nothing stored.
How much does it cost?
500 calls a month are free with no card. Paid plans start at EUR 9 a month for 5,000 calls and include every API on Radar. Failed calls are not counted.
Can I use it without writing code?
Yes. Try it live on this page, use our free browser tools, or ask us to run it on your list as a service.