How Many Working Days Between Two Dates?
In project management, leave approval, and contract duration calculations, you often need to determine the number of working days between two dates. Manual calculation is time-consuming and error-prone. This guide explains working day calculation methods, formulas, and practical tips, along with a free online working day calculator.
What is a Working Day?
A working day typically refers to Monday through Friday, excluding Saturday and Sunday. However, in practice, you also need to consider:
- Public Holidays: New Year, Spring Festival, Qingming, Labor Day, Dragon Boat, Mid-Autumn, National Day, etc.
- Holiday Swaps: Some weekends may become working days due to holiday adjustments
- Company Policies: Some companies may have additional holiday arrangements
Working Day Calculation Methods
Method 1: Manual Calculation (Simple Scenarios)
For simple scenarios without holidays, follow these steps:
- Calculate total days between the two dates
- Count the number of Saturdays and Sundays
- Working days = Total days - Weekend days
Example: August 3, 2026 (Monday) to August 7, 2026 (Friday)
- Total days: 5
- Weekend days: 0
- Working days: 5
Method 2: Including Holidays (Complex Scenarios)
When date ranges include public holidays, additional deductions are needed:
- Calculate base working days (excluding weekends)
- Identify public holidays within the range
- Deduct holiday days
- Add back any swapped working days
Working Day Calculation Formula
General working day calculation formula:
Working Days = Total Days - Weekend Days - Holiday Days + Swapped Working Days
JavaScript Implementation
function calculateWorkdays(startDate, endDate, holidays = []) {
let workdays = 0;
const current = new Date(startDate);
while (current <= endDate) {
const dayOfWeek = current.getDay();
const isWeekend = dayOfWeek === 0 || dayOfWeek === 6;
const isHoliday = holidays.some(h =>
h.toDateString() === current.toDateString()
);
if (!isWeekend && !isHoliday) {
workdays++;
}
current.setDate(current.getDate() + 1);
}
return workdays;
}
Common Use Cases
1. Project Scheduling
Project managers need to estimate task durations in working days to create realistic project plans. For example:
- Requirements analysis: 5 working days
- Development phase: 15 working days
- Testing phase: 5 working days
- Total duration: 25 working days (approximately 5 weeks)
2. Leave Approval
When employees request leave, HR needs to calculate the number of working days. For example:
- Leave period: August 11, 2026 (Monday) to August 15, 2026 (Friday)
- Working days: 5 days
- If holidays are included, actual leave days may be fewer
3. Contract Duration
Contract durations are often specified in working days. For example:
- Contract signing date: August 1, 2026
- Duration: 30 working days
- Expected completion date: September 11, 2026 (approximately 6 weeks)
4. Financial Settlements
Some financial settlement cycles use working days, such as:
- T+1 settlement: Arrives on the next working day
- T+3 settlement: Arrives three working days later
2026 Public Holiday Schedule
2026 public holidays are as follows (specific swap arrangements subject to official announcements):
| Holiday | Dates | Days |
|---|---|---|
| New Year | January 1 | 1 day |
| Spring Festival | January 28 - February 3 | 7 days |
| Qingming Festival | April 4 - April 6 | 3 days |
| Labor Day | May 1 - May 5 | 5 days |
| Dragon Boat Festival | May 31 - June 2 | 3 days |
| Mid-Autumn Festival | September 25 | 1 day |
| National Day | October 1 - October 7 | 7 days |
Frequently Asked Questions
Q: Does working day calculation include the start and end dates?
A: Yes. The calculation includes both the start and end dates, as long as they are working days.
Q: How do you handle holiday swaps?
A: Holiday swaps refer to adjusting weekends to working days. Calculation requires: 1) Deducting public holidays; 2) Adding back swapped working days.
Q: Do working day calculations differ between countries?
A: Yes. Different countries have different weekend arrangements (e.g., Friday-Saturday rest) and public holidays, so adjustments are needed based on specific circumstances.
Use Online 🧮 Working Day Calculator
Quickly calculate working days between two dates, with public holiday exclusion option
Calculate Now →