Excel WORKDAY function: date after working days API
The date a number of working days before or after a date, with holidays and any weekend, as Excel's WORKDAY and WORKDAY.INTL.
POST https://api.curatedapi.com/v1/calc/excel/workday
- Version 1
- MCP tool
calc_excel_workday - Try it in the browser
WORKDAY.INTL(start_date, days, [weekend], [holidays]). The start date itself is not counted; days = 0 returns start_date.
Formula
step day by day, counting only working days
- Arguments are named and ordered as in Excel. Excel computes in binary floating point; this API computes the exact value of the same formula and rounds it once, so it agrees with Excel to the digits Excel can show, and where Excel's own rounding error reaches the 15th digit this answer is the correct one.
- Dates are ISO 8601 (YYYY-MM-DD) from 1900-03-01 to 9999-12-31, so Excel's fictional 29 February 1900 never comes into play. Each date result also gives Excel's serial number (1900 date system).
Inputs
Send numbers as strings to keep every digit. options sets precision and rounding (see numbers and rounding).
| Input | Type | Description |
|---|---|---|
start_date required |
date (YYYY-MM-DD) | Start date. |
days required |
integer | Working days to move (negative for earlier). Allowed: >= -35000 and <= 35000. |
holidays |
list of date (YYYY-MM-DD) default [] |
Dates that are not working days. Up to 1000 items. |
weekend |
string default 1 |
Weekend days, as in NETWORKDAYS.INTL: a weekend number ("1" Saturday and Sunday, "2" Sunday and Monday, ... "7" Friday and Saturday, "11" Sunday only, ... "17" Saturday only) or seven 0s and 1s starting on Monday, 1 for a weekend day ("0000011" is Saturday and Sunday). At most 7 characters. |
options.rounding |
half_even | half_up | half_down | up | down | ceiling | floor | Rounding mode applied once to each result. Default half_even. |
options.decimals |
integer | Round results to this many digits after the decimal point. |
options.significant_digits |
integer | Round results to this many significant digits. |
Result
Under result in the answer, next to exactness, precision, inputs, formula, references and warnings.
| Result | Type | Description |
|---|---|---|
date | date (YYYY-MM-DD) | The resulting date. |
serial | integer | Excel's serial number for the date. |
Examples
Microsoft's example: 151 working days from 1 October 2008
curl https://api.curatedapi.com/v1/calc/excel/workday \
-H "Authorization: Bearer $CURATEDAPI_KEY" \
-H "Content-Type: application/json" \
-d '{
"start_date": "2008-10-01",
"days": 151
}'
{
"calculator": "excel/workday@1",
"result": {
"date": "2009-04-30",
"serial": 39933
},
"exactness": {},
"precision": {
"rounding": "half_even",
"decimals": 0
},
"inputs": {
"start_date": "2008-10-01",
"days": 151,
"holidays": [],
"weekend": "1"
},
"formula": "step day by day, counting only working days",
"references": [
{
"title": "Microsoft Excel WORKDAY function",
"url": "https://support.microsoft.com/en-us/excel/functions/workday-function"
},
{
"title": "Microsoft Excel WORKDAY.INTL function",
"url": "https://support.microsoft.com/en-us/excel/functions/workday-intl-function"
}
],
"warnings": []
}
Microsoft's example: the same, with three holidays
curl https://api.curatedapi.com/v1/calc/excel/workday \
-H "Authorization: Bearer $CURATEDAPI_KEY" \
-H "Content-Type: application/json" \
-d '{
"start_date": "2008-10-01",
"days": 151,
"holidays": ["2008-11-26", "2008-12-04", "2009-01-21"]
}'
{
"calculator": "excel/workday@1",
"result": {
"date": "2009-05-05",
"serial": 39938
},
"exactness": {},
"precision": {
"rounding": "half_even",
"decimals": 0
},
"inputs": {
"start_date": "2008-10-01",
"days": 151,
"holidays": [
"2008-11-26",
"2008-12-04",
"2009-01-21"
],
"weekend": "1"
},
"formula": "step day by day, counting only working days",
"references": [
{
"title": "Microsoft Excel WORKDAY function",
"url": "https://support.microsoft.com/en-us/excel/functions/workday-function"
},
{
"title": "Microsoft Excel WORKDAY.INTL function",
"url": "https://support.microsoft.com/en-us/excel/functions/workday-intl-function"
}
],
"warnings": []
}
Microsoft's example (WORKDAY.INTL): 90 days, Sunday-only weekend
curl https://api.curatedapi.com/v1/calc/excel/workday \
-H "Authorization: Bearer $CURATEDAPI_KEY" \
-H "Content-Type: application/json" \
-d '{
"start_date": "2012-01-01",
"days": 90,
"weekend": "11"
}'
{
"calculator": "excel/workday@1",
"result": {
"date": "2012-04-14",
"serial": 41013
},
"exactness": {},
"precision": {
"rounding": "half_even",
"decimals": 0
},
"inputs": {
"start_date": "2012-01-01",
"days": 90,
"holidays": [],
"weekend": "11"
},
"formula": "step day by day, counting only working days",
"references": [
{
"title": "Microsoft Excel WORKDAY function",
"url": "https://support.microsoft.com/en-us/excel/functions/workday-function"
},
{
"title": "Microsoft Excel WORKDAY.INTL function",
"url": "https://support.microsoft.com/en-us/excel/functions/workday-intl-function"
}
],
"warnings": []
}
References
Results follow each calculator's documented rules and the sources listed. They are not financial, tax or legal advice. Check that the rules fit your case before you rely on a result. See the terms.
Errors share one format; see errors. Billing, retries and batches work the same for every endpoint.